OpenTTD Source  20241121-master-g67a0fccfad
airport_movement.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef AIRPORT_MOVEMENT_H
11 #define AIRPORT_MOVEMENT_H
12 
13 
19  uint8_t position;
20  uint8_t heading;
21  uint64_t block;
22  uint8_t next;
23 };
24 
27 
35 #define AMD(x, y, flags, dir) { x, y, flags, dir }
36 
41  AMD( 96, 96, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ),
43 };
44 
47  AMD( 53, 3, AMED_EXACTPOS, DIR_SE), // 00 In Hangar
48  AMD( 53, 27, 0, DIR_N ), // 01 Taxi to right outside depot
49  AMD( 32, 23, AMED_EXACTPOS, DIR_NW), // 02 Terminal 1
50  AMD( 10, 23, AMED_EXACTPOS, DIR_NW), // 03 Terminal 2
51  AMD( 43, 37, 0, DIR_N ), // 04 Going towards terminal 2
52  AMD( 24, 37, 0, DIR_N ), // 05 Going towards terminal 2
53  AMD( 53, 37, 0, DIR_N ), // 06 Going for takeoff
54  AMD( 61, 40, AMED_EXACTPOS, DIR_NE), // 07 Taxi to start of runway (takeoff)
55  AMD( 3, 40, AMED_NOSPDCLAMP, DIR_N ), // 08 Accelerate to end of runway
56  AMD( -79, 40, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 09 Take off
57  AMD( 177, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 10 Fly to landing position in air
58  AMD( 56, 40, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 11 Going down for land
59  AMD( 3, 40, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 12 Just landed, brake until end of runway
60  AMD( 7, 40, 0, DIR_N ), // 13 Just landed, turn around and taxi 1 square
61  AMD( 53, 40, 0, DIR_N ), // 14 Taxi from runway to crossing
62  AMD( 1, 193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 15 Fly around waiting for a landing spot (north-east)
63  AMD( 1, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Fly around waiting for a landing spot (north-west)
64  AMD( 257, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 17 Fly around waiting for a landing spot (south-west)
65  AMD( 273, 47, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 18 Fly around waiting for a landing spot (south)
66  AMD( 44, 37, AMED_HELI_RAISE, DIR_N ), // 19 Helicopter takeoff
67  AMD( 44, 40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 20 In position above landing spot helicopter
68  AMD( 44, 40, AMED_HELI_LOWER, DIR_N ), // 21 Helicopter landing
69 };
70 
73  AMD( 69, 3, AMED_EXACTPOS, DIR_SE), // 00 In Hangar
74  AMD( 72, 22, 0, DIR_N ), // 01 Taxi to right outside depot
75  AMD( 8, 22, AMED_EXACTPOS, DIR_SW), // 02 Taxi to right outside depot
76  AMD( 24, 36, AMED_EXACTPOS, DIR_SE), // 03 Terminal 1
77  AMD( 40, 36, AMED_EXACTPOS, DIR_SE), // 04 Terminal 2
78  AMD( 56, 36, AMED_EXACTPOS, DIR_SE), // 05 Terminal 3
79  AMD( 40, 8, AMED_EXACTPOS, DIR_NE), // 06 Helipad 1
80  AMD( 56, 8, AMED_EXACTPOS, DIR_NE), // 07 Helipad 2
81  AMD( 24, 22, 0, DIR_SW), // 08 Taxiing
82  AMD( 40, 22, 0, DIR_SW), // 09 Taxiing
83  AMD( 56, 22, 0, DIR_SW), // 10 Taxiing
84  AMD( 72, 40, 0, DIR_SE), // 11 Airport OUTWAY
85  AMD( 72, 54, AMED_EXACTPOS, DIR_NE), // 12 Accelerate to end of runway
86  AMD( 7, 54, AMED_NOSPDCLAMP, DIR_N ), // 13 Release control of runway, for smoother movement
87  AMD( 5, 54, AMED_NOSPDCLAMP, DIR_N ), // 14 End of runway
88  AMD( -79, 54, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 15 Take off
89  AMD( 145, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Fly to landing position in air
90  AMD( 73, 54, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 17 Going down for land
91  AMD( 3, 54, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 18 Just landed, brake until end of runway
92  AMD( 12, 54, AMED_SLOWTURN, DIR_NW), // 19 Just landed, turn around and taxi
93  AMD( 8, 32, 0, DIR_NW), // 20 Taxi from runway to crossing
94  AMD( 1, 149, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (north-east)
95  AMD( 1, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 22 Fly around waiting for a landing spot (north-west)
96  AMD( 193, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 Fly around waiting for a landing spot (south-west)
97  AMD( 225, 62, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 24 Fly around waiting for a landing spot (south)
98  /* Helicopter */
99  AMD( 80, 0, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Bufferspace before helipad
100  AMD( 80, 0, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Bufferspace before helipad
101  AMD( 32, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Get in position for Helipad1
102  AMD( 48, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Get in position for Helipad2
103  AMD( 32, 8, AMED_HELI_LOWER, DIR_N ), // 29 Land at Helipad1
104  AMD( 48, 8, AMED_HELI_LOWER, DIR_N ), // 30 Land at Helipad2
105  AMD( 32, 8, AMED_HELI_RAISE, DIR_N ), // 31 Takeoff Helipad1
106  AMD( 48, 8, AMED_HELI_RAISE, DIR_N ), // 32 Takeoff Helipad2
107  AMD( 64, 22, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 33 Go to position for Hangarentrance in air
108  AMD( 64, 22, AMED_HELI_LOWER, DIR_N ), // 34 Land in front of hangar
109  AMD( 40, 8, AMED_EXACTPOS, DIR_N ), // 35 pre-helitakeoff helipad 1
110  AMD( 56, 8, AMED_EXACTPOS, DIR_N ), // 36 pre-helitakeoff helipad 2
111  AMD( 64, 25, AMED_HELI_RAISE, DIR_N ), // 37 Take off in front of hangar
112 };
113 
116  AMD( 85, 3, AMED_EXACTPOS, DIR_SE), // 00 In Hangar
117  AMD( 85, 22, 0, DIR_N ), // 01 Taxi to right outside depot
118  AMD( 26, 41, AMED_EXACTPOS, DIR_SW), // 02 Terminal 1
119  AMD( 56, 22, AMED_EXACTPOS, DIR_SE), // 03 Terminal 2
120  AMD( 38, 8, AMED_EXACTPOS, DIR_SW), // 04 Terminal 3
121  AMD( 65, 6, 0, DIR_N ), // 05 Taxi to right in infront of terminal 2/3
122  AMD( 80, 27, 0, DIR_N ), // 06 Taxiway terminals 2-3
123  AMD( 44, 63, 0, DIR_N ), // 07 Taxi to Airport center
124  AMD( 58, 71, 0, DIR_N ), // 08 Towards takeoff
125  AMD( 72, 85, 0, DIR_N ), // 09 Taxi to runway (takeoff)
126  AMD( 89, 85, AMED_EXACTPOS, DIR_NE), // 10 Taxi to start of runway (takeoff)
127  AMD( 3, 85, AMED_NOSPDCLAMP, DIR_N ), // 11 Accelerate to end of runway
128  AMD( -79, 85, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 12 Take off
129  AMD( 177, 87, AMED_HOLD | AMED_SLOWTURN, DIR_N ), // 13 Fly to landing position in air
130  AMD( 89, 87, AMED_HOLD | AMED_LAND, DIR_N ), // 14 Going down for land
131  AMD( 20, 87, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 15 Just landed, brake until end of runway
132  AMD( 20, 87, 0, DIR_N ), // 16 Just landed, turn around and taxi 1 square // NOT USED
133  AMD( 36, 71, 0, DIR_N ), // 17 Taxi from runway to crossing
134  AMD( 160, 87, AMED_HOLD | AMED_SLOWTURN, DIR_N ), // 18 Fly around waiting for a landing spot (north-east)
135  AMD( 140, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 19 Final approach fix
136  AMD( 257, 1, AMED_HOLD | AMED_SLOWTURN, DIR_N ), // 20 Fly around waiting for a landing spot (south-west)
137  AMD( 273, 49, AMED_HOLD | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (south)
138  AMD( 44, 63, AMED_HELI_RAISE, DIR_N ), // 22 Helicopter takeoff
139  AMD( 28, 74, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 In position above landing spot helicopter
140  AMD( 28, 74, AMED_HELI_LOWER, DIR_N ), // 24 Helicopter landing
141  AMD( 145, 1, AMED_HOLD | AMED_SLOWTURN, DIR_N ), // 25 Fly around waiting for a landing spot (north-west)
142  AMD( -32, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Initial approach fix (north)
143  AMD( 300, -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Initial approach fix (south)
144  AMD( 140, -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Intermediate Approach fix (south), IAF (west)
145  AMD( -32, 120, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 29 Initial approach fix (east)
146 };
147 
150  AMD( 85, 3, AMED_EXACTPOS, DIR_SE), // 00 In Hangar
151  AMD( 85, 22, 0, DIR_N ), // 01 Taxi to right outside depot
152  AMD( 26, 41, AMED_EXACTPOS, DIR_SW), // 02 Terminal 1
153  AMD( 56, 22, AMED_EXACTPOS, DIR_SE), // 03 Terminal 2
154  AMD( 38, 8, AMED_EXACTPOS, DIR_SW), // 04 Terminal 3
155  AMD( 65, 6, 0, DIR_N ), // 05 Taxi to right in infront of terminal 2/3
156  AMD( 80, 27, 0, DIR_N ), // 06 Taxiway terminals 2-3
157  AMD( 49, 58, 0, DIR_N ), // 07 Taxi to Airport center
158  AMD( 72, 58, 0, DIR_N ), // 08 Towards takeoff
159  AMD( 72, 69, 0, DIR_N ), // 09 Taxi to runway (takeoff)
160  AMD( 89, 69, AMED_EXACTPOS, DIR_NE), // 10 Taxi to start of runway (takeoff)
161  AMD( 3, 69, AMED_NOSPDCLAMP, DIR_N ), // 11 Accelerate to end of runway
162  AMD( -79, 69, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 12 Take off
163  AMD( 177, 85, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 13 Fly to landing position in air
164  AMD( 89, 85, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 14 Going down for land
165  AMD( 3, 85, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 15 Just landed, brake until end of runway
166  AMD( 21, 85, 0, DIR_N ), // 16 Just landed, turn around and taxi 1 square
167  AMD( 21, 69, 0, DIR_N ), // 17 On Runway-out taxiing to In-Way
168  AMD( 21, 58, AMED_EXACTPOS, DIR_SW), // 18 Taxi from runway to crossing
169  AMD( 1, 193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 19 Fly around waiting for a landing spot (north-east)
170  AMD( 1, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 20 Fly around waiting for a landing spot (north-west)
171  AMD( 257, 1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (south-west)
172  AMD( 273, 49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 22 Fly around waiting for a landing spot (south)
173  AMD( 44, 58, 0, DIR_N ), // 23 Helicopter takeoff spot on ground (to clear airport sooner)
174  AMD( 44, 63, AMED_HELI_RAISE, DIR_N ), // 24 Helicopter takeoff
175  AMD( 15, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Get in position above landing spot helicopter
176  AMD( 15, 54, AMED_HELI_LOWER, DIR_N ), // 26 Helicopter landing
177  AMD( 21, 58, AMED_EXACTPOS, DIR_SW), // 27 Transitions after landing to on-ground movement
178 };
179 
182  AMD( 7, 55, AMED_EXACTPOS, DIR_SE), // 00 In Hangar 1
183  AMD( 100, 21, AMED_EXACTPOS, DIR_SE), // 01 In Hangar 2
184  AMD( 7, 70, 0, DIR_N ), // 02 Taxi to right outside depot (Hangar 1)
185  AMD( 100, 36, 0, DIR_N ), // 03 Taxi to right outside depot (Hangar 2)
186  AMD( 38, 70, AMED_EXACTPOS, DIR_SW), // 04 Terminal 1
187  AMD( 38, 54, AMED_EXACTPOS, DIR_SW), // 05 Terminal 2
188  AMD( 38, 38, AMED_EXACTPOS, DIR_SW), // 06 Terminal 3
189  AMD( 70, 70, AMED_EXACTPOS, DIR_NE), // 07 Terminal 4
190  AMD( 70, 54, AMED_EXACTPOS, DIR_NE), // 08 Terminal 5
191  AMD( 70, 38, AMED_EXACTPOS, DIR_NE), // 09 Terminal 6
192  AMD( 104, 71, AMED_EXACTPOS, DIR_NE), // 10 Helipad 1
193  AMD( 104, 55, AMED_EXACTPOS, DIR_NE), // 11 Helipad 2
194  AMD( 22, 87, 0, DIR_N ), // 12 Towards Terminals 4/5/6, Helipad 1/2
195  AMD( 60, 87, 0, DIR_N ), // 13 Towards Terminals 4/5/6, Helipad 1/2
196  AMD( 66, 87, 0, DIR_N ), // 14 Towards Terminals 4/5/6, Helipad 1/2
197  AMD( 86, 87, AMED_EXACTPOS, DIR_NW), // 15 Towards Terminals 4/5/6, Helipad 1/2
198  AMD( 86, 70, 0, DIR_N ), // 16 In Front of Terminal 4 / Helipad 1
199  AMD( 86, 54, 0, DIR_N ), // 17 In Front of Terminal 5 / Helipad 2
200  AMD( 86, 38, 0, DIR_N ), // 18 In Front of Terminal 6
201  AMD( 86, 22, 0, DIR_N ), // 19 Towards Terminals Takeoff (Taxiway)
202  AMD( 66, 22, 0, DIR_N ), // 20 Towards Terminals Takeoff (Taxiway)
203  AMD( 60, 22, 0, DIR_N ), // 21 Towards Terminals Takeoff (Taxiway)
204  AMD( 38, 22, 0, DIR_N ), // 22 Towards Terminals Takeoff (Taxiway)
205  AMD( 22, 70, 0, DIR_N ), // 23 In Front of Terminal 1
206  AMD( 22, 58, 0, DIR_N ), // 24 In Front of Terminal 2
207  AMD( 22, 38, 0, DIR_N ), // 25 In Front of Terminal 3
208  AMD( 22, 22, AMED_EXACTPOS, DIR_NW), // 26 Going for Takeoff
209  AMD( 22, 6, 0, DIR_N ), // 27 On Runway-out, prepare for takeoff
210  AMD( 3, 6, AMED_EXACTPOS, DIR_SW), // 28 Accelerate to end of runway
211  AMD( 60, 6, AMED_NOSPDCLAMP, DIR_N ), // 29 Release control of runway, for smoother movement
212  AMD( 105, 6, AMED_NOSPDCLAMP, DIR_N ), // 30 End of runway
213  AMD( 190, 6, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 31 Take off
214  AMD( 193, 104, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 32 Fly to landing position in air
215  AMD( 105, 104, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 33 Going down for land
216  AMD( 3, 104, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 34 Just landed, brake until end of runway
217  AMD( 12, 104, AMED_SLOWTURN, DIR_N ), // 35 Just landed, turn around and taxi 1 square
218  AMD( 7, 84, 0, DIR_N ), // 36 Taxi from runway to crossing
219  AMD( 1, 209, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 37 Fly around waiting for a landing spot (north-east)
220  AMD( 1, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 38 Fly around waiting for a landing spot (north-west)
221  AMD( 273, 6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 39 Fly around waiting for a landing spot (south-west)
222  AMD( 305, 81, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 40 Fly around waiting for a landing spot (south)
223  /* Helicopter */
224  AMD( 128, 80, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 41 Bufferspace before helipad
225  AMD( 128, 80, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 42 Bufferspace before helipad
226  AMD( 96, 71, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 43 Get in position for Helipad1
227  AMD( 96, 55, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 44 Get in position for Helipad2
228  AMD( 96, 71, AMED_HELI_LOWER, DIR_N ), // 45 Land at Helipad1
229  AMD( 96, 55, AMED_HELI_LOWER, DIR_N ), // 46 Land at Helipad2
230  AMD( 104, 71, AMED_HELI_RAISE, DIR_N ), // 47 Takeoff Helipad1
231  AMD( 104, 55, AMED_HELI_RAISE, DIR_N ), // 48 Takeoff Helipad2
232  AMD( 104, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 49 Go to position for Hangarentrance in air
233  AMD( 104, 32, AMED_HELI_LOWER, DIR_N ), // 50 Land in HANGAR2_AREA to go to hangar
234  AMD( 7, 70, AMED_HELI_RAISE, DIR_N ), // 51 Takeoff from HANGAR1_AREA
235  AMD( 100, 36, AMED_HELI_RAISE, DIR_N ), // 52 Takeoff from HANGAR2_AREA
236 };
237 
240  AMD( 8, 87, AMED_EXACTPOS, DIR_SE), // 00 In Hangar 1
241  AMD( 136, 72, AMED_EXACTPOS, DIR_SE), // 01 In Hangar 2
242  AMD( 8, 104, 0, DIR_N ), // 02 Taxi to right outside depot 1
243  AMD( 136, 88, 0, DIR_N ), // 03 Taxi to right outside depot 2
244  AMD( 56, 120, AMED_EXACTPOS, DIR_W ), // 04 Terminal 1
245  AMD( 56, 104, AMED_EXACTPOS, DIR_SW), // 05 Terminal 2
246  AMD( 56, 88, AMED_EXACTPOS, DIR_SW), // 06 Terminal 3
247  AMD( 56, 72, AMED_EXACTPOS, DIR_SW), // 07 Terminal 4
248  AMD( 88, 120, AMED_EXACTPOS, DIR_N ), // 08 Terminal 5
249  AMD( 88, 104, AMED_EXACTPOS, DIR_NE), // 09 Terminal 6
250  AMD( 88, 88, AMED_EXACTPOS, DIR_NE), // 10 Terminal 7
251  AMD( 88, 72, AMED_EXACTPOS, DIR_NE), // 11 Terminal 8
252  AMD( 88, 56, AMED_EXACTPOS, DIR_SE), // 12 Helipad 1
253  AMD( 72, 56, AMED_EXACTPOS, DIR_NE), // 13 Helipad 2
254  AMD( 40, 136, 0, DIR_N ), // 14 Term group 2 enter 1 a
255  AMD( 56, 136, 0, DIR_N ), // 15 Term group 2 enter 1 b
256  AMD( 88, 136, 0, DIR_N ), // 16 Term group 2 enter 2 a
257  AMD( 104, 136, 0, DIR_N ), // 17 Term group 2 enter 2 b
258  AMD( 104, 120, 0, DIR_N ), // 18 Term group 2 - opp term 5
259  AMD( 104, 104, 0, DIR_N ), // 19 Term group 2 - opp term 6 & exit2
260  AMD( 104, 88, 0, DIR_N ), // 20 Term group 2 - opp term 7 & hangar area 2
261  AMD( 104, 72, 0, DIR_N ), // 21 Term group 2 - opp term 8
262  AMD( 104, 56, 0, DIR_N ), // 22 Taxi Term group 2 exit a
263  AMD( 104, 40, 0, DIR_N ), // 23 Taxi Term group 2 exit b
264  AMD( 56, 40, 0, DIR_N ), // 24 Term group 2 exit 2a
265  AMD( 40, 40, 0, DIR_N ), // 25 Term group 2 exit 2b
266  AMD( 40, 120, 0, DIR_N ), // 26 Term group 1 - opp term 1
267  AMD( 40, 104, 0, DIR_N ), // 27 Term group 1 - opp term 2 & hangar area 1
268  AMD( 40, 88, 0, DIR_N ), // 28 Term group 1 - opp term 3
269  AMD( 40, 72, 0, DIR_N ), // 29 Term group 1 - opp term 4
270  AMD( 18, 72, 0, DIR_NW), // 30 Outway 1
271  AMD( 8, 40, 0, DIR_NW), // 31 Airport OUTWAY
272  AMD( 8, 24, AMED_EXACTPOS, DIR_SW), // 32 Accelerate to end of runway
273  AMD( 119, 24, AMED_NOSPDCLAMP, DIR_N ), // 33 Release control of runway, for smoother movement
274  AMD( 117, 24, AMED_NOSPDCLAMP, DIR_N ), // 34 End of runway
275  AMD( 197, 24, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 35 Take off
276  AMD( 254, 84, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 36 Flying to landing position in air
277  AMD( 117, 168, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 37 Going down for land
278  AMD( 8, 168, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 38 Just landed, brake until end of runway
279  AMD( 8, 168, 0, DIR_N ), // 39 Just landed, turn around and taxi
280  AMD( 8, 144, 0, DIR_NW), // 40 Taxi from runway
281  AMD( 8, 128, 0, DIR_NW), // 41 Taxi from runway
282  AMD( 8, 120, AMED_EXACTPOS, DIR_NW), // 42 Airport entrance
283  AMD( 56, 344, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 43 Fly around waiting for a landing spot (north-east)
284  AMD( -200, 88, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 44 Fly around waiting for a landing spot (north-west)
285  AMD( 56, -168, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 45 Fly around waiting for a landing spot (south-west)
286  AMD( 312, 88, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 46 Fly around waiting for a landing spot (south)
287  /* Helicopter */
288  AMD( 96, 40, AMED_NOSPDCLAMP, DIR_N ), // 47 Bufferspace before helipad
289  AMD( 96, 40, AMED_NOSPDCLAMP, DIR_N ), // 48 Bufferspace before helipad
290  AMD( 82, 54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 49 Get in position for Helipad1
291  AMD( 64, 56, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 50 Get in position for Helipad2
292  AMD( 81, 55, AMED_HELI_LOWER, DIR_N ), // 51 Land at Helipad1
293  AMD( 64, 56, AMED_HELI_LOWER, DIR_N ), // 52 Land at Helipad2
294  AMD( 80, 56, AMED_HELI_RAISE, DIR_N ), // 53 Takeoff Helipad1
295  AMD( 64, 56, AMED_HELI_RAISE, DIR_N ), // 54 Takeoff Helipad2
296  AMD( 136, 96, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 55 Go to position for Hangarentrance in air
297  AMD( 136, 96, AMED_HELI_LOWER, DIR_N ), // 56 Land in front of hangar2
298  AMD( 126, 104, 0, DIR_SE), // 57 Outway 2
299  AMD( 136, 136, 0, DIR_NE), // 58 Airport OUTWAY 2
300  AMD( 136, 152, AMED_EXACTPOS, DIR_NE), // 59 Accelerate to end of runway2
301  AMD( 16, 152, AMED_NOSPDCLAMP, DIR_N ), // 60 Release control of runway2, for smoother movement
302  AMD( 20, 152, AMED_NOSPDCLAMP, DIR_N ), // 61 End of runway2
303  AMD( -56, 152, AMED_NOSPDCLAMP | AMED_TAKEOFF, DIR_N ), // 62 Take off2
304  AMD( 24, 8, AMED_NOSPDCLAMP | AMED_LAND, DIR_N ), // 63 Going down for land2
305  AMD( 136, 8, AMED_NOSPDCLAMP | AMED_BRAKE, DIR_N ), // 64 Just landed, brake until end of runway2in
306  AMD( 136, 8, 0, DIR_N ), // 65 Just landed, turn around and taxi
307  AMD( 136, 24, 0, DIR_SE), // 66 Taxi from runway 2in
308  AMD( 136, 40, 0, DIR_SE), // 67 Taxi from runway 2in
309  AMD( 136, 56, AMED_EXACTPOS, DIR_NE), // 68 Airport entrance2
310  AMD( -56, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 69 Fly to landing position in air2
311  AMD( 88, 40, 0, DIR_N ), // 70 Taxi Term group 2 exit - opp heli1
312  AMD( 72, 40, 0, DIR_N ), // 71 Taxi Term group 2 exit - opp heli2
313  AMD( 88, 57, AMED_EXACTPOS, DIR_SE), // 72 pre-helitakeoff helipad 1
314  AMD( 71, 56, AMED_EXACTPOS, DIR_NE), // 73 pre-helitakeoff helipad 2
315  AMD( 8, 120, AMED_HELI_RAISE, DIR_N ), // 74 Helitakeoff outside depot 1
316  AMD( 136, 104, AMED_HELI_RAISE, DIR_N ), // 75 Helitakeoff outside depot 2
317  AMD( 197, 168, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 76 Fly to landing position in air1
318 };
319 
320 
323  AMD( 5, 9, AMED_EXACTPOS, DIR_NE), // 0 - At heliport terminal
324  AMD( 2, 9, AMED_HELI_RAISE, DIR_N ), // 1 - Take off (play sound)
325  AMD( -3, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 - In position above landing spot helicopter
326  AMD( -3, 9, AMED_HELI_LOWER, DIR_N ), // 3 - Land
327  AMD( 2, 9, 0, DIR_N ), // 4 - Goto terminal on ground
328  AMD( -31, 59, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - Circle #1 (north-east)
329  AMD( -31, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - Circle #2 (north-west)
330  AMD( 49, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 7 - Circle #3 (south-west)
331  AMD( 70, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 8 - Circle #4 (south)
332 };
333 
336  AMD( 24, 4, AMED_EXACTPOS, DIR_NE), // 0 - At depot
337  AMD( 24, 28, 0, DIR_N ), // 1 Taxi to right outside depot
338  AMD( 5, 38, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 Flying
339  AMD( -15, -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 3 - Circle #1 (north-east)
340  AMD( -15, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 4 - Circle #2 (north-west)
341  AMD( 49, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - Circle #3 (south-west)
342  AMD( 49, -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - Circle #4 (south-east)
343  AMD( 8, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 7 - PreHelipad
344  AMD( 8, 32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 8 - Helipad
345  AMD( 8, 16, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 9 - Land
346  AMD( 8, 16, AMED_HELI_LOWER, DIR_NW), // 10 - Land
347  AMD( 8, 24, AMED_HELI_RAISE, DIR_N ), // 11 - Take off (play sound)
348  AMD( 32, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 12 Air to above hangar area
349  AMD( 32, 24, AMED_HELI_LOWER, DIR_NW), // 13 Taxi to right outside depot
350  AMD( 8, 24, AMED_EXACTPOS, DIR_NW), // 14 - on helipad1
351  AMD( 24, 28, AMED_HELI_RAISE, DIR_N ), // 15 Takeoff right outside depot
352  AMD( 8, 24, AMED_HELI_RAISE, DIR_SW), // 16 - Take off (play sound)
353  AMD( 8, 24, AMED_SLOWTURN | AMED_EXACTPOS, DIR_E ), // 17 - turn on helipad1 for takeoff
354 };
355 
358  AMD( 8, 3, AMED_EXACTPOS, DIR_SE), // 00 In Hangar2
359  AMD( 8, 22, 0, DIR_N ), // 01 outside hangar 2
360  AMD( 116, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 02 Fly to landing position in air
361  AMD( 14, 22, AMED_HELI_RAISE, DIR_N ), // 03 Helitakeoff outside hangar1(play sound)
362  AMD( 24, 22, 0, DIR_N ), // 04 taxiing
363  AMD( 40, 22, 0, DIR_N ), // 05 taxiing
364  AMD( 40, 8, AMED_EXACTPOS, DIR_NE), // 06 Helipad 1
365  AMD( 56, 8, AMED_EXACTPOS, DIR_NE), // 07 Helipad 2
366  AMD( 56, 24, AMED_EXACTPOS, DIR_NE), // 08 Helipad 3
367  AMD( 40, 8, AMED_EXACTPOS, DIR_N ), // 09 pre-helitakeoff helipad 1
368  AMD( 56, 8, AMED_EXACTPOS, DIR_N ), // 10 pre-helitakeoff helipad 2
369  AMD( 56, 24, AMED_EXACTPOS, DIR_N ), // 11 pre-helitakeoff helipad 3
370  AMD( 32, 8, AMED_HELI_RAISE, DIR_N ), // 12 Takeoff Helipad1
371  AMD( 48, 8, AMED_HELI_RAISE, DIR_N ), // 13 Takeoff Helipad2
372  AMD( 48, 24, AMED_HELI_RAISE, DIR_N ), // 14 Takeoff Helipad3
373  AMD( 84, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 15 Bufferspace before helipad
374  AMD( 68, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Bufferspace before helipad
375  AMD( 32, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 17 Get in position for Helipad1
376  AMD( 48, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 18 Get in position for Helipad2
377  AMD( 48, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NE), // 19 Get in position for Helipad3
378  AMD( 40, 8, AMED_HELI_LOWER, DIR_N ), // 20 Land at Helipad1
379  AMD( 48, 8, AMED_HELI_LOWER, DIR_N ), // 21 Land at Helipad2
380  AMD( 48, 24, AMED_HELI_LOWER, DIR_N ), // 22 Land at Helipad3
381  AMD( 0, 22, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 Go to position for Hangarentrance in air
382  AMD( 0, 22, AMED_HELI_LOWER, DIR_N ), // 24 Land in front of hangar
383  AMD( 148, -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Fly around waiting for a landing spot (south-east)
384  AMD( 148, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Fly around waiting for a landing spot (south-west)
385  AMD( 132, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Fly around waiting for a landing spot (south-west)
386  AMD( 100, 24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Fly around waiting for a landing spot (north-east)
387  AMD( 84, 8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 29 Fly around waiting for a landing spot (south-east)
388  AMD( 84, -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 30 Fly around waiting for a landing spot (south-west)
389  AMD( 100, -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 31 Fly around waiting for a landing spot (north-west)
390  AMD( 132, -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 32 Fly around waiting for a landing spot (north-east)
391 };
392 
395  AMD( 31, 9, AMED_EXACTPOS, DIR_NE), // 0 - At oilrig terminal
396  AMD( 28, 9, AMED_HELI_RAISE, DIR_N ), // 1 - Take off (play sound)
397  AMD( 23, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 - In position above landing spot helicopter
398  AMD( 23, 9, AMED_HELI_LOWER, DIR_N ), // 3 - Land
399  AMD( 28, 9, 0, DIR_N ), // 4 - Goto terminal on ground
400  AMD( -31, 69, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - circle #1 (north-east)
401  AMD( -31, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - circle #2 (north-west)
402  AMD( 69, -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 7 - circle #3 (south-west)
403  AMD( 69, 9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 8 - circle #4 (south)
404 };
405 
406 #undef AMD
407 
410 static const uint8_t _airport_entries_dummy[] = {0, 1, 2, 3};
411 static const AirportFTAbuildup _airport_fta_dummy[] = {
412  { 0, TO_ALL, 0, 3},
413  { 1, TO_ALL, 0, 0},
414  { 2, TO_ALL, 0, 1},
415  { 3, TO_ALL, 0, 2},
416  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
417 };
418 
419 /* First element of terminals array tells us how many depots there are (to know size of array)
420  * this may be changed later when airports are moved to external file */
421 static const HangarTileTable _airport_depots_country[] = { {{3, 0}, DIR_SE, 0} };
422 static const uint8_t _airport_terminal_country[] = {1, 2};
423 static const uint8_t _airport_entries_country[] = {16, 15, 18, 17};
424 static const AirportFTAbuildup _airport_fta_country[] = {
425  { 0, HANGAR, NOTHING_block, 1 },
426  { 1, TERMGROUP, AIRPORT_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM1, TERM1_block, 2 }, { 1, TERM2, 0, 4 }, { 1, HELITAKEOFF, 0, 19 }, { 1, TO_ALL, 0, 6 },
427  { 2, TERM1, TERM1_block, 1 },
428  { 3, TERM2, TERM2_block, 5 },
429  { 4, TERMGROUP, AIRPORT_BUSY_block, 0 }, { 4, TERM2, 0, 5 }, { 4, HANGAR, 0, 1 }, { 4, TAKEOFF, 0, 6 }, { 4, HELITAKEOFF, 0, 1 },
430  { 5, TERMGROUP, AIRPORT_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TO_ALL, 0, 4 },
431  { 6, 0, AIRPORT_BUSY_block, 7 },
432  /* takeoff */
433  { 7, TAKEOFF, AIRPORT_BUSY_block, 8 },
434  { 8, STARTTAKEOFF, NOTHING_block, 9 },
435  { 9, ENDTAKEOFF, NOTHING_block, 0 },
436  /* landing */
437  { 10, FLYING, NOTHING_block, 15 }, { 10, LANDING, 0, 11 }, { 10, HELILANDING, 0, 20 },
438  { 11, LANDING, AIRPORT_BUSY_block, 12 },
439  { 12, TO_ALL, AIRPORT_BUSY_block, 13 },
440  { 13, ENDLANDING, AIRPORT_BUSY_block, 14 }, { 13, TERM2, 0, 5 }, { 13, TO_ALL, 0, 14 },
441  { 14, TO_ALL, AIRPORT_BUSY_block, 1 },
442  /* In air */
443  { 15, TO_ALL, NOTHING_block, 16 },
444  { 16, TO_ALL, NOTHING_block, 17 },
445  { 17, TO_ALL, NOTHING_block, 18 },
446  { 18, TO_ALL, NOTHING_block, 10 },
447  { 19, HELITAKEOFF, NOTHING_block, 0 },
448  { 20, HELILANDING, AIRPORT_BUSY_block, 21 },
449  { 21, HELIENDLANDING, AIRPORT_BUSY_block, 1 },
450  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
451 };
452 
453 static const HangarTileTable _airport_depots_commuter[] = { {{4, 0}, DIR_SE, 0} };
454 static const uint8_t _airport_terminal_commuter[] = { 1, 3 };
455 static const uint8_t _airport_entries_commuter[] = {22, 21, 24, 23};
456 static const AirportFTAbuildup _airport_fta_commuter[] = {
457  { 0, HANGAR, NOTHING_block, 1 }, { 0, HELITAKEOFF, TAXIWAY_BUSY_block, 1 }, { 0, TO_ALL, 0, 1 },
458  { 1, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TAKEOFF, 0, 11 }, { 1, TERM1, TAXIWAY_BUSY_block, 10 }, { 1, TERM2, TAXIWAY_BUSY_block, 10 }, { 1, TERM3, TAXIWAY_BUSY_block, 10 }, { 1, HELIPAD1, TAXIWAY_BUSY_block, 10 }, { 1, HELIPAD2, TAXIWAY_BUSY_block, 10 }, { 1, HELITAKEOFF, TAXIWAY_BUSY_block, 37 }, { 1, TO_ALL, 0, 0 },
459  { 2, TERMGROUP, AIRPORT_ENTRANCE_block, 2 }, { 2, HANGAR, 0, 8 }, { 2, TERM1, 0, 8 }, { 2, TERM2, 0, 8 }, { 2, TERM3, 0, 8 }, { 2, HELIPAD1, 0, 8 }, { 2, HELIPAD2, 0, 8 }, { 2, HELITAKEOFF, 0, 8 }, { 2, TO_ALL, 0, 2 },
460  { 3, TERM1, TERM1_block, 8 }, { 3, HANGAR, 0, 8 }, { 3, TAKEOFF, 0, 8 }, { 3, TO_ALL, 0, 3 },
461  { 4, TERM2, TERM2_block, 9 }, { 4, HANGAR, 0, 9 }, { 4, TAKEOFF, 0, 9 }, { 4, TO_ALL, 0, 4 },
462  { 5, TERM3, TERM3_block, 10 }, { 5, HANGAR, 0, 10 }, { 5, TAKEOFF, 0, 10 }, { 5, TO_ALL, 0, 5 },
463  { 6, HELIPAD1, HELIPAD1_block, 6 }, { 6, HANGAR, TAXIWAY_BUSY_block, 9 }, { 6, HELITAKEOFF, 0, 35 },
464  { 7, HELIPAD2, HELIPAD2_block, 7 }, { 7, HANGAR, TAXIWAY_BUSY_block, 10 }, { 7, HELITAKEOFF, 0, 36 },
465  { 8, TERMGROUP, TAXIWAY_BUSY_block, 8 }, { 8, TAKEOFF, TAXIWAY_BUSY_block, 9 }, { 8, HANGAR, TAXIWAY_BUSY_block, 9 }, { 8, TERM1, TERM1_block, 3 }, { 8, TO_ALL, TAXIWAY_BUSY_block, 9 },
466  { 9, TERMGROUP, TAXIWAY_BUSY_block, 9 }, { 9, TAKEOFF, TAXIWAY_BUSY_block, 10 }, { 9, HANGAR, TAXIWAY_BUSY_block, 10 }, { 9, TERM2, TERM2_block, 4 }, { 9, HELIPAD1, HELIPAD1_block, 6 }, { 9, HELITAKEOFF, HELIPAD1_block, 6 }, { 9, TERM1, TAXIWAY_BUSY_block, 8 }, { 9, TO_ALL, TAXIWAY_BUSY_block, 10 },
467  { 10, TERMGROUP, TAXIWAY_BUSY_block, 10 }, { 10, TERM3, TERM3_block, 5 }, { 10, HELIPAD1, 0, 9 }, { 10, HELIPAD2, HELIPAD2_block, 7 }, { 10, HELITAKEOFF, 0, 1 }, { 10, TAKEOFF, TAXIWAY_BUSY_block, 1 }, { 10, HANGAR, TAXIWAY_BUSY_block, 1 }, { 10, TO_ALL, TAXIWAY_BUSY_block, 9 },
468  { 11, TO_ALL, OUT_WAY_block, 12 },
469  /* takeoff */
470  { 12, TAKEOFF, RUNWAY_IN_OUT_block, 13 },
471  { 13, TO_ALL, RUNWAY_IN_OUT_block, 14 },
472  { 14, STARTTAKEOFF, RUNWAY_IN_OUT_block, 15 },
473  { 15, ENDTAKEOFF, NOTHING_block, 0 },
474  /* landing */
475  { 16, FLYING, NOTHING_block, 21 }, { 16, LANDING, IN_WAY_block, 17 }, { 16, HELILANDING, 0, 25 },
476  { 17, LANDING, RUNWAY_IN_OUT_block, 18 },
477  { 18, TO_ALL, RUNWAY_IN_OUT_block, 19 },
478  { 19, TO_ALL, RUNWAY_IN_OUT_block, 20 },
479  { 20, ENDLANDING, IN_WAY_block, 2 },
480  /* In Air */
481  { 21, TO_ALL, NOTHING_block, 22 },
482  { 22, TO_ALL, NOTHING_block, 23 },
483  { 23, TO_ALL, NOTHING_block, 24 },
484  { 24, TO_ALL, NOTHING_block, 16 },
485  /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
486  { 25, HELILANDING, PRE_HELIPAD_block, 26 },
487  { 26, HELIENDLANDING, PRE_HELIPAD_block, 26 }, { 26, HELIPAD1, 0, 27 }, { 26, HELIPAD2, 0, 28 }, { 26, HANGAR, 0, 33 },
488  { 27, TO_ALL, NOTHING_block, 29 }, // helipad1 approach
489  { 28, TO_ALL, NOTHING_block, 30 },
490  /* landing */
491  { 29, TERMGROUP, NOTHING_block, 0 }, { 29, HELIPAD1, HELIPAD1_block, 6 },
492  { 30, TERMGROUP, NOTHING_block, 0 }, { 30, HELIPAD2, HELIPAD2_block, 7 },
493  /* Helicopter -- takeoff */
494  { 31, HELITAKEOFF, NOTHING_block, 0 },
495  { 32, HELITAKEOFF, NOTHING_block, 0 },
496  { 33, TO_ALL, TAXIWAY_BUSY_block, 34 }, // need to go to hangar when waiting in air
497  { 34, TO_ALL, TAXIWAY_BUSY_block, 1 },
498  { 35, TO_ALL, HELIPAD1_block, 31 },
499  { 36, TO_ALL, HELIPAD2_block, 32 },
500  { 37, HELITAKEOFF, NOTHING_block, 0 },
501  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
502 };
503 
504 static const HangarTileTable _airport_depots_city[] = { {{5, 0}, DIR_SE, 0} };
505 static const uint8_t _airport_terminal_city[] = { 1, 3 };
506 static const uint8_t _airport_entries_city[] = {26, 29, 27, 28};
507 static const AirportFTAbuildup _airport_fta_city[] = {
508  { 0, HANGAR, NOTHING_block, 1 }, { 0, TAKEOFF, OUT_WAY_block, 1 }, { 0, TO_ALL, 0, 1 },
509  { 1, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, TO_ALL, 0, 7 }, // for all else, go to 7
510  { 2, TERM1, TERM1_block, 7 }, { 2, TAKEOFF, OUT_WAY_block, 7 }, { 2, TO_ALL, 0, 7 },
511  { 3, TERM2, TERM2_block, 5 }, { 3, TAKEOFF, OUT_WAY_block, 6 }, { 3, TO_ALL, 0, 6 },
512  { 4, TERM3, TERM3_block, 5 }, { 4, TAKEOFF, OUT_WAY_block, 5 }, { 4, TO_ALL, 0, 5 },
513  { 5, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, TO_ALL, 0, 6 },
514  { 6, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, TERM2_block, 3 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, TO_ALL, 0, 7 },
515  { 7, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, OUT_WAY_block, 8 }, { 7, HELITAKEOFF, 0, 22 }, { 7, HANGAR, 0, 1 }, { 7, TO_ALL, 0, 6 },
516  { 8, 0, OUT_WAY_block, 9 },
517  { 9, 0, RUNWAY_IN_OUT_block, 10 },
518  /* takeoff */
519  { 10, TAKEOFF, RUNWAY_IN_OUT_block, 11 },
520  { 11, STARTTAKEOFF, NOTHING_block, 12 },
521  { 12, ENDTAKEOFF, NOTHING_block, 0 },
522  /* landing */
523  { 13, FLYING, NOTHING_block, 18 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 23 },
524  { 14, LANDING, RUNWAY_IN_OUT_block, 15 },
525  { 15, TO_ALL, RUNWAY_IN_OUT_block, 17 },
526  { 16, TO_ALL, RUNWAY_IN_OUT_block, 17 }, // not used, left for compatibility
527  { 17, ENDLANDING, IN_WAY_block, 7 },
528  /* In Air */
529  { 18, TO_ALL, NOTHING_block, 25 },
530  { 19, TO_ALL, NOTHING_block, 20 },
531  { 20, TO_ALL, NOTHING_block, 21 },
532  { 21, TO_ALL, NOTHING_block, 13 },
533  /* helicopter */
534  { 22, HELITAKEOFF, NOTHING_block, 0 },
535  { 23, HELILANDING, IN_WAY_block, 24 },
536  { 24, HELIENDLANDING, IN_WAY_block, 17 },
537  { 25, TO_ALL, NOTHING_block, 20},
538  { 26, TO_ALL, NOTHING_block, 19},
539  { 27, TO_ALL, NOTHING_block, 28},
540  { 28, TO_ALL, NOTHING_block, 19},
541  { 29, TO_ALL, NOTHING_block, 26},
542  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
543 };
544 
545 static const HangarTileTable _airport_depots_metropolitan[] = { {{5, 0}, DIR_SE, 0} };
546 static const uint8_t _airport_terminal_metropolitan[] = { 1, 3 };
547 static const uint8_t _airport_entries_metropolitan[] = {20, 19, 22, 21};
548 static const AirportFTAbuildup _airport_fta_metropolitan[] = {
549  { 0, HANGAR, NOTHING_block, 1 },
550  { 1, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, TO_ALL, 0, 7 }, // for all else, go to 7
551  { 2, TERM1, TERM1_block, 7 },
552  { 3, TERM2, TERM2_block, 6 },
553  { 4, TERM3, TERM3_block, 5 },
554  { 5, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, TO_ALL, 0, 6 },
555  { 6, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, TERM2_block, 3 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, TO_ALL, 0, 7 },
556  { 7, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, 0, 8 }, { 7, HELITAKEOFF, 0, 23 }, { 7, HANGAR, 0, 1 }, { 7, TO_ALL, 0, 6 },
557  { 8, 0, OUT_WAY_block, 9 },
558  { 9, 0, RUNWAY_OUT_block, 10 },
559  /* takeoff */
560  { 10, TAKEOFF, RUNWAY_OUT_block, 11 },
561  { 11, STARTTAKEOFF, NOTHING_block, 12 },
562  { 12, ENDTAKEOFF, NOTHING_block, 0 },
563  /* landing */
564  { 13, FLYING, NOTHING_block, 19 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 25 },
565  { 14, LANDING, RUNWAY_IN_block, 15 },
566  { 15, TO_ALL, RUNWAY_IN_block, 16 },
567  { 16, TERMGROUP, RUNWAY_IN_block, 0 }, { 16, ENDLANDING, IN_WAY_block, 17 },
568  { 17, TERMGROUP, RUNWAY_OUT_block, 0 }, { 17, ENDLANDING, IN_WAY_block, 18 },
569  { 18, ENDLANDING, IN_WAY_block, 27 },
570  /* In Air */
571  { 19, TO_ALL, NOTHING_block, 20 },
572  { 20, TO_ALL, NOTHING_block, 21 },
573  { 21, TO_ALL, NOTHING_block, 22 },
574  { 22, TO_ALL, NOTHING_block, 13 },
575  /* helicopter */
576  { 23, TO_ALL, NOTHING_block, 24 },
577  { 24, HELITAKEOFF, NOTHING_block, 0 },
578  { 25, HELILANDING, IN_WAY_block, 26 },
579  { 26, HELIENDLANDING, IN_WAY_block, 18 },
580  { 27, TERMGROUP, TAXIWAY_BUSY_block, 27 }, { 27, TERM1, TERM1_block, 2 }, { 27, TO_ALL, 0, 7 },
581  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
582 };
583 
584 static const HangarTileTable _airport_depots_international[] = { {{0, 3}, DIR_SE, 0}, {{6, 1}, DIR_SE, 1} };
585 static const uint8_t _airport_terminal_international[] = { 2, 3, 3 };
586 static const uint8_t _airport_entries_international[] = { 38, 37, 40, 39 };
587 static const AirportFTAbuildup _airport_fta_international[] = {
588  { 0, HANGAR, NOTHING_block, 2 }, { 0, TERMGROUP, TERM_GROUP1_block, 0 }, { 0, TERMGROUP, TERM_GROUP2_ENTER1_block, 1 }, { 0, HELITAKEOFF, AIRPORT_ENTRANCE_block, 2 }, { 0, TO_ALL, 0, 2 },
589  { 1, HANGAR, NOTHING_block, 3 }, { 1, TERMGROUP, HANGAR2_AREA_block, 1 }, { 1, HELITAKEOFF, HANGAR2_AREA_block, 3 }, { 1, TO_ALL, 0, 3 },
590  { 2, TERMGROUP, AIRPORT_ENTRANCE_block, 0 }, { 2, HANGAR, 0, 0 }, { 2, TERM4, 0, 12 }, { 2, TERM5, 0, 12 }, { 2, TERM6, 0, 12 }, { 2, HELIPAD1, 0, 12 }, { 2, HELIPAD2, 0, 12 }, { 2, HELITAKEOFF, 0, 51 }, { 2, TO_ALL, 0, 23 },
591  { 3, TERMGROUP, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, HELITAKEOFF, 0, 52 }, { 3, TO_ALL, 0, 18 },
592  { 4, TERM1, TERM1_block, 23 }, { 4, HANGAR, AIRPORT_ENTRANCE_block, 23 }, { 4, TO_ALL, 0, 23 },
593  { 5, TERM2, TERM2_block, 24 }, { 5, HANGAR, AIRPORT_ENTRANCE_block, 24 }, { 5, TO_ALL, 0, 24 },
594  { 6, TERM3, TERM3_block, 25 }, { 6, HANGAR, AIRPORT_ENTRANCE_block, 25 }, { 6, TO_ALL, 0, 25 },
595  { 7, TERM4, TERM4_block, 16 }, { 7, HANGAR, HANGAR2_AREA_block, 16 }, { 7, TO_ALL, 0, 16 },
596  { 8, TERM5, TERM5_block, 17 }, { 8, HANGAR, HANGAR2_AREA_block, 17 }, { 8, TO_ALL, 0, 17 },
597  { 9, TERM6, TERM6_block, 18 }, { 9, HANGAR, HANGAR2_AREA_block, 18 }, { 9, TO_ALL, 0, 18 },
598  { 10, HELIPAD1, HELIPAD1_block, 10 }, { 10, HANGAR, HANGAR2_AREA_block, 16 }, { 10, HELITAKEOFF, 0, 47 },
599  { 11, HELIPAD2, HELIPAD2_block, 11 }, { 11, HANGAR, HANGAR2_AREA_block, 17 }, { 11, HELITAKEOFF, 0, 48 },
600  { 12, TO_ALL, TERM_GROUP2_ENTER1_block, 13 },
601  { 13, TO_ALL, TERM_GROUP2_ENTER1_block, 14 },
602  { 14, TO_ALL, TERM_GROUP2_ENTER2_block, 15 },
603  { 15, TO_ALL, TERM_GROUP2_ENTER2_block, 16 },
604  { 16, TERMGROUP, TERM_GROUP2_block, 0 }, { 16, TERM4, TERM4_block, 7 }, { 16, HELIPAD1, HELIPAD1_block, 10 }, { 16, HELITAKEOFF, HELIPAD1_block, 10 }, { 16, TO_ALL, 0, 17 },
605  { 17, TERMGROUP, TERM_GROUP2_block, 0 }, { 17, TERM5, TERM5_block, 8 }, { 17, TERM4, 0, 16 }, { 17, HELIPAD1, 0, 16 }, { 17, HELIPAD2, HELIPAD2_block, 11 }, { 17, HELITAKEOFF, HELIPAD2_block, 11 }, { 17, TO_ALL, 0, 18 },
606  { 18, TERMGROUP, TERM_GROUP2_block, 0 }, { 18, TERM6, TERM6_block, 9 }, { 18, TAKEOFF, 0, 19 }, { 18, HANGAR, HANGAR2_AREA_block, 3 }, { 18, TO_ALL, 0, 17 },
607  { 19, TO_ALL, TERM_GROUP2_EXIT1_block, 20 },
608  { 20, TO_ALL, TERM_GROUP2_EXIT1_block, 21 },
609  { 21, TO_ALL, TERM_GROUP2_EXIT2_block, 22 },
610  { 22, TO_ALL, TERM_GROUP2_EXIT2_block, 26 },
611  { 23, TERMGROUP, TERM_GROUP1_block, 0 }, { 23, TERM1, TERM1_block, 4 }, { 23, HANGAR, AIRPORT_ENTRANCE_block, 2 }, { 23, TO_ALL, 0, 24 },
612  { 24, TERMGROUP, TERM_GROUP1_block, 0 }, { 24, TERM2, TERM2_block, 5 }, { 24, TERM1, 0, 23 }, { 24, HANGAR, 0, 23 }, { 24, TO_ALL, 0, 25 },
613  { 25, TERMGROUP, TERM_GROUP1_block, 0 }, { 25, TERM3, TERM3_block, 6 }, { 25, TAKEOFF, 0, 26 }, { 25, TO_ALL, 0, 24 },
614  { 26, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 26, TAKEOFF, 0, 27 }, { 26, TO_ALL, 0, 25 },
615  { 27, TO_ALL, OUT_WAY_block, 28 },
616  /* takeoff */
617  { 28, TAKEOFF, OUT_WAY_block, 29 },
618  { 29, TO_ALL, RUNWAY_OUT_block, 30 },
619  { 30, STARTTAKEOFF, NOTHING_block, 31 },
620  { 31, ENDTAKEOFF, NOTHING_block, 0 },
621  /* landing */
622  { 32, FLYING, NOTHING_block, 37 }, { 32, LANDING, 0, 33 }, { 32, HELILANDING, 0, 41 },
623  { 33, LANDING, RUNWAY_IN_block, 34 },
624  { 34, TO_ALL, RUNWAY_IN_block, 35 },
625  { 35, TO_ALL, RUNWAY_IN_block, 36 },
626  { 36, ENDLANDING, IN_WAY_block, 36 }, { 36, TERMGROUP, TERM_GROUP1_block, 0 }, { 36, TERMGROUP, TERM_GROUP2_ENTER1_block, 1 }, { 36, TERM4, 0, 12 }, { 36, TERM5, 0, 12 }, { 36, TERM6, 0, 12 }, { 36, TO_ALL, 0, 2 },
627  /* In Air */
628  { 37, TO_ALL, NOTHING_block, 38 },
629  { 38, TO_ALL, NOTHING_block, 39 },
630  { 39, TO_ALL, NOTHING_block, 40 },
631  { 40, TO_ALL, NOTHING_block, 32 },
632  /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
633  { 41, HELILANDING, PRE_HELIPAD_block, 42 },
634  { 42, HELIENDLANDING, PRE_HELIPAD_block, 42 }, { 42, HELIPAD1, 0, 43 }, { 42, HELIPAD2, 0, 44 }, { 42, HANGAR, 0, 49 },
635  { 43, TO_ALL, NOTHING_block, 45 },
636  { 44, TO_ALL, NOTHING_block, 46 },
637  /* landing */
638  { 45, TERMGROUP, NOTHING_block, 0 }, { 45, HELIPAD1, HELIPAD1_block, 10 },
639  { 46, TERMGROUP, NOTHING_block, 0 }, { 46, HELIPAD2, HELIPAD2_block, 11 },
640  /* Helicopter -- takeoff */
641  { 47, HELITAKEOFF, NOTHING_block, 0 },
642  { 48, HELITAKEOFF, NOTHING_block, 0 },
643  { 49, TO_ALL, HANGAR2_AREA_block, 50 }, // need to go to hangar when waiting in air
644  { 50, TO_ALL, HANGAR2_AREA_block, 3 },
645  { 51, HELITAKEOFF, NOTHING_block, 0 },
646  { 52, HELITAKEOFF, NOTHING_block, 0 },
647  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
648 };
649 
650 /* intercontinental */
651 static const HangarTileTable _airport_depots_intercontinental[] = { {{0, 5}, DIR_SE, 0}, {{8, 4}, DIR_SE, 1} };
652 static const uint8_t _airport_terminal_intercontinental[] = { 2, 4, 4 };
653 static const uint8_t _airport_entries_intercontinental[] = { 44, 43, 46, 45 };
654 static const AirportFTAbuildup _airport_fta_intercontinental[] = {
655  { 0, HANGAR, NOTHING_block, 2 }, { 0, TERMGROUP, HANGAR1_AREA_block | TERM_GROUP1_block, 0 }, { 0, TERMGROUP, HANGAR1_AREA_block | TERM_GROUP1_block, 1 }, { 0, TAKEOFF, HANGAR1_AREA_block | TERM_GROUP1_block, 2 }, { 0, TO_ALL, 0, 2 },
656  { 1, HANGAR, NOTHING_block, 3 }, { 1, TERMGROUP, HANGAR2_AREA_block, 1 }, { 1, TERMGROUP, HANGAR2_AREA_block, 0 }, { 1, TO_ALL, 0, 3 },
657  { 2, TERMGROUP, HANGAR1_AREA_block, 0 }, { 2, TERMGROUP, TERM_GROUP1_block, 0 }, { 2, TERMGROUP, TERM_GROUP1_block, 1 }, { 2, HANGAR, 0, 0 }, { 2, TAKEOFF, TERM_GROUP1_block, 27 }, { 2, TERM5, 0, 26 }, { 2, TERM6, 0, 26 }, { 2, TERM7, 0, 26 }, { 2, TERM8, 0, 26 }, { 2, HELIPAD1, 0, 26 }, { 2, HELIPAD2, 0, 26 }, { 2, HELITAKEOFF, 0, 74 }, { 2, TO_ALL, 0, 27 },
658  { 3, TERMGROUP, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, HELITAKEOFF, 0, 75 }, {3, TAKEOFF, 0, 59}, { 3, TO_ALL, 0, 20 },
659  { 4, TERM1, TERM1_block, 26 }, { 4, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 26 }, { 4, TO_ALL, 0, 26 },
660  { 5, TERM2, TERM2_block, 27 }, { 5, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 27 }, { 5, TO_ALL, 0, 27 },
661  { 6, TERM3, TERM3_block, 28 }, { 6, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 28 }, { 6, TO_ALL, 0, 28 },
662  { 7, TERM4, TERM4_block, 29 }, { 7, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 7, TO_ALL, 0, 29 },
663  { 8, TERM5, TERM5_block, 18 }, { 8, HANGAR, HANGAR2_AREA_block, 18 }, { 8, TO_ALL, 0, 18 },
664  { 9, TERM6, TERM6_block, 19 }, { 9, HANGAR, HANGAR2_AREA_block, 19 }, { 9, TO_ALL, 0, 19 },
665  { 10, TERM7, TERM7_block, 20 }, { 10, HANGAR, HANGAR2_AREA_block, 20 }, { 10, TO_ALL, 0, 20 },
666  { 11, TERM8, TERM8_block, 21 }, { 11, HANGAR, HANGAR2_AREA_block, 21 }, { 11, TO_ALL, 0, 21 },
667  { 12, HELIPAD1, HELIPAD1_block, 12 }, { 12, HANGAR, 0, 70 }, { 12, HELITAKEOFF, 0, 72 },
668  { 13, HELIPAD2, HELIPAD2_block, 13 }, { 13, HANGAR, 0, 71 }, { 13, HELITAKEOFF, 0, 73 },
669  { 14, TO_ALL, TERM_GROUP2_ENTER1_block, 15 },
670  { 15, TO_ALL, TERM_GROUP2_ENTER1_block, 16 },
671  { 16, TO_ALL, TERM_GROUP2_ENTER2_block, 17 },
672  { 17, TO_ALL, TERM_GROUP2_ENTER2_block, 18 },
673  { 18, TERMGROUP, TERM_GROUP2_block, 0 }, { 18, TERM5, TERM5_block, 8 }, { 18, TAKEOFF, 0, 19 }, { 18, HELITAKEOFF, HELIPAD1_block, 19 }, { 18, TO_ALL, TERM_GROUP2_EXIT1_block, 19 },
674  { 19, TERMGROUP, TERM_GROUP2_block, 0 }, { 19, TERM6, TERM6_block, 9 }, { 19, TERM5, 0, 18 }, { 19, TAKEOFF, 0, 57 }, { 19, HELITAKEOFF, HELIPAD1_block, 20 }, { 19, TO_ALL, TERM_GROUP2_EXIT1_block, 20 }, // add exit to runway out 2
675  { 20, TERMGROUP, TERM_GROUP2_block, 0 }, { 20, TERM7, TERM7_block, 10 }, { 20, TERM5, 0, 19 }, { 20, TERM6, 0, 19 }, { 20, HANGAR, HANGAR2_AREA_block, 3 }, { 20, TAKEOFF, 0, 19 }, { 20, TO_ALL, TERM_GROUP2_EXIT1_block, 21 },
676  { 21, TERMGROUP, TERM_GROUP2_block, 0 }, { 21, TERM8, TERM8_block, 11 }, { 21, HANGAR, HANGAR2_AREA_block, 20 }, { 21, TERM5, 0, 20 }, { 21, TERM6, 0, 20 }, { 21, TERM7, 0, 20 }, { 21, TAKEOFF, 0, 20 }, { 21, TO_ALL, TERM_GROUP2_EXIT1_block, 22 },
677  { 22, TERMGROUP, TERM_GROUP2_block, 0 }, { 22, HANGAR, 0, 21 }, { 22, TERM5, 0, 21 }, { 22, TERM6, 0, 21 }, { 22, TERM7, 0, 21 }, { 22, TERM8, 0, 21 }, { 22, TAKEOFF, 0, 21 }, { 22, TO_ALL, 0, 23 },
678  { 23, TO_ALL, TERM_GROUP2_EXIT1_block, 70 },
679  { 24, TO_ALL, TERM_GROUP2_EXIT2_block, 25 },
680  { 25, TERMGROUP, TERM_GROUP2_EXIT2_block, 0 }, { 25, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 25, TO_ALL, 0, 29 },
681  { 26, TERMGROUP, TERM_GROUP1_block, 0 }, { 26, TERM1, TERM1_block, 4 }, { 26, HANGAR, HANGAR1_AREA_block, 27 }, { 26, TERM5, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM6, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM7, TERM_GROUP2_ENTER1_block, 14 }, { 26, TERM8, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELIPAD1, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELIPAD2, TERM_GROUP2_ENTER1_block, 14 }, { 26, HELITAKEOFF, TERM_GROUP2_ENTER1_block, 14 }, { 26, TO_ALL, 0, 27 },
682  { 27, TERMGROUP, TERM_GROUP1_block, 0 }, { 27, TERM2, TERM2_block, 5 }, { 27, HANGAR, HANGAR1_AREA_block, 2 }, { 27, TERM1, 0, 26 }, { 27, TERM5, 0, 26 }, { 27, TERM6, 0, 26 }, { 27, TERM7, 0, 26 }, { 27, TERM8, 0, 26 }, { 27, HELIPAD1, 0, 14 }, { 27, HELIPAD2, 0, 14 }, { 27, TO_ALL, 0, 28 },
683  { 28, TERMGROUP, TERM_GROUP1_block, 0 }, { 28, TERM3, TERM3_block, 6 }, { 28, HANGAR, HANGAR1_AREA_block, 27 }, { 28, TERM1, 0, 27 }, { 28, TERM2, 0, 27 }, { 28, TERM4, 0, 29 }, { 28, TERM5, 0, 14 }, { 28, TERM6, 0, 14 }, { 28, TERM7, 0, 14 }, { 28, TERM8, 0, 14 }, { 28, HELIPAD1, 0, 14 }, { 28, HELIPAD2, 0, 14 }, { 28, TO_ALL, 0, 29 },
684  { 29, TERMGROUP, TERM_GROUP1_block, 0 }, { 29, TERM4, TERM4_block, 7 }, { 29, HANGAR, HANGAR1_AREA_block, 27 }, { 29, TAKEOFF, 0, 30 }, { 29, TO_ALL, 0, 28 },
685  { 30, TO_ALL, OUT_WAY_block2, 31 },
686  { 31, TO_ALL, OUT_WAY_block, 32 },
687  /* takeoff */
688  { 32, TAKEOFF, RUNWAY_OUT_block, 33 },
689  { 33, TO_ALL, RUNWAY_OUT_block, 34 },
690  { 34, STARTTAKEOFF, NOTHING_block, 35 },
691  { 35, ENDTAKEOFF, NOTHING_block, 0 },
692  /* landing */
693  { 36, TO_ALL, 0, 0 },
694  { 37, LANDING, RUNWAY_IN_block, 38 },
695  { 38, TO_ALL, RUNWAY_IN_block, 39 },
696  { 39, TO_ALL, RUNWAY_IN_block, 40 },
697  { 40, ENDLANDING, RUNWAY_IN_block, 41 },
698  { 41, TO_ALL, IN_WAY_block, 42 },
699  { 42, TERMGROUP, IN_WAY_block, 0 }, { 42, TERMGROUP, TERM_GROUP1_block, 0 }, { 42, TERMGROUP, TERM_GROUP1_block, 1 }, { 42, HANGAR, 0, 2 }, { 42, TO_ALL, 0, 26 },
700  /* In Air */
701  { 43, TO_ALL, 0, 44 },
702  { 44, FLYING, 0, 45 }, { 44, HELILANDING, 0, 47 }, { 44, LANDING, 0, 69 }, { 44, TO_ALL, 0, 45 },
703  { 45, TO_ALL, 0, 46 },
704  { 46, FLYING, 0, 43 }, { 46, LANDING, 0, 76 }, { 46, TO_ALL, 0, 43 },
705  /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
706  { 47, HELILANDING, PRE_HELIPAD_block, 48 },
707  { 48, HELIENDLANDING, PRE_HELIPAD_block, 48 }, { 48, HELIPAD1, 0, 49 }, { 48, HELIPAD2, 0, 50 }, { 48, HANGAR, 0, 55 },
708  { 49, TO_ALL, NOTHING_block, 51 },
709  { 50, TO_ALL, NOTHING_block, 52 },
710  /* landing */
711  { 51, TERMGROUP, NOTHING_block, 0 }, { 51, HELIPAD1, HELIPAD1_block, 12 }, { 51, HANGAR, 0, 55 }, { 51, TO_ALL, 0, 12 },
712  { 52, TERMGROUP, NOTHING_block, 0 }, { 52, HELIPAD2, HELIPAD2_block, 13 }, { 52, HANGAR, 0, 55 }, { 52, TO_ALL, 0, 13 },
713  /* Helicopter -- takeoff */
714  { 53, HELITAKEOFF, NOTHING_block, 0 },
715  { 54, HELITAKEOFF, NOTHING_block, 0 },
716  { 55, TO_ALL, HANGAR2_AREA_block, 56 }, // need to go to hangar when waiting in air
717  { 56, TO_ALL, HANGAR2_AREA_block, 3 },
718  /* runway 2 out support */
719  { 57, TERMGROUP, OUT_WAY2_block, 0 }, { 57, TAKEOFF, 0, 58 }, { 57, TO_ALL, 0, 58 },
720  { 58, TO_ALL, OUT_WAY2_block, 59 },
721  { 59, TAKEOFF, RUNWAY_OUT2_block, 60 }, // takeoff
722  { 60, TO_ALL, RUNWAY_OUT2_block, 61 },
723  { 61, STARTTAKEOFF, NOTHING_block, 62 },
724  { 62, ENDTAKEOFF, NOTHING_block, 0 },
725  /* runway 2 in support */
726  { 63, LANDING, RUNWAY_IN2_block, 64 },
727  { 64, TO_ALL, RUNWAY_IN2_block, 65 },
728  { 65, TO_ALL, RUNWAY_IN2_block, 66 },
729  { 66, ENDLANDING, RUNWAY_IN2_block, 0 }, { 66, TERMGROUP, 0, 1 }, { 66, TERMGROUP, 0, 0 }, { 66, TO_ALL, 0, 67 },
730  { 67, TO_ALL, IN_WAY2_block, 68 },
731  { 68, TERMGROUP, IN_WAY2_block, 0 }, { 68, TERMGROUP, TERM_GROUP2_block, 1 }, { 68, TERMGROUP, TERM_GROUP1_block, 0 }, { 68, HANGAR, HANGAR2_AREA_block, 22 }, { 68, TO_ALL, 0, 22 },
732  { 69, TERMGROUP, RUNWAY_IN2_block, 0 }, { 69, TO_ALL, RUNWAY_IN2_block, 63 },
733  { 70, TERMGROUP, TERM_GROUP2_EXIT1_block, 0 }, { 70, HELIPAD1, HELIPAD1_block, 12 }, { 70, HELITAKEOFF, HELIPAD1_block, 12 }, { 70, TO_ALL, 0, 71 },
734  { 71, TERMGROUP, TERM_GROUP2_EXIT1_block, 0 }, { 71, HELIPAD2, HELIPAD2_block, 13 }, { 71, HELITAKEOFF, HELIPAD1_block, 12 }, { 71, TO_ALL, 0, 24 },
735  { 72, TO_ALL, HELIPAD1_block, 53 },
736  { 73, TO_ALL, HELIPAD2_block, 54 },
737  { 74, HELITAKEOFF, NOTHING_block, 0 },
738  { 75, HELITAKEOFF, NOTHING_block, 0 },
739  { 76, TERMGROUP, RUNWAY_IN_block, 0 }, { 76, TO_ALL, RUNWAY_IN_block, 37 },
740  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
741 };
742 
743 
744 /* heliports, oilrigs don't have depots */
745 static const uint8_t _airport_entries_heliport[] = { 7, 7, 7, 7 };
746 static const AirportFTAbuildup _airport_fta_heliport[] = {
747  { 0, HELIPAD1, HELIPAD1_block, 1 },
748  { 1, HELITAKEOFF, NOTHING_block, 0 }, // takeoff
749  { 2, TERMGROUP, AIRPORT_BUSY_block, 0 }, { 2, HELILANDING, 0, 3 }, { 2, HELITAKEOFF, 0, 1 },
750  { 3, HELILANDING, AIRPORT_BUSY_block, 4 },
751  { 4, HELIENDLANDING, AIRPORT_BUSY_block, 4 }, { 4, HELIPAD1, HELIPAD1_block, 0 }, { 4, HELITAKEOFF, 0, 2 },
752  /* In Air */
753  { 5, TO_ALL, NOTHING_block, 6 },
754  { 6, TO_ALL, NOTHING_block, 7 },
755  { 7, TO_ALL, NOTHING_block, 8 },
756  { 8, FLYING, NOTHING_block, 5 }, { 8, HELILANDING, HELIPAD1_block, 2 }, // landing
757  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
758 };
759 #define _airport_entries_oilrig _airport_entries_heliport
760 #define _airport_fta_oilrig _airport_fta_heliport
761 
762 /* helidepots */
763 static const HangarTileTable _airport_depots_helidepot[] = { {{1, 0}, DIR_SE, 0} };
764 static const uint8_t _airport_entries_helidepot[] = { 4, 4, 4, 4 };
765 static const AirportFTAbuildup _airport_fta_helidepot[] = {
766  { 0, HANGAR, NOTHING_block, 1 },
767  { 1, TERMGROUP, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELIPAD1, HELIPAD1_block, 14 }, { 1, HELITAKEOFF, 0, 15 }, { 1, TO_ALL, 0, 0 },
768  { 2, FLYING, NOTHING_block, 3 }, { 2, HELILANDING, PRE_HELIPAD_block, 7 }, { 2, HANGAR, 0, 12 }, { 2, HELITAKEOFF, NOTHING_block, 16 },
769  /* In Air */
770  { 3, 0, NOTHING_block, 4 },
771  { 4, 0, NOTHING_block, 5 },
772  { 5, 0, NOTHING_block, 6 },
773  { 6, 0, NOTHING_block, 2 },
774  /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
775  { 7, HELILANDING, PRE_HELIPAD_block, 8 },
776  { 8, HELIENDLANDING, PRE_HELIPAD_block, 8 }, { 8, HELIPAD1, 0, 9 }, { 8, HANGAR, 0, 12 }, { 8, TO_ALL, 0, 2 },
777  { 9, 0, NOTHING_block, 10 },
778  /* landing */
779  { 10, TERMGROUP, NOTHING_block, 10 }, { 10, HELIPAD1, HELIPAD1_block, 14 }, { 10, HANGAR, 0, 1 }, { 10, TO_ALL, 0, 14 },
780  /* Helicopter -- takeoff */
781  { 11, HELITAKEOFF, NOTHING_block, 0 },
782  { 12, TO_ALL, HANGAR2_AREA_block, 13 }, // need to go to hangar when waiting in air
783  { 13, TO_ALL, HANGAR2_AREA_block, 1 },
784  { 14, HELIPAD1, HELIPAD1_block, 14 }, { 14, HANGAR, 0, 1 }, { 14, HELITAKEOFF, 0, 17 },
785  { 15, HELITAKEOFF, NOTHING_block, 0 }, // takeoff outside depot
786  { 16, HELITAKEOFF, 0, 14 },
787  { 17, TO_ALL, NOTHING_block, 11 },
788  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
789 };
790 
791 /* helistation */
792 static const HangarTileTable _airport_depots_helistation[] = { {{0, 0}, DIR_SE, 0} };
793 static const uint8_t _airport_entries_helistation[] = { 25, 25, 25, 25 };
794 static const AirportFTAbuildup _airport_fta_helistation[] = {
795  { 0, HANGAR, NOTHING_block, 8 }, { 0, HELIPAD1, 0, 1 }, { 0, HELIPAD2, 0, 1 }, { 0, HELIPAD3, 0, 1 }, { 0, HELITAKEOFF, 0, 1 }, { 0, TO_ALL, 0, 0 },
796  { 1, TERMGROUP, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELITAKEOFF, 0, 3 }, { 1, TO_ALL, 0, 4 },
797  /* landing */
798  { 2, FLYING, NOTHING_block, 28 }, { 2, HELILANDING, 0, 15 }, { 2, TO_ALL, 0, 28 },
799  /* helicopter side */
800  { 3, HELITAKEOFF, NOTHING_block, 0 }, // helitakeoff outside hangar2
801  { 4, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 4, HANGAR, HANGAR2_AREA_block, 1 }, { 4, HELITAKEOFF, 0, 1 }, { 4, TO_ALL, 0, 5 },
802  { 5, TERMGROUP, TAXIWAY_BUSY_block, 0 }, { 5, HELIPAD1, HELIPAD1_block, 6 }, { 5, HELIPAD2, HELIPAD2_block, 7 }, { 5, HELIPAD3, HELIPAD3_block, 8 }, { 5, TO_ALL, 0, 4 },
803  { 6, HELIPAD1, HELIPAD1_block, 5 }, { 6, HANGAR, HANGAR2_AREA_block, 5 }, { 6, HELITAKEOFF, 0, 9 }, { 6, TO_ALL, 0, 6 },
804  { 7, HELIPAD2, HELIPAD2_block, 5 }, { 7, HANGAR, HANGAR2_AREA_block, 5 }, { 7, HELITAKEOFF, 0, 10 }, { 7, TO_ALL, 0, 7 },
805  { 8, HELIPAD3, HELIPAD3_block, 5 }, { 8, HANGAR, HANGAR2_AREA_block, 5 }, { 8, HELITAKEOFF, 0, 11 }, { 8, TO_ALL, 0, 8 },
806  { 9, 0, HELIPAD1_block, 12 },
807  { 10, TO_ALL, HELIPAD2_block, 13 },
808  { 11, TO_ALL, HELIPAD3_block, 14 },
809  { 12, HELITAKEOFF, NOTHING_block, 0 },
810  { 13, HELITAKEOFF, NOTHING_block, 0 },
811  { 14, HELITAKEOFF, NOTHING_block, 0 },
812  /* heli - in flight moves */
813  { 15, HELILANDING, PRE_HELIPAD_block, 16 },
814  { 16, HELIENDLANDING, PRE_HELIPAD_block, 16 }, { 16, HELIPAD1, 0, 17 }, { 16, HELIPAD2, 0, 18 }, { 16, HELIPAD3, 0, 19 }, { 16, HANGAR, 0, 23 },
815  { 17, TO_ALL, NOTHING_block, 20 },
816  { 18, TO_ALL, NOTHING_block, 21 },
817  { 19, TO_ALL, NOTHING_block, 22 },
818  /* heli landing */
819  { 20, TERMGROUP, NOTHING_block, 0 }, { 20, HELIPAD1, HELIPAD1_block, 6 }, { 20, HANGAR, 0, 23 }, { 20, TO_ALL, 0, 6 },
820  { 21, TERMGROUP, NOTHING_block, 0 }, { 21, HELIPAD2, HELIPAD2_block, 7 }, { 21, HANGAR, 0, 23 }, { 21, TO_ALL, 0, 7 },
821  { 22, TERMGROUP, NOTHING_block, 0 }, { 22, HELIPAD3, HELIPAD3_block, 8 }, { 22, HANGAR, 0, 23 }, { 22, TO_ALL, 0, 8 },
822  { 23, TO_ALL, HANGAR2_AREA_block, 24 }, // need to go to helihangar when waiting in air
823  { 24, TO_ALL, HANGAR2_AREA_block, 1 },
824  { 25, TO_ALL, NOTHING_block, 26 },
825  { 26, TO_ALL, NOTHING_block, 27 },
826  { 27, TO_ALL, NOTHING_block, 2 },
827  { 28, TO_ALL, NOTHING_block, 29 },
828  { 29, TO_ALL, NOTHING_block, 30 },
829  { 30, TO_ALL, NOTHING_block, 31 },
830  { 31, TO_ALL, NOTHING_block, 32 },
831  { 32, TO_ALL, NOTHING_block, 25 },
832  { MAX_ELEMENTS, TO_ALL, 0, 0 } // end marker. DO NOT REMOVE
833 };
834 
835 #endif /* AIRPORT_MOVEMENT_H */
static const uint64_t TERM7_block
Block belonging to terminal 7.
Definition: airport.h:115
static const uint64_t TERM4_block
Block belonging to terminal 4.
Definition: airport.h:92
static const uint MAX_ELEMENTS
maximum number of aircraft positions at airport
Definition: airport.h:19
static const uint64_t TERM2_block
Block belonging to terminal 2.
Definition: airport.h:90
static const uint64_t TERM1_block
Movement Blocks on Airports blocks (eg_airport_flags).
Definition: airport.h:89
static const uint64_t TERM5_block
Block belonging to terminal 5.
Definition: airport.h:93
static const uint64_t TERM3_block
Block belonging to terminal 3.
Definition: airport.h:91
static const uint64_t TERM8_block
Block belonging to terminal 8.
Definition: airport.h:116
@ AMED_BRAKE
Taxiing at the airport.
Definition: airport.h:53
@ AMED_HOLD
Holding pattern movement (above the airport).
Definition: airport.h:56
@ AMED_SLOWTURN
Turn slowly (mostly used in the air).
Definition: airport.h:50
@ AMED_HELI_LOWER
Helicopter landing.
Definition: airport.h:55
@ AMED_LAND
Landing onto landing strip.
Definition: airport.h:51
@ AMED_NOSPDCLAMP
No speed restrictions.
Definition: airport.h:48
@ AMED_TAKEOFF
Takeoff movement.
Definition: airport.h:49
@ AMED_EXACTPOS
Go exactly to the destination coordinates.
Definition: airport.h:52
@ AMED_HELI_RAISE
Helicopter take-off.
Definition: airport.h:54
static const uint64_t HELIPAD2_block
Block belonging to helipad 2.
Definition: airport.h:96
static const uint64_t TERM6_block
Block belonging to terminal 6.
Definition: airport.h:94
static const uint64_t HELIPAD3_block
Block belonging to helipad 3.
Definition: airport.h:117
static const uint64_t HELIPAD1_block
Block belonging to helipad 1.
Definition: airport.h:95
@ HELITAKEOFF
Helicopter wants to leave the airport.
Definition: airport.h:74
@ TERM4
Heading for terminal 4.
Definition: airport.h:66
@ STARTTAKEOFF
Airplane has arrived at a runway for take-off.
Definition: airport.h:72
@ HELIPAD2
Heading for helipad 2.
Definition: airport.h:70
@ ENDTAKEOFF
Airplane has reached end-point of the take-off runway.
Definition: airport.h:73
@ TERM5
Heading for terminal 5.
Definition: airport.h:67
@ TERM6
Heading for terminal 6.
Definition: airport.h:68
@ TERM3
Heading for terminal 3.
Definition: airport.h:65
@ TERM8
Heading for terminal 8.
Definition: airport.h:81
@ HELIPAD3
Heading for helipad 3.
Definition: airport.h:82
@ HELIPAD1
Heading for helipad 1.
Definition: airport.h:69
@ TERM2
Heading for terminal 2.
Definition: airport.h:64
@ HANGAR
Heading for hangar.
Definition: airport.h:62
@ FLYING
Vehicle is flying in the air.
Definition: airport.h:75
@ TAKEOFF
Airplane wants to leave the airport.
Definition: airport.h:71
@ HELILANDING
Helicopter wants to land.
Definition: airport.h:78
@ TO_ALL
Go in this direction for every target.
Definition: airport.h:61
@ ENDLANDING
Airplane wants to finish landing.
Definition: airport.h:77
@ HELIENDLANDING
Helicopter wants to finish landing.
Definition: airport.h:79
@ TERM1
Heading for terminal 1.
Definition: airport.h:63
@ LANDING
Airplane wants to land.
Definition: airport.h:76
@ TERM7
Heading for terminal 7.
Definition: airport.h:80
@ TERMGROUP
Aircraft is looking for a free terminal in a terminalgroup.
Definition: airport.h:84
static const uint64_t RUNWAY_OUT2_block
Definition: airport.h:122
static const AirportMovingData _airport_moving_data_intercontinental[77]
Intercontinental Airport - 4 runways, 8 terminals, 2 dedicated helipads.
static const AirportMovingData _airport_moving_data_commuter[38]
Commuter Airfield (small) 5x4.
static const AirportMovingData _airport_moving_data_international[53]
International Airport (international) - 2 runways, 6 terminals, dedicated helipad.
static const AirportMovingData _airport_moving_data_oilrig[9]
Oilrig.
static const AirportMovingData _airport_moving_data_dummy[]
Dummy airport.
static const AirportMovingData _airport_moving_data_country[22]
Country Airfield (small) 4x3.
#define AMD(x, y, flags, dir)
Airport movement data creation macro.
static const AirportMovingData _airport_moving_data_heliport[9]
Heliport (heliport).
static const AirportMovingData _airport_moving_data_helidepot[18]
HeliDepot 2x2 (heliport).
static const AirportMovingData _airport_moving_data_helistation[33]
HeliDepot 2x2 (heliport).
static const AirportMovingData _airport_moving_data_metropolitan[28]
Metropolitan Airport (metropolitan) - 2 runways.
static const AirportMovingData _airport_moving_data_city[]
City Airport (large) 6x6.
@ DIR_SW
Southwest.
@ DIR_NW
Northwest.
@ DIR_N
North.
@ DIR_SE
Southeast.
@ DIR_NE
Northeast.
@ DIR_W
West.
@ DIR_E
East.
State machine input struct (from external file, etc.) Finite sTate mAchine --> FTA.
uint8_t heading
The current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.).
uint8_t next
Next position from this position.
uint8_t position
The position that an airplane is at.
uint64_t block
The block this position is on on the airport (st->airport.flags).
A single location on an airport where aircraft can move to.
Definition: airport.h:131
A list of all hangar tiles in an airport.