summaryrefslogtreecommitdiff
path: root/src/vehicle.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-30 13:09:44 +0000
committerrubidium <rubidium@openttd.org>2007-08-30 13:09:44 +0000
commitf8306999712ddfd98ee342962ff446ccadcd8d1a (patch)
tree6e679af8466e541ec086d1aba2cb7f6f89e4ad69 /src/vehicle.h
parent235ad4ab6bf3133517a7a779c398e30f51bdbbad (diff)
downloadopenttd-f8306999712ddfd98ee342962ff446ccadcd8d1a.tar.xz
(svn r11004) -Codechange: some reworks of the saveload mechanism to be able to save and load private and protected variables in the vehicle struct.
Diffstat (limited to 'src/vehicle.h')
-rw-r--r--src/vehicle.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vehicle.h b/src/vehicle.h
index e2041229f..ea75423c1 100644
--- a/src/vehicle.h
+++ b/src/vehicle.h
@@ -218,11 +218,18 @@ struct VehicleShip {
struct Vehicle;
DECLARE_OLD_POOL(Vehicle, Vehicle, 9, 125)
+struct SaveLoad;
+extern const SaveLoad *GetVehicleDescription(VehicleType vt);
+
struct Vehicle : PoolItem<Vehicle, VehicleID, &_Vehicle_pool> {
VehicleTypeByte type; ///< Type of vehicle
byte subtype; // subtype (Filled with values from EffectVehicles/TrainSubTypes/AircraftSubTypes)
+private:
Vehicle *next; // pointer to the next vehicle in the chain
+public:
+ friend const SaveLoad *GetVehicleDescription(VehicleType vt); // So we can use private/protected variables in the saveload code
+
Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain
Vehicle *depot_list; // NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace