Difference between revisions of "NML:Recolour sprites"
Emperor Jake (talk | contribs) (Made this page more useful) |
Planetmaker (talk | contribs) m (change palette naming DOS->default and windows->legacy to match OpenTTD's naming of those) |
||
Line 11: | Line 11: | ||
</pre> |
</pre> |
||
− | The above example will remap colour 0xC6 as 0x28, 0xC7 as 0xF5 and the range 0xC8 to 0xCD to the colours 0x0A..0x0F. This is one of the company colour recolour sprites defined in the baseset. Please note that in NML every recolour sprite will use the DOS palette. If your actual graphics files use the windows palette, nmlc will silently convert the recolour sprite to the windows palette before writing it to the output file. |
+ | The above example will remap colour 0xC6 as 0x28, 0xC7 as 0xF5 and the range 0xC8 to 0xCD to the colours 0x0A..0x0F. This is one of the company colour recolour sprites defined in the baseset. Please note that in NML every recolour sprite will use the Default (DOS) palette. If your actual graphics files use the windows palette, nmlc will silently convert the recolour sprite to the windows palette before writing it to the output file. |
− | With the following table you can find out the colour indices in the DOS palette (left). |
+ | With the following table you can find out the colour indices in the Default (DOS) palette (left). |
[[File:TTD_Palettes.png]] |
[[File:TTD_Palettes.png]] |
Revision as of 13:21, 18 December 2013
Vehicles, Stations, Canals, Bridges, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Terrain
Recolour sprites are special sprites that are used to recolour other sprites, for example to apply company colours. It's basically a remapping of the colour table.
recolour_sprite { 0xC6: 0x28; 0xC7: 0xF5; 0xC8..0xCD: 0x0A..0x0F; }
The above example will remap colour 0xC6 as 0x28, 0xC7 as 0xF5 and the range 0xC8 to 0xCD to the colours 0x0A..0x0F. This is one of the company colour recolour sprites defined in the baseset. Please note that in NML every recolour sprite will use the Default (DOS) palette. If your actual graphics files use the windows palette, nmlc will silently convert the recolour sprite to the windows palette before writing it to the output file.
With the following table you can find out the colour indices in the Default (DOS) palette (left).