NML:Recolour sprites

From GRFSpecs
Revision as of 13:22, 18 December 2013 by Planetmaker (talk | contribs) (change palette naming DOS->default and windows->legacy to match OpenTTD's naming of those)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Block Syntax

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 legacy (windows) palette, nmlc will silently convert the recolour sprite to the legacy (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).

TTD Palettes.png