From 72b8e569204563e1603948c36d4c4f769be323a3 Mon Sep 17 00:00:00 2001 From: alberth Date: Sun, 13 Mar 2011 13:49:31 +0000 Subject: (svn r22237) -Doc: Add some doxyments to structs and enums in engine_type.h --- src/engine_type.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/engine_type.h b/src/engine_type.h index ce755487f..8a82b4b52 100644 --- a/src/engine_type.h +++ b/src/engine_type.h @@ -19,24 +19,27 @@ #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; @@ -59,6 +62,7 @@ struct RailVehicleInfo { 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; @@ -70,15 +74,18 @@ struct ShipVehicleInfo { 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; @@ -91,6 +98,7 @@ struct AircraftVehicleInfo { uint16 passenger_capacity; }; +/** Information about a road vehicle. */ struct RoadVehicleInfo { byte image_index; 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_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 */ -- cgit v1.2.3-54-g00ecf