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 | 4041d8108a4f5994c52af436b393faebdad3ae01 (patch) | |
tree | 09da5f37172fa5f54c8410e10e03bff557736bb8 /src/vehicle.h | |
parent | 18096c4e3c999a0cd994accaf03f08499daf5d65 (diff) | |
download | openttd-4041d8108a4f5994c52af436b393faebdad3ae01.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); |