Page 1 of 1

NML spritelayout checks

Posted: 09 Jul 2024 07:28
by WenSim
NML has a check that in a spritelayout, xoffset and yoffset cannot be smaller than 0. But there sometimes are specific use cases of them, e.g. overlapping station tiles or animations. The check gets disabled when I add a variable and write something like LOAD_TEMP(0) * 0 - 35, and the expression that directly equals to -35. Additionally, when coding a station, NML automatically thinks that the ground sprite needs to be shifted - that means if the tracktype is, say, mono, what OpenTTD will do is that the game will add a number on the groundsprite. I used a ternary operator to bypass that shift when coding non-track platforms. I know that for the latter issue there is a fix from glx, but for the first one I don't know if there are any solutions yet.

Re: NML spritelayout checks

Posted: 09 Jul 2024 21:41
by peter1138
Yeah, don't overlap tiles.