summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-20 09:26:07 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-20 09:26:07 +0000
commit4f9ea7640a4c0df9c53791c51eed9d320be16327 (patch)
treee87fed6383d92b03125509e76c151eb73cdc1be6 /vehicle.h
parent4c8c1e8f6a60dcba011aaf495aa3f38b15c577e5 (diff)
downloadopenttd-4f9ea7640a4c0df9c53791c51eed9d320be16327.tar.xz
(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/vehicle.h b/vehicle.h
index 05b8fd359..9e001d7bc 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -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