Join from another thread, where it's rather off-topic:
bobingabout wrote:i don't think OTTD should stop support of newGRF, but i do think the 32bpp stuff might need a bit more of a kick than newGRF supports.
Brianetta wrote:How would the graphical bit depth affect the "kick" of newgrf?
bobingabout wrote:because its actually 34bits, because you require a 32bpp image and a 2bpp CC overlay, which means each sprite requires 2 seperate images.
Brianetta wrote:Still not sure why you need to handle it any differently from the 8 bit graphics. I was under the impression that newgrf was fairly agnostic toward bit depth and graphics format.
As I believe has been said before, NFO is utterly graphics format agnostic. As long as the action 1/5/A data-blocks contain as many sprites (real or pseudo, it doesn't matter) as the controlling 1/5/A says the data block contains, the NFO is valid. TTDPatch,
in its current state, would have no problems with 32bpp images (or any other data format or even some 3D mesh and texture format, as long as there are guards to ensure that TTDPatch never attempts to draw those sprites.
If you use the include-PNG system I previously suggested, just do something like
Code: Select all
0 * 0 01 00 01 10 // one train with sixteen sprites
0 ** sprites/Name-N-Sprite.png
0 ** sprites/Name-N-Overlay.png
0 ** sprites/Name-NE-Sprite.png
0 ** sprites/Name-NE-Overlay.png
0 ** sprites/Name-E-Sprite.png
0 ** sprites/Name-E-Overlay.png
0 ** sprites/Name-SE-Sprite.png
0 ** sprites/Name-SE-Overlay.png
0 ** sprites/Name-S-Sprite.png
0 ** sprites/Name-S-Overlay.png
0 ** sprites/Name-SW-Sprite.png
0 ** sprites/Name-SW-Overlay.png
0 ** sprites/Name-W-Sprite.png
0 ** sprites/Name-W-Overlay.png
0 ** sprites/Name-NW-Sprite.png
0 ** sprites/Name-NW-Overlay.png
and change Open to DTRT with included PNGs and to understand that when 32 bpp sprites are seen, it should expect that sprite order. (or pick a different order, if some other order works better.) TTDPatch will crash if it ever tries to draw one of these 32 bpp sprites, but that's because TTDPatch doesn't know what to do with them, not because it's an invalid NFO.
For some things, it might work to provide 24 sprites: eight 8bpp sprites, so TTDPatch is happy (I hope. I'm not certain that this will work), and then the above sixteen 32+2 bpp sprites. Then OTTD could use either, depending on which the user requests.