diff options
Diffstat (limited to 'airport.h')
-rw-r--r-- | airport.h | 75 |
1 files changed, 73 insertions, 2 deletions
@@ -3,10 +3,10 @@ #ifndef AIRPORT_H #define AIRPORT_H -#include "airport_movement.h" - enum {MAX_TERMINALS = 6}; enum {MAX_HELIPADS = 2}; +enum {MAX_ELEMENTS = 255}; +enum {MAX_HEADINGS = 18}; // Airport types enum { @@ -25,6 +25,76 @@ enum { HELICOPTERS_ONLY = 2, }; +enum { + AMED_NOSPDCLAMP = 1<<0, + AMED_TAKEOFF = 1<<1, + AMED_SLOWTURN = 1<<2, + AMED_LAND = 1<<3, + AMED_EXACTPOS = 1<<4, + AMED_BRAKE = 1<<5, + AMED_HELI_RAISE = 1<<6, + AMED_HELI_LOWER = 1<<7, +}; + +/* Movement States on Airports (headings target) */ +enum { + TO_ALL, + HANGAR, + TERM1, + TERM2, + TERM3, + TERM4, + TERM5, + TERM6, + HELIPAD1, + HELIPAD2, + TAKEOFF, + STARTTAKEOFF, + ENDTAKEOFF, + HELITAKEOFF, + FLYING, + LANDING, + ENDLANDING, + HELILANDING, + HELIENDLANDING, +}; + +/* Movement Blocks on Airports */ +// blocks (eg_airport_flags) +enum { + TERM1_block = 1 << 0, + TERM2_block = 1 << 1, + TERM3_block = 1 << 2, + TERM4_block = 1 << 3, + TERM5_block = 1 << 4, + TERM6_block = 1 << 5, + HELIPAD1_block = 1 << 6, + HELIPAD2_block = 1 << 7, + RUNWAY_IN_OUT_block = 1 << 8, + RUNWAY_IN_block = 1 << 8, + AIRPORT_BUSY_block = 1 << 8, + RUNWAY_OUT_block = 1 << 9, + TAXIWAY_BUSY_block = 1 << 10, + OUT_WAY_block = 1 << 11, + IN_WAY_block = 1 << 12, + AIRPORT_ENTRANCE_block = 1 << 13, + TERM_GROUP1_block = 1 << 14, + TERM_GROUP2_block = 1 << 15, + HANGAR2_AREA_block = 1 << 16, + TERM_GROUP2_ENTER1_block = 1 << 17, + TERM_GROUP2_ENTER2_block = 1 << 18, + TERM_GROUP2_EXIT1_block = 1 << 19, + TERM_GROUP2_EXIT2_block = 1 << 20, + PRE_HELIPAD_block = 1 << 21, + NOTHING_block = 1 << 30, +}; + +typedef struct AirportMovingData { + int x,y; + byte flag; + byte direction; +} AirportMovingData; + // Finite sTate mAchine --> FTA typedef struct AirportFTAClass { byte nofelements; // number of positions the airport consists of @@ -49,6 +119,7 @@ typedef struct AirportFTA { void InitializeAirports(void); void UnInitializeAirports(void); const AirportFTAClass* GetAirport(const byte airport_type); +const AirportMovingData *GetAirportMovingData(byte airport_type, byte position); /** Get buildable airport bitmask. * @return get all buildable airports at this given time, bitmasked. |