diff options
author | rubidium <rubidium@openttd.org> | 2007-08-30 13:09:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-30 13:09:44 +0000 |
commit | 9b65bc430cc4e59cba2e7ad09c2fcc0448e22781 (patch) | |
tree | 6e679af8466e541ec086d1aba2cb7f6f89e4ad69 /src/vehicle.h | |
parent | cb7eaff3534c1d18c9c8bc06be04ceb437d97765 (diff) | |
download | openttd-9b65bc430cc4e59cba2e7ad09c2fcc0448e22781.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.h | 7 |
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 |