Help wanted: Sprite Recolor Mapping when Map is in newgrf fi
Posted: 15 Aug 2007 13:36
Hi. I am working on some new OTTD newgrf support, and was trying to use a sprite recolour map. I think I coded it as per the newgrf, but it doesnt remap. (Its for Action0Airports, so its unsupported in TTDP, and I cant test it there.) Usually people would blame OTTD, but I think however, the question is generic as I cant find the way to do it within TTDP either.
The difficulty Ive come across is that the sprite recolor map is defined in a newgrf. I can use recolour maps when defined in the "normal" sprite range, but cant seem to get it to point to the newgrf recolor map.
eg. newgrf sprite 0445 is to be shown, colour remapped using recolour map 0490 in the newgrf.
I think the spritedata would read: 45 84 90 04 ... but this points the recolour map to real sprite 0490, not the newgrf sprite (042D+63).
Is there an easy solution? Can you give me an example to follow?
It would be most appreciated.
RichK67
Yes, Ive read and re-read the newgrf spec, including the GRF Resource Manager info (which btw, desperately needs a link off the main index, rather than hide it unannounced in Action D Special Params). The lack of relevant examples means it doesnt help me. It doesnt show how to do a colour remap where the remap sprite is in a newgrf.
The difficulty Ive come across is that the sprite recolor map is defined in a newgrf. I can use recolour maps when defined in the "normal" sprite range, but cant seem to get it to point to the newgrf recolor map.
eg. newgrf sprite 0445 is to be shown, colour remapped using recolour map 0490 in the newgrf.
I think the spritedata would read: 45 84 90 04 ... but this points the recolour map to real sprite 0490, not the newgrf sprite (042D+63).
Is there an easy solution? Can you give me an example to follow?
It would be most appreciated.
RichK67
Yes, Ive read and re-read the newgrf spec, including the GRF Resource Manager info (which btw, desperately needs a link off the main index, rather than hide it unannounced in Action D Special Params). The lack of relevant examples means it doesnt help me. It doesnt show how to do a colour remap where the remap sprite is in a newgrf.