Changeset - r16321:e1d5398db7dc
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-10-25 20:43:36
frosch@openttd.org
(svn r21039) -Fix/Cleanup: Remove an unneeded and even wrong test, which is never reached anyway though.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1578,15 +1578,15 @@ static PaletteID GetEngineColourMap(Engi
 

	
 
	const Engine *e = Engine::Get(engine_type);
 

	
 
	/* Check if we should use the colour map callback */
 
	if (HasBit(e->info.callback_mask, CBM_VEHICLE_COLOUR_REMAP)) {
 
		uint16 callback = GetVehicleCallback(CBID_VEHICLE_COLOUR_MAPPING, 0, 0, engine_type, v);
 
		/* A return value of 0xC000 is stated to "use the default two-colour
 
		 * maps" which happens to be the failure action too... */
 
		if (callback != CALLBACK_FAILED && callback != 0xC000) {
 
		/* Failure means "use the default two-colour" */
 
		if (callback != CALLBACK_FAILED) {
 
			assert_compile(PAL_NONE == 0); // Returning 0x4000 (resp. 0xC000) conincidences with default value (PAL_NONE)
 
			map = GB(callback, 0, 14);
 
			/* If bit 14 is set, then the company colours are applied to the
 
			 * map else it's returned as-is. */
 
			if (!HasBit(callback, 14)) {
 
				/* Update cache */
 
				if (v != NULL) const_cast<Vehicle *>(v)->colourmap = map;
0 comments (0 inline, 0 general)