summaryrefslogtreecommitdiff
path: root/src/airport.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
commitf35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch)
tree1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/airport.h
parenta332d10fd938f345fff18e5f4a662a58f692f734 (diff)
downloadopenttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/airport.h')
-rw-r--r--src/airport.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/airport.h b/src/airport.h
index 2dcbd1660..207de84fa 100644
--- a/src/airport.h
+++ b/src/airport.h
@@ -3,6 +3,8 @@
#ifndef AIRPORT_H
#define AIRPORT_H
+#include "direction.h"
+
enum {MAX_TERMINALS = 10};
enum {MAX_HELIPADS = 4};
enum {MAX_ELEMENTS = 255};
@@ -23,12 +25,18 @@ enum {
};
// do not change unless you change v->subtype too. This aligns perfectly with its current setting
-enum {
+enum AcceptPlanes {
+ ACC_BEGIN = 0,
AIRCRAFT_ONLY = 0,
ALL = 1,
HELICOPTERS_ONLY = 2,
+ ACC_END
};
+/** Define basic enum properties */
+template <> struct EnumPropsT<AcceptPlanes> : MakeEnumPropsT<AcceptPlanes, byte, ACC_BEGIN, ACC_END, ACC_END> {};
+typedef TinyEnumT<AcceptPlanes> AcceptPlanesByte;
+
enum {
AMED_NOSPDCLAMP = 1 << 0,
AMED_TAKEOFF = 1 << 1,
@@ -122,7 +130,7 @@ enum {
typedef struct AirportMovingData {
int x,y;
byte flag;
- byte direction;
+ DirectionByte direction;
} AirportMovingData;
// Finite sTate mAchine --> FTA
@@ -131,7 +139,7 @@ typedef struct AirportFTAClass {
const byte *terminals;
const byte *helipads;
byte entry_point; // when an airplane arrives at this airport, enter it at position entry_point
- byte acc_planes; // accept airplanes or helicopters or both
+ AcceptPlanesByte acc_planes; // accept airplanes or helicopters or both
const TileIndexDiffC *airport_depots; // gives the position of the depots on the airports
byte nof_depots; // number of depots this airport has
struct AirportFTA *layout; // state machine for airport