Changeset - r17472:0c79f01bb563
[Not reviewed]
master
0 1 0
alberth - 14 years ago 2011-03-13 13:49:31
alberth@openttd.org
(svn r22237) -Doc: Add some doxyments to structs and enums in engine_type.h
1 file changed with 17 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/engine_type.h
Show inline comments
 
@@ -16,30 +16,33 @@
 
#include "rail_type.h"
 
#include "cargo_type.h"
 
#include "date_type.h"
 
#include "sound_type.h"
 
#include "strings_type.h"
 

	
 
typedef uint16 EngineID;
 
typedef uint16 EngineID; ///< Unique identification number of an engine.
 

	
 
struct Engine;
 

	
 
/** Available types of rail vehicles. */
 
enum RailVehicleTypes {
 
	RAILVEH_SINGLEHEAD,  ///< indicates a "standalone" locomotive
 
	RAILVEH_MULTIHEAD,   ///< indicates a combination of two locomotives
 
	RAILVEH_WAGON,       ///< simple wagon, not motorized
 
};
 

	
 
/** Type of rail engine. */
 
enum EngineClass {
 
	EC_STEAM,
 
	EC_DIESEL,
 
	EC_ELECTRIC,
 
	EC_MONORAIL,
 
	EC_MAGLEV,
 
	EC_STEAM,    ///< Steam rail engine.
 
	EC_DIESEL,   ///< Diesel rail engine.
 
	EC_ELECTRIC, ///< Electric rail engine.
 
	EC_MONORAIL, ///< Mono rail engine.
 
	EC_MAGLEV,   ///< Maglev engine.
 
};
 

	
 
/** Information about a rail vehicle. */
 
struct RailVehicleInfo {
 
	byte image_index;
 
	RailVehicleTypes railveh_type;
 
	byte cost_factor;               ///< Purchase cost factor;      For multiheaded engines the sum of both engine prices.
 
	RailTypeByte railtype;
 
	uint16 max_speed;               ///< Maximum speed (1 unit = 1/1.6 mph = 1 km-ish/h)
 
@@ -56,44 +59,49 @@ struct RailVehicleInfo {
 
	byte shorten_factor;            ///< length on main map for this type is 8 - shorten_factor
 
	byte tractive_effort;           ///< Tractive effort coefficient
 
	byte air_drag;                  ///< Coefficient of air drag
 
	byte user_def_data;             ///< Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles
 
};
 

	
 
/** Information about a ship vehicle. */
 
struct ShipVehicleInfo {
 
	byte image_index;
 
	byte cost_factor;
 
	uint16 max_speed;      ///< Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h)
 
	uint16 capacity;
 
	byte running_cost;
 
	SoundID sfx;
 
	bool old_refittable;   ///< Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask.
 
	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
 
 * 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 {
 
	AIR_HELI = 0,
 
	AIR_CTOL = 1, ///< Conventional Take Off and Landing, i.e. planes
 
	AIR_FAST = 2
 
};
 

	
 
/** Information about a aircraft vehicle. */
 
struct AircraftVehicleInfo {
 
	byte image_index;
 
	byte cost_factor;
 
	byte running_cost;
 
	byte subtype;
 
	SoundID sfx;
 
	byte acceleration;
 
	uint16 max_speed;           ///< Maximum speed (1 unit = 8 mph = 12.8 km-ish/h)
 
	byte mail_capacity;
 
	uint16 passenger_capacity;
 
};
 

	
 
/** Information about a road vehicle. */
 
struct RoadVehicleInfo {
 
	byte image_index;
 
	byte cost_factor;
 
	byte running_cost;
 
	Price running_cost_class;
 
	SoundID sfx;
 
@@ -147,9 +155,9 @@ enum EngineFlags {
 
};
 

	
 
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_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 */
0 comments (0 inline, 0 general)