(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

@@ -422,6 +422,20 @@ VARDEF uint16 _returned_refit_capacity;
#define INVALID_VEHICLE 0xFFFF
// XXX Temporary interface -- will be expanded
PalSpriteID GetEngineColourMap(PlayerID player);
static inline PalSpriteID GetEnginePalette(EngineID engine_type, PlayerID player)
{
return GetEngineColourMap(player);
}
static inline PalSpriteID GetVehiclePalette(const Vehicle *v)
{
return GetEngineColourMap(v->owner);
}
/* A lot of code calls for the invalidation of the status bar, which is widget 5.
* Best is to have a virtual value for it when it needs to change again */
#define STATUS_BAR 5