summaryrefslogtreecommitdiff
path: root/src/vehicle.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/vehicle.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/vehicle.h')
-rw-r--r--src/vehicle.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/vehicle.h b/src/vehicle.h
index 612807f48..6c16c9921 100644
--- a/src/vehicle.h
+++ b/src/vehicle.h
@@ -76,9 +76,9 @@ typedef struct VehicleRail {
// 0xffff == not in train
EngineID first_engine;
- byte track;
+ TrackBitsByte track;
byte force_proceed;
- byte railtype;
+ RailTypeByte railtype;
RailTypeMask compatible_railtypes;
byte flags;
@@ -138,7 +138,7 @@ typedef struct VehicleDisaster {
} VehicleDisaster;
typedef struct VehicleShip {
- byte state;
+ TrackBitsByte state;
} VehicleShip;
@@ -155,7 +155,7 @@ struct Vehicle {
StringID string_id; // Displayed string
UnitID unitnumber; // unit number, for display purposes only
- PlayerID owner; // which player owns the vehicle?
+ PlayerByte owner; // which player owns the vehicle?
TileIndex tile; // Current tile index
TileIndex dest_tile; // Heading for this tile
@@ -163,7 +163,7 @@ struct Vehicle {
int32 x_pos; // coordinates
int32 y_pos;
byte z_pos;
- byte direction; // facing
+ DirectionByte direction; // facing
byte spritenum; // currently displayed sprite index
// 0xfd == custom sprite, 0xfe == custom second head sprite
@@ -455,9 +455,7 @@ static inline Vehicle *GetFirstVehicleFromSharedList(const Vehicle *v)
VARDEF VehicleID _new_vehicle_id;
VARDEF uint16 _returned_refit_capacity;
-enum {
- INVALID_VEHICLE = 0xFFFF,
-};
+static const VehicleID INVALID_VEHICLE = 0xFFFF;
/**
* Get the colour map for an engine. This used for unbuilt engines in the user interface.