From 4f9ea7640a4c0df9c53791c51eed9d320be16327 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 20 Feb 2006 09:26:07 +0000 Subject: (svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles. --- vehicle.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vehicle.c') diff --git a/vehicle.c b/vehicle.c index cac8e3315..d05bfee56 100644 --- a/vehicle.c +++ b/vehicle.c @@ -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), -- cgit v1.2.3-54-g00ecf