Mercurial > hg > openttd
annotate src/engine_type.h @ 9468:07d40eb8252e draft
(svn r13388) -Codechange: Remove "my invented flag for something that is a wagon"
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 05 Jun 2008 12:08:20 +0000 |
parents | 90ab27a08510 |
children | 7aa78e4bca3d |
rev | line source |
---|---|
8777
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
1 /* $Id$ */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
2 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
3 /** @file engine_type.h Types related to engines. */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
4 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
5 #ifndef ENGINE_TYPE_H |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
6 #define ENGINE_TYPE_H |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
7 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
8 #include "rail_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
9 #include "cargo_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
10 #include "vehicle_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
11 #include "gfx_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
12 #include "date_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
13 #include "sound_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
14 #include "player_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
15 #include "strings_type.h" |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
16 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
17 typedef uint16 EngineID; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
18 typedef uint16 EngineRenewID; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
19 |
9070
11b5b3f4175d
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138 <peter1138@openttd.org>
parents:
8777
diff
changeset
|
20 struct Engine; |
11b5b3f4175d
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
peter1138 <peter1138@openttd.org>
parents:
8777
diff
changeset
|
21 |
8777
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
22 enum RailVehicleTypes { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
23 RAILVEH_SINGLEHEAD, ///< indicates a "standalone" locomotive |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
24 RAILVEH_MULTIHEAD, ///< indicates a combination of two locomotives |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
25 RAILVEH_WAGON, ///< simple wagon, not motorized |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
26 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
27 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
28 enum EngineClass { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
29 EC_STEAM, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
30 EC_DIESEL, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
31 EC_ELECTRIC, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
32 EC_MONORAIL, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
33 EC_MAGLEV, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
34 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
35 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
36 struct RailVehicleInfo { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
37 byte image_index; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
38 RailVehicleTypes railveh_type; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
39 byte base_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
40 RailTypeByte railtype; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
41 uint16 max_speed; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
42 uint16 power; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
43 uint16 weight; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
44 byte running_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
45 byte running_cost_class; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
46 EngineClass engclass; ///< Class of engine for this vehicle |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
47 byte capacity; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
48 CargoID cargo_type; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
49 byte ai_rank; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
50 byte ai_passenger_only; ///< Bit value to tell AI that this engine is for passenger use only |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
51 uint16 pow_wag_power; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
52 byte pow_wag_weight; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
53 byte visual_effect; // NOTE: this is not 100% implemented yet, at the moment it is only used as a 'fallback' value |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
54 // for when the 'powered wagon' callback fails. But it should really also determine what |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
55 // kind of visual effect to generate for a vehicle (default, steam, diesel, electric). |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
56 // Same goes for the callback result, which atm is only used to check if a wagon is powered. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
57 byte shorten_factor; ///< length on main map for this type is 8 - shorten_factor |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
58 byte tractive_effort; ///< Tractive effort coefficient |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
59 byte user_def_data; ///< Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
60 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
61 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
62 struct ShipVehicleInfo { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
63 byte image_index; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
64 byte base_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
65 uint16 max_speed; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
66 CargoID cargo_type; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
67 uint16 capacity; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
68 byte running_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
69 SoundFxByte sfx; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
70 bool refittable; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
71 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
72 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
73 /* AircraftVehicleInfo subtypes, bitmask type. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
74 * If bit 0 is 0 then it is a helicopter, otherwise it is a plane |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
75 * in which case bit 1 tells us whether it's a big(fast) plane or not */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
76 enum { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
77 AIR_HELI = 0, |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
78 AIR_CTOL = 1, ///< Conventional Take Off and Landing, i.e. planes |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
79 AIR_FAST = 2 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
80 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
81 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
82 struct AircraftVehicleInfo { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
83 byte image_index; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
84 byte base_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
85 byte running_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
86 byte subtype; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
87 SoundFxByte sfx; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
88 byte acceleration; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
89 uint16 max_speed; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
90 byte mail_capacity; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
91 uint16 passenger_capacity; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
92 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
93 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
94 struct RoadVehicleInfo { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
95 byte image_index; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
96 byte base_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
97 byte running_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
98 byte running_cost_class; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
99 SoundFxByte sfx; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
100 byte max_speed; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
101 byte capacity; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
102 CargoID cargo_type; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
103 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
104 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
105 /** Information about a vehicle |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
106 * @see table/engines.h |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
107 */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
108 struct EngineInfo { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
109 Date base_intro; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
110 Year lifelength; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
111 Year base_life; |
9468
07d40eb8252e
(svn r13388) -Codechange: Remove "my invented flag for something that is a wagon"
peter1138 <peter1138@openttd.org>
parents:
9380
diff
changeset
|
112 byte decay_speed; |
8777
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
113 byte load_amount; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
114 byte climates; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
115 uint32 refit_mask; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
116 byte refit_cost; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
117 byte misc_flags; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
118 byte callbackmask; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
119 int8 retire_early; ///< Number of years early to retire vehicle |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
120 StringID string_id; ///< Default name of engine |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
121 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
122 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
123 /** |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
124 * EngineInfo.misc_flags is a bitmask, with the following values |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
125 */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
126 enum { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
127 EF_RAIL_TILTS = 0, ///< Rail vehicle tilts in curves |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
128 EF_ROAD_TRAM = 0, ///< Road vehicle is a tram/light rail vehicle |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
129 EF_USES_2CC = 1, ///< Vehicle uses two company colours |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
130 EF_RAIL_IS_MU = 2, ///< Rail vehicle is a multiple-unit (DMU/EMU) |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
131 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
132 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
133 /** |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
134 * Engine.flags is a bitmask, with the following values. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
135 */ |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
136 enum { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
137 ENGINE_AVAILABLE = 1, ///< This vehicle is available to everyone. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
138 ENGINE_EXCLUSIVE_PREVIEW = 2, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a player. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
139 ENGINE_OFFER_WINDOW_OPEN = 4, ///< The exclusive offer window is currently open for a player. |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
140 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
141 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
142 enum { |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
143 NUM_VEHICLE_TYPES = 6 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
144 }; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
145 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
146 static const EngineID INVALID_ENGINE = 0xFFFF; |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
147 |
b8c9838f0585
(svn r12476) -Codechange: split type engine related types from engine.h (and openttd.h) to engine_type.h.
rubidium <rubidium@openttd.org>
parents:
diff
changeset
|
148 #endif /* ENGINE_TYPE_H */ |