Difference between revisions of "Callback: Decide object colour"
From GRFSpecs
Jump to navigationJump to searchm (Create a separate page for each callback) |
(more strict var 10/18 masking) |
||
Line 1: | Line 1: | ||
== Decide object colour (15B) == |
== Decide object colour (15B) == |
||
− | This callback allows you to set/modify the colour of an object upon construction. |
+ | This callback allows you to set/modify the colour of an object upon construction. The lowest byte of variable 10 contains the current company colour or a random colour for when there is no company, i.e. in the scenario editor. If the object wants a 2CC colour mapping two nibbles, i.e. two colours, are passed in variable 10, otherwise one nibble (colour). |
[[Category:Callbacks]] |
[[Category:Callbacks]] |
Latest revision as of 12:36, 18 April 2015
Decide object colour (15B)
This callback allows you to set/modify the colour of an object upon construction. The lowest byte of variable 10 contains the current company colour or a random colour for when there is no company, i.e. in the scenario editor. If the object wants a 2CC colour mapping two nibbles, i.e. two colours, are passed in variable 10, otherwise one nibble (colour).