annotate src/engine_type.h @ 10982:bb9f7c744e3b draft

(svn r15321) -Codechange: Load road vehicle 'realistic' acceleration properties from NewGRF, and supply defaults as used by TTDPatch. These values are not yet used.
author peter1138 <peter1138@openttd.org>
date Mon, 02 Feb 2009 21:52:34 +0000
parents 0981f4793872
children 7137f60c0fd3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
10208
39cf8eebfda5 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames.
rubidium <rubidium@openttd.org>
parents: 10207
diff changeset
14 #include "company_type.h"
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
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
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
19 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
20
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
21 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
22 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
23 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
24 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
25 };
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 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
28 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
29 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
30 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
31 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
32 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
33 };
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 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
36 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
37 RailVehicleTypes railveh_type;
9923
82b94a0a3f6c (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
peter1138 <peter1138@openttd.org>
parents: 9913
diff changeset
38 byte cost_factor; ///< Purchase cost factor; For multiheaded engines the sum of both engine prices.
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
39 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
40 uint16 max_speed;
9720
7aa78e4bca3d (svn r13844) -Fix (r13074, r13591): Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window.
frosch <frosch@openttd.org>
parents: 9468
diff changeset
41 uint16 power; ///< Power of engine; For multiheaded engines the sum of both engine powers.
7aa78e4bca3d (svn r13844) -Fix (r13074, r13591): Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window.
frosch <frosch@openttd.org>
parents: 9468
diff changeset
42 uint16 weight; ///< Weight of vehicle; For multiheaded engines the weight of each single engine.
7aa78e4bca3d (svn r13844) -Fix (r13074, r13591): Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window.
frosch <frosch@openttd.org>
parents: 9468
diff changeset
43 byte running_cost; ///< Running cost of engine; For multiheaded engines the sum of both running costs.
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
44 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
45 EngineClass engclass; ///< Class of engine for this vehicle
9720
7aa78e4bca3d (svn r13844) -Fix (r13074, r13591): Power, running cost and capacity of multiheaded engines were (too often) doubled in newspaper resp. offer window.
frosch <frosch@openttd.org>
parents: 9468
diff changeset
46 byte capacity; ///< Cargo capacity of vehicle; For multiheaded engines the capacity of each single engine.
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
47 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
48 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
49 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
50 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
51 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
52 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
53 // 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
54 // 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
55 // 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
56 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
57 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
58 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
59 };
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 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
62 byte image_index;
9923
82b94a0a3f6c (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
peter1138 <peter1138@openttd.org>
parents: 9913
diff changeset
63 byte cost_factor;
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
64 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
65 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
66 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
67 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
68 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
69 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
70 };
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 /* 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
73 * 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
74 * 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
75 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
76 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
77 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
78 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
79 };
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 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
82 byte image_index;
9923
82b94a0a3f6c (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
peter1138 <peter1138@openttd.org>
parents: 9913
diff changeset
83 byte cost_factor;
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
84 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
85 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
86 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
87 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
88 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
89 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
90 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
91 };
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 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
94 byte image_index;
9923
82b94a0a3f6c (svn r14078) -Codechange: Rename *VehicleInfo::base_cost to cost_factor, indicating what it actually is.
peter1138 <peter1138@openttd.org>
parents: 9913
diff changeset
95 byte cost_factor;
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
96 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
97 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
98 SoundFxByte sfx;
10595
0981f4793872 (svn r14869) -Feature: Allow road vehicles to move multiple steps in a tick (code based on train movement code) and add support for RV prop 15. This gives RVs a maximum speed of 318mph instead 79mph. This only implements higher speeds, not 'realistic acceleration'.
peter1138 <peter1138@openttd.org>
parents: 10208
diff changeset
99 uint16 max_speed; ///< Maximum speed in mph/3.2 units
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
100 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
101 CargoID cargo_type;
10982
bb9f7c744e3b (svn r15321) -Codechange: Load road vehicle 'realistic' acceleration properties from NewGRF, and supply defaults as used by TTDPatch. These values are not yet used.
peter1138 <peter1138@openttd.org>
parents: 10595
diff changeset
102 uint8 weight; ///< Weight in 1/4t units
bb9f7c744e3b (svn r15321) -Codechange: Load road vehicle 'realistic' acceleration properties from NewGRF, and supply defaults as used by TTDPatch. These values are not yet used.
peter1138 <peter1138@openttd.org>
parents: 10595
diff changeset
103 uint8 power; ///< Power in 10hp units
bb9f7c744e3b (svn r15321) -Codechange: Load road vehicle 'realistic' acceleration properties from NewGRF, and supply defaults as used by TTDPatch. These values are not yet used.
peter1138 <peter1138@openttd.org>
parents: 10595
diff changeset
104 uint8 tractive_effort; ///< Coefficient of tractive effort
bb9f7c744e3b (svn r15321) -Codechange: Load road vehicle 'realistic' acceleration properties from NewGRF, and supply defaults as used by TTDPatch. These values are not yet used.
peter1138 <peter1138@openttd.org>
parents: 10595
diff changeset
105 uint8 air_drag; ///< Coefficient of air drag
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
106 };
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 /** 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
109 * @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
110 */
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 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
112 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
113 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
114 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
115 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
116 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
117 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
118 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
119 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
120 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
121 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
122 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
123 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
124 };
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 /**
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 * 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
128 */
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 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
130 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
131 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
132 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
133 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
134 };
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 /**
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.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
138 */
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 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
140 ENGINE_AVAILABLE = 1, ///< This vehicle is available to everyone.
10207
c54d140df948 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium <rubidium@openttd.org>
parents: 10127
diff changeset
141 ENGINE_EXCLUSIVE_PREVIEW = 2, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a company.
c54d140df948 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
rubidium <rubidium@openttd.org>
parents: 10127
diff changeset
142 ENGINE_OFFER_WINDOW_OPEN = 4, ///< The exclusive offer window is currently open for a company.
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
143 };
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 enum {
9913
a1cc2bf90049 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium <rubidium@openttd.org>
parents: 9720
diff changeset
146 NUM_VEHICLE_TYPES = 6,
a1cc2bf90049 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium <rubidium@openttd.org>
parents: 9720
diff changeset
147 MAX_LENGTH_ENGINE_NAME_BYTES = 31, ///< The maximum length of an engine name in bytes including '\0'
a1cc2bf90049 (svn r14063) -Codechange: replace some "magic" constants with enumified constants.
rubidium <rubidium@openttd.org>
parents: 9720
diff changeset
148 MAX_LENGTH_ENGINE_NAME_PIXELS = 160, ///< The maximum length of an engine name in pixels
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
149 };
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
150
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
151 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
152
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
153 #endif /* ENGINE_TYPE_H */