diff options
author | glx <glx@openttd.org> | 2007-10-28 15:40:18 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-10-28 15:40:18 +0000 |
commit | 6120d0275120b0830811f5eb983ffe05e9545bce (patch) | |
tree | 09da5f37172fa5f54c8410e10e03bff557736bb8 /src/vehicle.h | |
parent | e6116d11b8cfd58d1880e79143de93900404e33c (diff) | |
download | openttd-6120d0275120b0830811f5eb983ffe05e9545bce.tar.xz |
(svn r11352) -Codechange: cache callback 2D result (vehicle color mapping) instead calling it every time the vehicle is drawn
Diffstat (limited to 'src/vehicle.h')
-rw-r--r-- | src/vehicle.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vehicle.h b/src/vehicle.h index 7b2b230fc..dd946900c 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -340,6 +340,8 @@ public: uint32 current_order_time; ///< How many ticks have passed since this order started. int32 lateness_counter; ///< How many ticks late (or early if negative) this vehicle is. + SpriteID colormap; // NOSAVE: cached color mapping + union { VehicleRail rail; VehicleAir air; @@ -588,6 +590,7 @@ uint8 CalcPercentVehicleFilled(Vehicle *v, StringID *color); void InitializeTrains(); byte VehicleRandomBits(); void ResetVehiclePosHash(); +void ResetVehicleColorMap(); bool CanRefitTo(EngineID engine_type, CargoID cid_to); CargoID FindFirstRefittableCargo(EngineID engine_type); |