engine_type.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef ENGINE_TYPE_H
00013 #define ENGINE_TYPE_H
00014
00015 #include "economy_type.h"
00016 #include "rail_type.h"
00017 #include "cargo_type.h"
00018 #include "date_type.h"
00019 #include "sound_type.h"
00020 #include "strings_type.h"
00021
00022 typedef uint16 EngineID;
00023
00024 struct Engine;
00025
00027 enum RailVehicleTypes {
00028 RAILVEH_SINGLEHEAD,
00029 RAILVEH_MULTIHEAD,
00030 RAILVEH_WAGON,
00031 };
00032
00034 enum EngineClass {
00035 EC_STEAM,
00036 EC_DIESEL,
00037 EC_ELECTRIC,
00038 EC_MONORAIL,
00039 EC_MAGLEV,
00040 };
00041
00043 struct RailVehicleInfo {
00044 byte image_index;
00045 RailVehicleTypes railveh_type;
00046 byte cost_factor;
00047 RailTypeByte railtype;
00048 uint16 max_speed;
00049 uint16 power;
00050 uint16 weight;
00051 byte running_cost;
00052 Price running_cost_class;
00053 EngineClass engclass;
00054 byte capacity;
00055 byte ai_passenger_only;
00056 uint16 pow_wag_power;
00057 byte pow_wag_weight;
00058 byte visual_effect;
00059 byte shorten_factor;
00060 byte tractive_effort;
00061 byte air_drag;
00062 byte user_def_data;
00063 };
00064
00066 struct ShipVehicleInfo {
00067 byte image_index;
00068 byte cost_factor;
00069 uint16 max_speed;
00070 uint16 capacity;
00071 byte running_cost;
00072 SoundID sfx;
00073 bool old_refittable;
00074 byte visual_effect;
00075 };
00076
00082 enum AircraftSubTypeBits {
00083 AIR_HELI = 0,
00084 AIR_CTOL = 1,
00085 AIR_FAST = 2
00086 };
00087
00089 struct AircraftVehicleInfo {
00090 byte image_index;
00091 byte cost_factor;
00092 byte running_cost;
00093 byte subtype;
00094 SoundID sfx;
00095 byte acceleration;
00096 uint16 max_speed;
00097 byte mail_capacity;
00098 uint16 passenger_capacity;
00099 };
00100
00102 struct RoadVehicleInfo {
00103 byte image_index;
00104 byte cost_factor;
00105 byte running_cost;
00106 Price running_cost_class;
00107 SoundID sfx;
00108 uint16 max_speed;
00109 byte capacity;
00110 uint8 weight;
00111 uint8 power;
00112 uint8 tractive_effort;
00113 uint8 air_drag;
00114 byte visual_effect;
00115 };
00116
00121 struct EngineInfo {
00122 Date base_intro;
00123 Year lifelength;
00124 Year base_life;
00125 byte decay_speed;
00126 byte load_amount;
00127 byte climates;
00128 CargoID cargo_type;
00129 uint32 refit_mask;
00130 byte refit_cost;
00131 byte misc_flags;
00132 byte callback_mask;
00133 int8 retire_early;
00134 StringID string_id;
00135 };
00136
00140 enum EngineMiscFlags {
00141 EF_RAIL_TILTS = 0,
00142 EF_ROAD_TRAM = 0,
00143 EF_USES_2CC = 1,
00144 EF_RAIL_IS_MU = 2,
00145 EF_RAIL_FLIPS = 3,
00146 };
00147
00151 enum EngineFlags {
00152 ENGINE_AVAILABLE = 1,
00153 ENGINE_EXCLUSIVE_PREVIEW = 2,
00154 ENGINE_OFFER_WINDOW_OPEN = 4,
00155 };
00156
00157 static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 32;
00158
00159 static const EngineID INVALID_ENGINE = 0xFFFF;
00160
00161 #endif