(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.
This commit is contained in:
@@ -698,7 +698,7 @@ static void DoDrawVehicle(const Vehicle *v)
|
||||
if (v->vehstatus & VS_DISASTER) {
|
||||
MAKE_TRANSPARENT(image);
|
||||
} else if (v->vehstatus & VS_DEFPAL) {
|
||||
image |= (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
|
||||
image |= (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
|
||||
}
|
||||
|
||||
AddSortableSpriteToDraw(image, v->x_pos + v->x_offs, v->y_pos + v->y_offs,
|
||||
@@ -2040,6 +2040,12 @@ UnitID GetFreeUnitNumber(byte type)
|
||||
return unit;
|
||||
}
|
||||
|
||||
// XXX Temporary stub -- will be expanded
|
||||
PalSpriteID GetEngineColourMap(PlayerID player)
|
||||
{
|
||||
return SPRITE_PALETTE(PLAYER_SPRITE_COLOR(player));
|
||||
}
|
||||
|
||||
// Save and load of vehicles
|
||||
const SaveLoad _common_veh_desc[] = {
|
||||
SLE_VAR(Vehicle,subtype, SLE_UINT8),
|
||||
|
||||
Reference in New Issue
Block a user