(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.

This commit is contained in:
peter1138
2006-02-20 09:26:07 +00:00
parent dac14d4210
commit b5cd24f05d
7 changed files with 40 additions and 22 deletions

View File

@@ -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),