src/vehicle.h
changeset 7537 0b720e804ae2
parent 7497 40e457c0a8ac
child 7545 d44e19c5671e
--- a/src/vehicle.h	Fri Sep 07 21:17:01 2007 +0000
+++ b/src/vehicle.h	Fri Sep 07 22:06:52 2007 +0000
@@ -218,9 +218,12 @@
 struct Vehicle;
 DECLARE_OLD_POOL(Vehicle, Vehicle, 9, 125)
 
+/* Some declarations of functions, so we can make them friendly */
 struct SaveLoad;
-const SaveLoad *GetVehicleDescription(VehicleType vt);
-void AfterLoadVehicles();
+extern const SaveLoad *GetVehicleDescription(VehicleType vt);
+extern void AfterLoadVehicles();
+struct LoadgameState;
+extern bool LoadOldVehicle(LoadgameState *ls, int num);
 
 struct Vehicle : PoolItem<Vehicle, VehicleID, &_Vehicle_pool> {
 	VehicleTypeByte type;    ///< Type of vehicle
@@ -232,7 +235,8 @@
 	Vehicle *first;          // NOSAVE: pointer to the first vehicle in the chain
 public:
 	friend const SaveLoad *GetVehicleDescription(VehicleType vt); // So we can use private/protected variables in the saveload code
-	friend void AfterLoadVehicles();
+	friend void AfterLoadVehicles();                              // So we can set the previous and first pointers while loading
+	friend bool LoadOldVehicle(LoadgameState *ls, int num);       // So we can set the proper next pointer while loading
 
 	Vehicle *depot_list;     // NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace