<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://newgrf-specs.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=Callback%3A_Select_colour_mapping_for_vehicle</id>
	<title>Callback: Select colour mapping for vehicle - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://newgrf-specs.tt-wiki.net/index.php?action=history&amp;feed=atom&amp;title=Callback%3A_Select_colour_mapping_for_vehicle"/>
	<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Select_colour_mapping_for_vehicle&amp;action=history"/>
	<updated>2026-04-20T16:26:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Select_colour_mapping_for_vehicle&amp;diff=1582&amp;oldid=prev</id>
		<title>Pm-bot: Create a separate page for each callback</title>
		<link rel="alternate" type="text/html" href="https://newgrf-specs.tt-wiki.net/index.php?title=Callback:_Select_colour_mapping_for_vehicle&amp;diff=1582&amp;oldid=prev"/>
		<updated>2011-06-16T18:58:01Z</updated>

		<summary type="html">&lt;p&gt;Create a separate page for each callback&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Select colour mapping for vehicle (2D) ==&lt;br /&gt;
&lt;br /&gt;
Called while drawing the vehicle. Should return the number of the colour mapping to be used on the vehicle sprite, for example,&lt;br /&gt;
775 for blue-&amp;gt;dark blue mapping. If the callback fails, the company colour of the owner is used. Since mapping 775 doesn&amp;#039;t&lt;br /&gt;
change any colours, you can return it to disable the company colours and leave all magic blue in your sprite alone.&lt;br /&gt;
&lt;br /&gt;
If bit 14 is set, the company colour will be added to the resulting sprite number. This means the given sprite and the 15&lt;br /&gt;
following sprites must be colour maps, one for each of the 16 possible player colours. If the vehicle also has misc.flags bit 1 set&lt;br /&gt;
(two company colours), the sprite and the 255 following sprites must be appropriate colour maps. Alternatively, use a return&lt;br /&gt;
value of 00 C0 to use the default two-colour maps.&lt;br /&gt;
&lt;br /&gt;
Uses 15 return bits.&lt;br /&gt;
&lt;br /&gt;
The return value is cached to speed up sprite processing, and only updated via [[Callbacks#32-day callback (32) |callback 32]] bit 1 (or when loading/starting a&lt;br /&gt;
game or rearranging the consist).&lt;br /&gt;
[[Category:Callbacks]]&lt;/div&gt;</summary>
		<author><name>Pm-bot</name></author>
	</entry>
</feed>