summaryrefslogtreecommitdiff
path: root/airport.h
diff options
context:
space:
mode:
Diffstat (limited to 'airport.h')
-rw-r--r--airport.h78
1 files changed, 54 insertions, 24 deletions
diff --git a/airport.h b/airport.h
index 3497bccdb..a8ca84c1c 100644
--- a/airport.h
+++ b/airport.h
@@ -3,10 +3,10 @@
#ifndef AIRPORT_H
#define AIRPORT_H
-enum {MAX_TERMINALS = 6};
-enum {MAX_HELIPADS = 2};
+enum {MAX_TERMINALS = 10};
+enum {MAX_HELIPADS = 4};
enum {MAX_ELEMENTS = 255};
-enum {MAX_HEADINGS = 18};
+enum {MAX_HEADINGS = 22};
// Airport types
enum {
@@ -15,7 +15,11 @@ enum {
AT_HELIPORT = 2,
AT_METROPOLITAN = 3,
AT_INTERNATIONAL = 4,
- AT_OILRIG = 15,
+ AT_COMMUTER = 5,
+ AT_HELIDEPOT = 6,
+ AT_INTERCON = 7,
+ AT_HELISTATION = 8,
+ AT_OILRIG = 15
};
// do not change unless you change v->subtype too. This aligns perfectly with its current setting
@@ -38,27 +42,36 @@ enum {
/* 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,
+ TO_ALL = 0,
+ HANGAR = 1,
+ TERM1 = 2,
+ TERM2 = 3,
+ TERM3 = 4,
+ TERM4 = 5,
+ TERM5 = 6,
+ TERM6 = 7,
+ HELIPAD1 = 8,
+ HELIPAD2 = 9,
+ TAKEOFF = 10,
+ STARTTAKEOFF = 11,
+ ENDTAKEOFF = 12,
+ HELITAKEOFF = 13,
+ FLYING = 14,
+ LANDING = 15,
+ ENDLANDING = 16,
+ HELILANDING = 17,
+ HELIENDLANDING = 18,
+ TERM7 = 19,
+ TERM8 = 20,
+ HELIPAD3 = 21,
+ HELIPAD4 = 22
};
+// this maps the terminal to its corresponding state and block flag
+// currently set for 10 terms, 4 helipads
+static const byte _airport_terminal_state[] = {2, 3, 4, 5, 6, 7, 19, 20, 0, 0, 8, 9, 21, 22};
+static const byte _airport_terminal_flag[] = {0, 1, 2, 3, 4, 5, 22, 23, 0, 0, 6, 7, 24, 25};
+
/* Movement Blocks on Airports */
// blocks (eg_airport_flags)
enum {
@@ -86,7 +99,24 @@ enum {
TERM_GROUP2_EXIT1_block = 1 << 19,
TERM_GROUP2_EXIT2_block = 1 << 20,
PRE_HELIPAD_block = 1 << 21,
- NOTHING_block = 1 << 30,
+
+// blocks for new airports
+ TERM7_block = 1 << 22,
+ TERM8_block = 1 << 23,
+ TERM9_block = 1 << 24,
+ HELIPAD3_block = 1 << 24,
+ TERM10_block = 1 << 25,
+ HELIPAD4_block = 1 << 25,
+ HANGAR1_AREA_block = 1 << 26,
+ OUT_WAY2_block = 1 << 27,
+ IN_WAY2_block = 1 << 28,
+ RUNWAY_IN2_block = 1 << 29,
+ RUNWAY_OUT2_block = 1 << 10, // note re-uses TAXIWAY_BUSY
+ HELIPAD_GROUP_block = 1 << 13, // note re-uses AIRPORT_ENTRANCE
+ OUT_WAY_block2 = 1 << 31,
+// end of new blocks
+
+ NOTHING_block = 1 << 30
};
typedef struct AirportMovingData {