summaryrefslogtreecommitdiff
path: root/src/engine.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
committerrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
commita7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7 (patch)
tree1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/engine.h
parentce75f6549dd379b506c9f1e9383bd881aa7cf5c7 (diff)
downloadopenttd-a7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7.tar.xz
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/engine.h')
-rw-r--r--src/engine.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/engine.h b/src/engine.h
index 2fa6b9eb0..c2dca0b9b 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -6,6 +6,8 @@
/** @file engine.h */
#include "oldpool.h"
+#include "rail.h"
+#include "sound.h"
typedef struct RailVehicleInfo {
byte image_index;
@@ -38,8 +40,8 @@ typedef struct ShipVehicleInfo {
CargoID cargo_type;
uint16 capacity;
byte running_cost;
- byte sfx;
- byte refittable;
+ SoundFxByte sfx;
+ bool refittable;
} ShipVehicleInfo;
// Aircraft subtypes
@@ -53,7 +55,7 @@ typedef struct AircraftVehicleInfo {
byte base_cost;
byte running_cost;
byte subtype;
- byte sfx;
+ SoundFxByte sfx;
byte acceleration;
byte max_speed;
byte mail_capacity;
@@ -64,7 +66,7 @@ typedef struct RoadVehicleInfo {
byte image_index;
byte base_cost;
byte running_cost;
- byte sfx;
+ SoundFxByte sfx;
byte max_speed;
byte capacity;
CargoID cargo_type;
@@ -96,9 +98,9 @@ typedef struct Engine {
uint16 duration_phase_1, duration_phase_2, duration_phase_3;
byte lifelength;
byte flags;
- byte preview_player;
+ PlayerByte preview_player;
byte preview_wait;
- byte railtype;
+ RailTypeByte railtype;
byte player_avail;
byte type; // type, ie VEH_Road, VEH_Train, etc. Same as in vehicle.h
} Engine;
@@ -122,9 +124,8 @@ enum {
NUM_VEHICLE_TYPES = 6
};
-enum {
- INVALID_ENGINE = 0xFFFF,
-};
+static const EngineID INVALID_ENGINE = 0xFFFF;
+
void AddTypeToEngines(void);
void StartupEngines(void);