src/airport.h
branchcpp_gui
changeset 6254 abc6ad7c035c
parent 6253 23983700e3d7
child 6268 4b5241e5dd10
--- a/src/airport.h	Wed Feb 14 10:46:38 2007 +0000
+++ b/src/airport.h	Sat Feb 17 11:12:50 2007 +0000
@@ -24,18 +24,6 @@
 	AT_OILRIG        = 15
 };
 
-// do not change unless you change v->subtype too. This aligns perfectly with its current setting
-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,
@@ -133,17 +121,26 @@
 // Finite sTate mAchine --> FTA
 typedef struct AirportFTAClass {
 	public:
+		enum Flags {
+			AIRPLANES   = 0x1,
+			HELICOPTERS = 0x2,
+			ALL         = AIRPLANES | HELICOPTERS,
+			SHORT_STRIP = 0x4
+		};
+
 		AirportFTAClass(
 			const AirportMovingData *moving_data,
 			const byte *terminals,
 			const byte *helipads,
-			byte entry_point,
-			AcceptPlanes acc_planes,
+			const byte *entry_points,
+			Flags flags,
 			const AirportFTAbuildup *apFA,
 			const TileIndexDiffC *depots,
 			byte nof_depots,
 			uint size_x,
-			uint size_y
+			uint size_y,
+			byte delta_z,
+			byte catchment
 		);
 
 		~AirportFTAClass();
@@ -159,18 +156,23 @@
 	const byte *terminals;
 	const byte *helipads;
 	const TileIndexDiffC *airport_depots; // gives the position of the depots on the airports
+	Flags flags;
 	byte nof_depots;                      // number of depots this airport has
 	byte nofelements;                     // number of positions the airport consists of
-	byte entry_point;                     // when an airplane arrives at this airport, enter it at position entry_point
-	AcceptPlanesByte acc_planes;          // accept airplanes or helicopters or both
+	const byte *entry_points;             ///< when an airplane arrives at this airport, enter it at position entry_point, index depends on direction
 	byte size_x;
 	byte size_y;
+	byte delta_z;                         // Z adjustment for helicopter pads
+	byte catchment;
 } AirportFTAClass;
 
+DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags)
+
+
 // internal structure used in openttd - Finite sTate mAchine --> FTA
 typedef struct AirportFTA {
 	struct AirportFTA *next; // possible extra movement choices from this position
-	uint32 block;            // 32 bit blocks (st->airport_flags), should be enough for the most complex airports
+	uint64 block;            // 64 bit blocks (st->airport_flags), should be enough for the most complex airports
 	byte position;           // the position that an airplane is at
 	byte next_position;      // next position from this position
 	byte heading;            // heading (current orders), guiding an airplane to its target on an airport