1
0
Fork 0

(svn r22237) -Doc: Add some doxyments to structs and enums in engine_type.h

release/1.2
alberth 2011-03-13 13:49:31 +00:00
parent 2ae863463c
commit 72b8e56920
1 changed files with 17 additions and 9 deletions

View File

@ -19,24 +19,27 @@
#include "sound_type.h" #include "sound_type.h"
#include "strings_type.h" #include "strings_type.h"
typedef uint16 EngineID; typedef uint16 EngineID; ///< Unique identification number of an engine.
struct Engine; struct Engine;
/** Available types of rail vehicles. */
enum RailVehicleTypes { enum RailVehicleTypes {
RAILVEH_SINGLEHEAD, ///< indicates a "standalone" locomotive RAILVEH_SINGLEHEAD, ///< indicates a "standalone" locomotive
RAILVEH_MULTIHEAD, ///< indicates a combination of two locomotives RAILVEH_MULTIHEAD, ///< indicates a combination of two locomotives
RAILVEH_WAGON, ///< simple wagon, not motorized RAILVEH_WAGON, ///< simple wagon, not motorized
}; };
/** Type of rail engine. */
enum EngineClass { enum EngineClass {
EC_STEAM, EC_STEAM, ///< Steam rail engine.
EC_DIESEL, EC_DIESEL, ///< Diesel rail engine.
EC_ELECTRIC, EC_ELECTRIC, ///< Electric rail engine.
EC_MONORAIL, EC_MONORAIL, ///< Mono rail engine.
EC_MAGLEV, EC_MAGLEV, ///< Maglev engine.
}; };
/** Information about a rail vehicle. */
struct RailVehicleInfo { struct RailVehicleInfo {
byte image_index; byte image_index;
RailVehicleTypes railveh_type; RailVehicleTypes railveh_type;
@ -59,6 +62,7 @@ struct RailVehicleInfo {
byte user_def_data; ///< Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles byte user_def_data; ///< Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles
}; };
/** Information about a ship vehicle. */
struct ShipVehicleInfo { struct ShipVehicleInfo {
byte image_index; byte image_index;
byte cost_factor; byte cost_factor;
@ -70,15 +74,18 @@ struct ShipVehicleInfo {
byte visual_effect; ///< Bitstuffed NewGRF visual effect data byte visual_effect; ///< Bitstuffed NewGRF visual effect data
}; };
/* AircraftVehicleInfo subtypes, bitmask type. /**
* AircraftVehicleInfo subtypes, bitmask type.
* If bit 0 is 0 then it is a helicopter, otherwise it is a plane * If bit 0 is 0 then it is a helicopter, otherwise it is a plane
* in which case bit 1 tells us whether it's a big(fast) plane or not */ * in which case bit 1 tells us whether it's a big(fast) plane or not.
*/
enum AircraftSubTypeBits { enum AircraftSubTypeBits {
AIR_HELI = 0, AIR_HELI = 0,
AIR_CTOL = 1, ///< Conventional Take Off and Landing, i.e. planes AIR_CTOL = 1, ///< Conventional Take Off and Landing, i.e. planes
AIR_FAST = 2 AIR_FAST = 2
}; };
/** Information about a aircraft vehicle. */
struct AircraftVehicleInfo { struct AircraftVehicleInfo {
byte image_index; byte image_index;
byte cost_factor; byte cost_factor;
@ -91,6 +98,7 @@ struct AircraftVehicleInfo {
uint16 passenger_capacity; uint16 passenger_capacity;
}; };
/** Information about a road vehicle. */
struct RoadVehicleInfo { struct RoadVehicleInfo {
byte image_index; byte image_index;
byte cost_factor; byte cost_factor;
@ -150,6 +158,6 @@ static const uint NUM_VEHICLE_TYPES = 6;
static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 32; ///< The maximum length of an engine name in characters including '\0' static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 32; ///< The maximum length of an engine name in characters including '\0'
static const uint MAX_LENGTH_ENGINE_NAME_PIXELS = 160; ///< The maximum length of an engine name in pixels static const uint MAX_LENGTH_ENGINE_NAME_PIXELS = 160; ///< The maximum length of an engine name in pixels
static const EngineID INVALID_ENGINE = 0xFFFF; static const EngineID INVALID_ENGINE = 0xFFFF; ///< Constant denoting an invalid engine.
#endif /* ENGINE_TYPE_H */ #endif /* ENGINE_TYPE_H */