diff options
author | peter1138 <peter1138@openttd.org> | 2006-03-01 17:35:01 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-03-01 17:35:01 +0000 |
commit | 24217d5c8d1a1d586083e75cc64a4cf52e05f80b (patch) | |
tree | 993377b5b8a18faa473f63bfde192481ddb2262e /vehicle.h | |
parent | 2e684c3537ff0e3f91673c99bb0c3c38d0bb9085 (diff) | |
download | openttd-24217d5c8d1a1d586083e75cc64a4cf52e05f80b.tar.xz |
(svn r3701) [2cc] move vehicle/engine palette functions out of header file and document the remaining definitions
Diffstat (limited to 'vehicle.h')
-rw-r--r-- | vehicle.h | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -422,19 +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); -} +/** + * Get the colour map for an engine. This used for unbuilt engines in the user interface. + * @param engine_type ID of engine + * @param player ID of player + * @return A ready-to-use palette modifier + */ +PalSpriteID GetEnginePalette(EngineID engine_type, PlayerID player); +/** + * Get the colour map for a vehicle. + * @param v Vehicle to get colour map for + * @return A ready-to-use palette modifier + */ +PalSpriteID GetVehiclePalette(const Vehicle *v); /* 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 */ |