NML spritelayout checks

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
WenSim
Engineer
Engineer
Posts: 14
Joined: 02 Sep 2023 08:38

NML spritelayout checks

Post 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.
Find me on GitHub or on Discord (wensimehrp, or WenSim)
Green stuff here, may be helpful for content creators.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1749
Joined: 30 Mar 2005 09:43

Re: NML spritelayout checks

Post by peter1138 »

Yeah, don't overlap tiles.
He's like, some kind of OpenTTD developer.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests