Difference between revisions of "NML:Recolour sprites"

From GRFSpecs
Jump to navigationJump to search
m (change palette naming DOS->default and windows->legacy to match OpenTTD's naming of those)
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 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.
+
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).
 
With the following table you can find out the colour indices in the Default (DOS) palette (left).

Latest revision as of 13:22, 18 December 2013

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