Changeset - r17189:23ff37017dfa
[Not reviewed]
master
0 1 0
alberth - 14 years ago 2011-02-01 21:18:27
alberth@openttd.org
(svn r21938) -Codechange: AfterLoadGame() is no longer friend of Vehicle.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/vehicle_base.h
Show inline comments
 
@@ -112,13 +112,12 @@ extern VehiclePool _vehicle_pool;
 
/* Some declarations of functions, so we can make them friendly */
 
struct SaveLoad;
 
struct GroundVehicleCache;
 
extern const SaveLoad *GetVehicleDescription(VehicleType vt);
 
struct LoadgameState;
 
extern bool LoadOldVehicle(LoadgameState *ls, int num);
 
extern bool AfterLoadGame();
 
extern void FixOldVehicles();
 

	
 
/** %Vehicle data structure. */
 
struct Vehicle : VehiclePool::PoolItem<&_vehicle_pool>, BaseVehicle {
 
private:
 
	Vehicle *next;                      ///< pointer to the next vehicle in the chain
 
@@ -126,13 +125,12 @@ private:
 
	Vehicle *first;                     ///< NOSAVE: pointer to the first vehicle in the chain
 

	
 
	Vehicle *next_shared;               ///< pointer to the next vehicle that shares the order
 
	Vehicle *previous_shared;           ///< NOSAVE: pointer to the previous vehicle in the shared order chain
 
public:
 
	friend const SaveLoad *GetVehicleDescription(VehicleType vt); ///< So we can use private/protected variables in the saveload code
 
	friend bool AfterLoadGame();
 
	friend void FixOldVehicles();
 
	friend void AfterLoadVehicles(bool part_of_load);             ///< 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
 

	
 
	char *name;                         ///< Name of vehicle
 

	
 
@@ -229,13 +227,13 @@ public:
 
		OrderList *list;            ///< Pointer to the order list for this vehicle
 
		Order     *old;             ///< Only used during conversion of old save games
 
	} orders;                           ///< The orders currently assigned to the vehicle.
 

	
 
	byte vehicle_flags;                 ///< Used for gradual loading and other miscellaneous things (@see VehicleFlags enum)
 

	
 
	uint16 load_unload_ticks;	          ///< Ticks to wait before starting next cycle.
 
	uint16 load_unload_ticks;           ///< Ticks to wait before starting next cycle.
 
	GroupID group_id;                   ///< Index of group Pool array
 
	byte subtype;                       ///< subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes)
 

	
 
	NewGRFCache grf_cache;              ///< Cache of often used calculated NewGRF values
 
	VehicleCache vcache;                ///< Cache of often used vehicle values.
 

	
0 comments (0 inline, 0 general)