1
0
Fork 0

(svn r21087) -Doc: Align and make existing comments available for doxygen.

release/1.1
alberth 2010-11-05 15:48:30 +00:00
parent 399eedd884
commit 5e3991e20e
1 changed files with 55 additions and 55 deletions

View File

@ -44,7 +44,7 @@ enum VehicleFlags {
VF_STOP_LOADING, ///< Don't load anymore during the next load cycle. VF_STOP_LOADING, ///< Don't load anymore during the next load cycle.
}; };
/** Cached oftenly queried (NewGRF) values */ /** Cached often queried (NewGRF) values */
struct VehicleCache { struct VehicleCache {
uint8 cache_valid; ///< Whether the caches are valid uint8 cache_valid; ///< Whether the caches are valid
uint32 cached_var40; ///< Cache for NewGRF var 40 uint32 cached_var40; ///< Cache for NewGRF var 40
@ -67,12 +67,12 @@ extern void FixOldVehicles();
struct Vehicle : VehiclePool::PoolItem<&_vehicle_pool>, BaseVehicle { struct Vehicle : VehiclePool::PoolItem<&_vehicle_pool>, BaseVehicle {
private: private:
Vehicle *next; ///< pointer to the next vehicle in the chain Vehicle *next; ///< pointer to the next vehicle in the chain
Vehicle *previous; ///< NOSAVE: pointer to the previous vehicle in the chain Vehicle *previous; ///< NOSAVE: pointer to the previous vehicle in the chain
Vehicle *first; ///< NOSAVE: pointer to the first vehicle in the chain Vehicle *first; ///< NOSAVE: pointer to the first vehicle in the chain
Vehicle *next_shared; ///< pointer to the next vehicle that shares the order 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 Vehicle *previous_shared; ///< NOSAVE: pointer to the previous vehicle in the shared order chain
public: public:
friend const SaveLoad *GetVehicleDescription(VehicleType vt); ///< So we can use private/protected variables in the saveload code friend const SaveLoad *GetVehicleDescription(VehicleType vt); ///< So we can use private/protected variables in the saveload code
friend bool AfterLoadGame(); friend bool AfterLoadGame();
@ -80,9 +80,9 @@ public:
friend void AfterLoadVehicles(bool part_of_load); ///< So we can set the previous and first pointers while loading 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 friend bool LoadOldVehicle(LoadgameState *ls, int num); ///< So we can set the proper next pointer while loading
char *name; ///< Name of vehicle char *name; ///< Name of vehicle
TileIndex tile; ///< Current tile index TileIndex tile; ///< Current tile index
/** /**
* Heading for this tile. * Heading for this tile.
@ -91,16 +91,16 @@ public:
*/ */
TileIndex dest_tile; TileIndex dest_tile;
Money profit_this_year; ///< Profit this year << 8, low 8 bits are fract Money profit_this_year; ///< Profit this year << 8, low 8 bits are fract
Money profit_last_year; ///< Profit last year << 8, low 8 bits are fract Money profit_last_year; ///< Profit last year << 8, low 8 bits are fract
Money value; ///< Value of the vehicle Money value; ///< Value of the vehicle
CargoPayment *cargo_payment; ///< The cargo payment we're currently in CargoPayment *cargo_payment; ///< The cargo payment we're currently in
/* Used for timetabling. */ /* Used for timetabling. */
uint32 current_order_time; ///< How many ticks have passed since this order started. 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. int32 lateness_counter; ///< How many ticks late (or early if negative) this vehicle is.
Date timetable_start; ///< When the vehicle is supposed to start the timetable. Date timetable_start; ///< When the vehicle is supposed to start the timetable.
/* Boundaries for the current position in the world and a next hash link. /* Boundaries for the current position in the world and a next hash link.
* NOSAVE: All of those can be updated with VehiclePositionChanged() */ * NOSAVE: All of those can be updated with VehiclePositionChanged() */
@ -109,12 +109,12 @@ public:
Vehicle *next_new_hash, **prev_new_hash; Vehicle *next_new_hash, **prev_new_hash;
Vehicle **old_new_hash; Vehicle **old_new_hash;
SpriteID colourmap; // NOSAVE: cached colour mapping SpriteID colourmap; ///< NOSAVE: cached colour mapping
/* Related to age and service time */ /* Related to age and service time */
Year build_year; Year build_year;
Date age; // Age in days Date age; ///< Age in days
Date max_age; // Maximum age Date max_age; ///< Maximum age
Date date_of_last_service; Date date_of_last_service;
Date service_interval; Date service_interval;
uint16 reliability; uint16 reliability;
@ -124,30 +124,30 @@ public:
byte breakdowns_since_last_service; byte breakdowns_since_last_service;
byte breakdown_chance; byte breakdown_chance;
int32 x_pos; // coordinates int32 x_pos; ///< x coordinate.
int32 y_pos; int32 y_pos; ///< y coordinate.
byte z_pos; byte z_pos; ///< z coordinate.
DirectionByte direction; // facing DirectionByte direction; ///< facing
OwnerByte owner; // which company owns the vehicle? OwnerByte owner; ///< Which company owns the vehicle?
byte spritenum; // currently displayed sprite index byte spritenum; ///< currently displayed sprite index
// 0xfd == custom sprite, 0xfe == custom second head sprite ///< 0xfd == custom sprite, 0xfe == custom second head sprite
// 0xff == reserved for another custom sprite ///< 0xff == reserved for another custom sprite
uint16 cur_image; // sprite number for this vehicle uint16 cur_image; ///< sprite number for this vehicle
byte x_extent; // x-extent of vehicle bounding box byte x_extent; ///< x-extent of vehicle bounding box
byte y_extent; // y-extent of vehicle bounding box byte y_extent; ///< y-extent of vehicle bounding box
byte z_extent; // z-extent of vehicle bounding box byte z_extent; ///< z-extent of vehicle bounding box
int8 x_offs; // x offset for vehicle sprite int8 x_offs; ///< x offset for vehicle sprite
int8 y_offs; // y offset for vehicle sprite int8 y_offs; ///< y offset for vehicle sprite
EngineID engine_type; EngineID engine_type;
TextEffectID fill_percent_te_id; // a text-effect id to a loading indicator object TextEffectID fill_percent_te_id; ///< a text-effect id to a loading indicator object
UnitID unitnumber; // unit number, for display purposes only UnitID unitnumber; ///< unit number, for display purposes only
uint16 max_speed; ///< maximum speed uint16 max_speed; ///< maximum speed
uint16 cur_speed; ///< current speed uint16 cur_speed; ///< current speed
byte subspeed; ///< fractional speed byte subspeed; ///< fractional speed
byte acceleration; ///< used by train & aircraft byte acceleration; ///< used by train & aircraft
uint32 motion_counter; uint32 motion_counter;
byte progress; byte progress;
@ -155,38 +155,38 @@ public:
* bitmask used to resolve them; parts of it get reseeded when triggers * bitmask used to resolve them; parts of it get reseeded when triggers
* of corresponding spritegroups get matched */ * of corresponding spritegroups get matched */
byte random_bits; byte random_bits;
byte waiting_triggers; ///< triggers to be yet matched byte waiting_triggers; ///< triggers to be yet matched
StationID last_station_visited; StationID last_station_visited;
CargoID cargo_type; ///< type of cargo this vehicle is carrying CargoID cargo_type; ///< type of cargo this vehicle is carrying
byte cargo_subtype; ///< Used for livery refits (NewGRF variations) byte cargo_subtype; ///< Used for livery refits (NewGRF variations)
uint16 cargo_cap; ///< total capacity uint16 cargo_cap; ///< total capacity
VehicleCargoList cargo; ///< The cargo this vehicle is carrying VehicleCargoList cargo; ///< The cargo this vehicle is carrying
byte day_counter; ///< Increased by one for each day byte day_counter; ///< Increased by one for each day
byte tick_counter; ///< Increased by one for each tick byte tick_counter; ///< Increased by one for each tick
byte running_ticks; ///< Number of ticks this vehicle was not stopped this day byte running_ticks; ///< Number of ticks this vehicle was not stopped this day
byte vehstatus; ///< Status byte vehstatus; ///< Status
Order current_order; ///< The current order (+ status, like: loading) Order current_order; ///< The current order (+ status, like: loading)
VehicleOrderID cur_order_index; ///< The index to the current order VehicleOrderID cur_order_index; ///< The index to the current order
union { union {
OrderList *list; ///< Pointer to the order list for this vehicle OrderList *list; ///< Pointer to the order list for this vehicle
Order *old; ///< Only used during conversion of old save games Order *old; ///< Only used during conversion of old save games
} orders; } orders;
byte vehicle_flags; ///< Used for gradual loading and other miscellaneous things (@see VehicleFlags enum) byte vehicle_flags; ///< Used for gradual loading and other miscellaneous things (@see VehicleFlags enum)
/** Ticks to wait before starting next cycle. */ /** Ticks to wait before starting next cycle. */
uint16 load_unload_ticks; uint16 load_unload_ticks;
GroupID group_id; ///< Index of group Pool array GroupID group_id; ///< Index of group Pool array
byte subtype; ///< subtype (Filled with values from EffectVehicles/TrainSubTypes/AircraftSubTypes) byte subtype; ///< subtype (Filled with values from #EffectVehicles/#TrainSubTypes/#AircraftSubTypes)
VehicleCache vcache; ///< Cache of often used calculated values VehicleCache vcache; ///< Cache of often used calculated values
/** Create a new vehicle */ /** Create a new vehicle */
Vehicle(VehicleType type = VEH_INVALID); Vehicle(VehicleType type = VEH_INVALID);