# airport_movement.h

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef AIRPORT_MOVEMENT_H
    00013 #define AIRPORT_MOVEMENT_H
    00014
    00015
    00016 /* state machine input struct (from external file, etc.)
    00017  * Finite sTate mAchine --> FTA */
    00018 struct AirportFTAbuildup {
    00019   byte position; // the position that an airplane is at
    00020   byte heading;  // the current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.)
    00021   uint64 block;  // the block this position is on on the airport (st->airport_flags)
    00022   byte next;     // next position from this position
    00023 };
    00024
    00027
    00028 #define AMD(x, y, flags, dir) { x, y, flags, {dir} }
    00029
    00030 static const AirportMovingData _airport_moving_data_dummy[] = {
    00031   AMD(    0,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
    00032   AMD(    0,   96, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
    00033   AMD(   96,   96, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
    00034   AMD(   96,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN,     DIR_N ),
    00035 };
    00036
    00037 /* Country Airfield (small) 4x3 */
    00038 static const AirportMovingData _airport_moving_data_country[22] = {
    00039   AMD(   53,    3, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar
    00040   AMD(   53,   27, 0,                               DIR_N ), // 01 Taxi to right outside depot
    00041   AMD(   32,   23, AMED_EXACTPOS,                   DIR_NW), // 02 Terminal 1
    00042   AMD(   10,   23, AMED_EXACTPOS,                   DIR_NW), // 03 Terminal 2
    00043   AMD(   43,   37, 0,                               DIR_N ), // 04 Going towards terminal 2
    00044   AMD(   24,   37, 0,                               DIR_N ), // 05 Going towards terminal 2
    00045   AMD(   53,   37, 0,                               DIR_N ), // 06 Going for takeoff
    00046   AMD(   61,   40, AMED_EXACTPOS,                   DIR_NE), // 07 Taxi to start of runway (takeoff)
    00047   AMD(    3,   40, AMED_NOSPDCLAMP,                 DIR_N ), // 08 Accelerate to end of runway
    00048   AMD(  -79,   40, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 09 Take off
    00049   AMD(  177,   40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 10 Fly to landing position in air
    00050   AMD(   56,   40, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 11 Going down for land
    00051   AMD(    3,   40, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 12 Just landed, brake until end of runway
    00052   AMD(    7,   40, 0,                               DIR_N ), // 13 Just landed, turn around and taxi 1 square
    00053   AMD(   53,   40, 0,                               DIR_N ), // 14 Taxi from runway to crossing
    00054   AMD(    1,  193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 15 Fly around waiting for a landing spot (north-east)
    00055   AMD(    1,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Fly around waiting for a landing spot (north-west)
    00056   AMD(  257,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 17 Fly around waiting for a landing spot (south-west)
    00057   AMD(  273,   47, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 18 Fly around waiting for a landing spot (south)
    00058   AMD(   44,   37, AMED_HELI_RAISE,                 DIR_N ), // 19 Helicopter takeoff
    00059   AMD(   44,   40, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 20 In position above landing spot helicopter
    00060   AMD(   44,   40, AMED_HELI_LOWER,                 DIR_N ), // 21 Helicopter landing
    00061 };
    00062
    00063 /* Commuter Airfield (small) 5x4 */
    00064 static const AirportMovingData _airport_moving_data_commuter[37] = {
    00065   AMD(   69,    3, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar
    00066   AMD(   72,   22, 0,                               DIR_N ), // 01 Taxi to right outside depot
    00067   AMD(    8,   22, AMED_EXACTPOS,                   DIR_SW), // 01 Taxi to right outside depot
    00068   AMD(   24,   36, AMED_EXACTPOS,                   DIR_SE), // 03 Terminal 1
    00069   AMD(   40,   36, AMED_EXACTPOS,                   DIR_SE), // 04 Terminal 2
    00070   AMD(   56,   36, AMED_EXACTPOS,                   DIR_SE), // 05 Terminal 3
    00071   AMD(   40,    8, AMED_EXACTPOS,                   DIR_NE), // 06 Helipad 1
    00072   AMD(   56,    8, AMED_EXACTPOS,                   DIR_NE), // 07 Helipad 2
    00073   AMD(   24,   22, 0,                               DIR_SW), // 08 Taxiing
    00074   AMD(   40,   22, 0,                               DIR_SW), // 09 Taxiing
    00075   AMD(   56,   22, 0,                               DIR_SW), // 10 Taxiing
    00076   AMD(   72,   40, 0,                               DIR_SE), // 11 Airport OUTWAY
    00077   AMD(   72,   54, AMED_EXACTPOS,                   DIR_NE), // 12 Accelerate to end of runway
    00078   AMD(    7,   54, AMED_NOSPDCLAMP,                 DIR_N ), // 13 Release control of runway, for smoother movement
    00079   AMD(    5,   54, AMED_NOSPDCLAMP,                 DIR_N ), // 14 End of runway
    00080   AMD(  -79,   54, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 15 Take off
    00081   AMD(  145,   54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Fly to landing position in air
    00082   AMD(   73,   54, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 17 Going down for land
    00083   AMD(    3,   54, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 18 Just landed, brake until end of runway
    00084   AMD(   12,   54, AMED_SLOWTURN,                   DIR_NW), // 19 Just landed, turn around and taxi
    00085   AMD(    8,   32, 0,                               DIR_NW), // 20 Taxi from runway to crossing
    00086   AMD(    1,  149, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (north-east)
    00087   AMD(    1,    6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 22 Fly around waiting for a landing spot (north-west)
    00088   AMD(  193,    6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 Fly around waiting for a landing spot (south-west)
    00089   AMD(  225,   62, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 24 Fly around waiting for a landing spot (south)
    00090   /* Helicopter */
    00091   AMD(   80,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Bufferspace before helipad
    00092   AMD(   80,    0, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Bufferspace before helipad
    00093   AMD(   32,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Get in position for Helipad1
    00094   AMD(   48,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Get in position for Helipad2
    00095   AMD(   32,    8, AMED_HELI_LOWER,                 DIR_N ), // 29 Land at Helipad1
    00096   AMD(   48,    8, AMED_HELI_LOWER,                 DIR_N ), // 30 Land at Helipad2
    00097   AMD(   32,    8, AMED_HELI_RAISE,                 DIR_N ), // 31 Takeoff Helipad1
    00098   AMD(   48,    8, AMED_HELI_RAISE,                 DIR_N ), // 32 Takeoff Helipad2
    00099   AMD(   64,   22, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 33 Go to position for Hangarentrance in air
    00100   AMD(   64,   22, AMED_HELI_LOWER,                 DIR_N ), // 34 Land in front of hangar
    00101   AMD(   40,    8, AMED_EXACTPOS,                   DIR_N ), // pre-helitakeoff helipad 1
    00102   AMD(   56,    8, AMED_EXACTPOS,                   DIR_N ), // pre-helitakeoff helipad 2
    00103 };
    00104
    00105 /* City Airport (large) 6x6 */
    00106 static const AirportMovingData _airport_moving_data_town[] = {
    00107   AMD(   85,    3, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar
    00108   AMD(   85,   22, 0,                               DIR_N ), // 01 Taxi to right outside depot
    00109   AMD(   26,   41, AMED_EXACTPOS,                   DIR_SW), // 02 Terminal 1
    00110   AMD(   56,   22, AMED_EXACTPOS,                   DIR_SE), // 03 Terminal 2
    00111   AMD(   38,    8, AMED_EXACTPOS,                   DIR_SW), // 04 Terminal 3
    00112   AMD(   65,    6, 0,                               DIR_N ), // 05 Taxi to right in infront of terminal 2/3
    00113   AMD(   80,   27, 0,                               DIR_N ), // 06 Taxiway terminals 2-3
    00114   AMD(   44,   63, 0,                               DIR_N ), // 07 Taxi to Airport center
    00115   AMD(   58,   71, 0,                               DIR_N ), // 08 Towards takeoff
    00116   AMD(   72,   85, 0,                               DIR_N ), // 09 Taxi to runway (takeoff)
    00117   AMD(   89,   85, AMED_EXACTPOS,                   DIR_NE), // 10 Taxi to start of runway (takeoff)
    00118   AMD(    3,   85, AMED_NOSPDCLAMP,                 DIR_N ), // 11 Accelerate to end of runway
    00119   AMD(  -79,   85, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 12 Take off
    00120   AMD(  177,   87, AMED_HOLD       | AMED_SLOWTURN, DIR_N ), // 13 Fly to landing position in air
    00121   AMD(   89,   87, AMED_HOLD       | AMED_LAND,     DIR_N ), // 14 Going down for land
    00122   AMD(   20,   87, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 15 Just landed, brake until end of runway
    00123   AMD(   20,   87, 0,                               DIR_N ), // 16 Just landed, turn around and taxi 1 square // NOT USED
    00124   AMD(   36,   71, 0,                               DIR_N ), // 17 Taxi from runway to crossing
    00125   AMD(  160,   87, AMED_HOLD       | AMED_SLOWTURN, DIR_N ), // 18 Fly around waiting for a landing spot (north-east)
    00126   AMD(  140,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 19 Final approach fix
    00127   AMD(  257,    1, AMED_HOLD       | AMED_SLOWTURN, DIR_N ), // 20 Fly around waiting for a landing spot (south-west)
    00128   AMD(  273,   49, AMED_HOLD       | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (south)
    00129   AMD(   44,   63, AMED_HELI_RAISE,                 DIR_N ), // 22 Helicopter takeoff
    00130   AMD(   28,   74, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 In position above landing spot helicopter
    00131   AMD(   28,   74, AMED_HELI_LOWER,                 DIR_N ), // 24 Helicopter landing
    00132   AMD(  145,    1, AMED_HOLD       | AMED_SLOWTURN, DIR_N ), // 25 Fly around waiting for a landing spot (north-west)
    00133   AMD(  -32,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Initial approach fix (north)
    00134   AMD(  300,  -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Initial approach fix (south)
    00135   AMD(  140,  -48, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Intermediadate Approach fix (south), IAF (west)
    00136   AMD(  -32,  120, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 29 Initial approach fix (east)
    00137 };
    00138
    00139 /* Metropolitan Airport (metropolitan) - 2 runways */
    00140 static const AirportMovingData _airport_moving_data_metropolitan[28] = {
    00141   AMD(   85,    3, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar
    00142   AMD(   85,   22, 0,                               DIR_N ), // 01 Taxi to right outside depot
    00143   AMD(   26,   41, AMED_EXACTPOS,                   DIR_SW), // 02 Terminal 1
    00144   AMD(   56,   22, AMED_EXACTPOS,                   DIR_SE), // 03 Terminal 2
    00145   AMD(   38,    8, AMED_EXACTPOS,                   DIR_SW), // 04 Terminal 3
    00146   AMD(   65,    6, 0,                               DIR_N ), // 05 Taxi to right in infront of terminal 2/3
    00147   AMD(   80,   27, 0,                               DIR_N ), // 06 Taxiway terminals 2-3
    00148   AMD(   49,   58, 0,                               DIR_N ), // 07 Taxi to Airport center
    00149   AMD(   72,   58, 0,                               DIR_N ), // 08 Towards takeoff
    00150   AMD(   72,   69, 0,                               DIR_N ), // 09 Taxi to runway (takeoff)
    00151   AMD(   89,   69, AMED_EXACTPOS,                   DIR_NE), // 10 Taxi to start of runway (takeoff)
    00152   AMD(    3,   69, AMED_NOSPDCLAMP,                 DIR_N ), // 11 Accelerate to end of runway
    00153   AMD(  -79,   69, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 12 Take off
    00154   AMD(  177,   85, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 13 Fly to landing position in air
    00155   AMD(   89,   85, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 14 Going down for land
    00156   AMD(    3,   85, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 15 Just landed, brake until end of runway
    00157   AMD(   21,   85, 0,                               DIR_N ), // 16 Just landed, turn around and taxi 1 square
    00158   AMD(   21,   69, 0,                               DIR_N ), // 17 On Runway-out taxiing to In-Way
    00159   AMD(   21,   58, AMED_EXACTPOS,                   DIR_SW), // 18 Taxi from runway to crossing
    00160   AMD(    1,  193, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 19 Fly around waiting for a landing spot (north-east)
    00161   AMD(    1,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 20 Fly around waiting for a landing spot (north-west)
    00162   AMD(  257,    1, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 21 Fly around waiting for a landing spot (south-west)
    00163   AMD(  273,   49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 22 Fly around waiting for a landing spot (south)
    00164   AMD(   44,   58, 0,                               DIR_N ), // 23 Helicopter takeoff spot on ground (to clear airport sooner)
    00165   AMD(   44,   63, AMED_HELI_RAISE,                 DIR_N ), // 24 Helicopter takeoff
    00166   AMD(   15,   54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Get in position above landing spot helicopter
    00167   AMD(   15,   54, AMED_HELI_LOWER,                 DIR_N ), // 26 Helicopter landing
    00168   AMD(   21,   58, AMED_EXACTPOS,                   DIR_SW), // 27 Transitions after landing to on-ground movement
    00169 };
    00170
    00171 /* International Airport (international) - 2 runways, 6 terminals, dedicated helipod */
    00172 static const AirportMovingData _airport_moving_data_international[51] = {
    00173   AMD(    7,   55, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar 1
    00174   AMD(  100,   21, AMED_EXACTPOS,                   DIR_SE), // 01 In Hangar 2
    00175   AMD(    7,   70, 0,                               DIR_N ), // 02 Taxi to right outside depot
    00176   AMD(  100,   36, 0,                               DIR_N ), // 03 Taxi to right outside depot
    00177   AMD(   38,   70, AMED_EXACTPOS,                   DIR_SW), // 04 Terminal 1
    00178   AMD(   38,   54, AMED_EXACTPOS,                   DIR_SW), // 05 Terminal 2
    00179   AMD(   38,   38, AMED_EXACTPOS,                   DIR_SW), // 06 Terminal 3
    00180   AMD(   70,   70, AMED_EXACTPOS,                   DIR_NE), // 07 Terminal 4
    00181   AMD(   70,   54, AMED_EXACTPOS,                   DIR_NE), // 08 Terminal 5
    00182   AMD(   70,   38, AMED_EXACTPOS,                   DIR_NE), // 09 Terminal 6
    00183   AMD(  104,   71, AMED_EXACTPOS,                   DIR_NE), // 10 Helipad 1
    00184   AMD(  104,   55, AMED_EXACTPOS,                   DIR_NE), // 11 Helipad 2
    00185   AMD(   22,   87, 0,                               DIR_N ), // 12 Towards Terminals 4/5/6, Helipad 1/2
    00186   AMD(   60,   87, 0,                               DIR_N ), // 13 Towards Terminals 4/5/6, Helipad 1/2
    00187   AMD(   66,   87, 0,                               DIR_N ), // 14 Towards Terminals 4/5/6, Helipad 1/2
    00188   AMD(   86,   87, AMED_EXACTPOS,                   DIR_NW), // 15 Towards Terminals 4/5/6, Helipad 1/2
    00189   AMD(   86,   70, 0,                               DIR_N ), // 16 In Front of Terminal 4 / Helipad 1
    00190   AMD(   86,   54, 0,                               DIR_N ), // 17 In Front of Terminal 5 / Helipad 2
    00191   AMD(   86,   38, 0,                               DIR_N ), // 18 In Front of Terminal 6
    00192   AMD(   86,   22, 0,                               DIR_N ), // 19 Towards Terminals Takeoff (Taxiway)
    00193   AMD(   66,   22, 0,                               DIR_N ), // 20 Towards Terminals Takeoff (Taxiway)
    00194   AMD(   60,   22, 0,                               DIR_N ), // 21 Towards Terminals Takeoff (Taxiway)
    00195   AMD(   38,   22, 0,                               DIR_N ), // 22 Towards Terminals Takeoff (Taxiway)
    00196   AMD(   22,   70, 0,                               DIR_N ), // 23 In Front of Terminal 1
    00197   AMD(   22,   58, 0,                               DIR_N ), // 24 In Front of Terminal 2
    00198   AMD(   22,   38, 0,                               DIR_N ), // 25 In Front of Terminal 3
    00199   AMD(   22,   22, AMED_EXACTPOS,                   DIR_NW), // 26 Going for Takeoff
    00200   AMD(   22,    6, 0,                               DIR_N ), // 27 On Runway-out, prepare for takeoff
    00201   AMD(    3,    6, AMED_EXACTPOS,                   DIR_SW), // 28 Accelerate to end of runway
    00202   AMD(   60,    6, AMED_NOSPDCLAMP,                 DIR_N ), // 29 Release control of runway, for smoother movement
    00203   AMD(  105,    6, AMED_NOSPDCLAMP,                 DIR_N ), // 30 End of runway
    00204   AMD(  190,    6, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 31 Take off
    00205   AMD(  193,  104, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 32 Fly to landing position in air
    00206   AMD(  105,  104, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 33 Going down for land
    00207   AMD(    3,  104, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 34 Just landed, brake until end of runway
    00208   AMD(   12,  104, AMED_SLOWTURN,                   DIR_N ), // 35 Just landed, turn around and taxi 1 square
    00209   AMD(    7,   84, 0,                               DIR_N ), // 36 Taxi from runway to crossing
    00210   AMD(    1,  209, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 37 Fly around waiting for a landing spot (north-east)
    00211   AMD(    1,    6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 38 Fly around waiting for a landing spot (north-west)
    00212   AMD(  273,    6, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 39 Fly around waiting for a landing spot (south-west)
    00213   AMD(  305,   81, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 40 Fly around waiting for a landing spot (south)
    00214   /* Helicopter */
    00215   AMD(  128,   80, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 41 Bufferspace before helipad
    00216   AMD(  128,   80, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 42 Bufferspace before helipad
    00217   AMD(   96,   71, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 43 Get in position for Helipad1
    00218   AMD(   96,   55, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 44 Get in position for Helipad2
    00219   AMD(   96,   71, AMED_HELI_LOWER,                 DIR_N ), // 45 Land at Helipad1
    00220   AMD(   96,   55, AMED_HELI_LOWER,                 DIR_N ), // 46 Land at Helipad2
    00221   AMD(  104,   71, AMED_HELI_RAISE,                 DIR_N ), // 47 Takeoff Helipad1
    00222   AMD(  104,   55, AMED_HELI_RAISE,                 DIR_N ), // 48 Takeoff Helipad2
    00223   AMD(  104,   32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 49 Go to position for Hangarentrance in air
    00224   AMD(  104,   32, AMED_HELI_LOWER,                 DIR_N ), // 50 Land in HANGAR2_AREA to go to hangar
    00225 };
    00226
    00227 /* Intercontinental Airport - 4 runways, 8 terminals, 2 dedicated helipads */
    00228 static const AirportMovingData _airport_moving_data_intercontinental[77] = {
    00229   AMD(    8,   87, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar 1
    00230   AMD(  136,   72, AMED_EXACTPOS,                   DIR_SE), // 01 In Hangar 2
    00231   AMD(    8,  104, 0,                               DIR_N ), // 02 Taxi to right outside depot 1
    00232   AMD(  136,   88, 0,                               DIR_N ), // 03 Taxi to right outside depot 2
    00233   AMD(   56,  120, AMED_EXACTPOS,                   DIR_W ), // 04 Terminal 1
    00234   AMD(   56,  104, AMED_EXACTPOS,                   DIR_SW), // 05 Terminal 2
    00235   AMD(   56,   88, AMED_EXACTPOS,                   DIR_SW), // 06 Terminal 3
    00236   AMD(   56,   72, AMED_EXACTPOS,                   DIR_SW), // 07 Terminal 4
    00237   AMD(   88,  120, AMED_EXACTPOS,                   DIR_N ), // 08 Terminal 5
    00238   AMD(   88,  104, AMED_EXACTPOS,                   DIR_NE), // 09 Terminal 6
    00239   AMD(   88,   88, AMED_EXACTPOS,                   DIR_NE), // 10 Terminal 7
    00240   AMD(   88,   72, AMED_EXACTPOS,                   DIR_NE), // 11 Terminal 8
    00241   AMD(   88,   56, AMED_EXACTPOS,                   DIR_SE), // 12 Helipad 1
    00242   AMD(   72,   56, AMED_EXACTPOS,                   DIR_NE), // 13 Helipad 2
    00243   AMD(   40,  136, 0,                               DIR_N ), // 14 Term group 2 enter 1 a
    00244   AMD(   56,  136, 0,                               DIR_N ), // 15 Term group 2 enter 1 b
    00245   AMD(   88,  136, 0,                               DIR_N ), // 16 Term group 2 enter 2 a
    00246   AMD(  104,  136, 0,                               DIR_N ), // 17 Term group 2 enter 2 b
    00247   AMD(  104,  120, 0,                               DIR_N ), // 18 Term group 2 - opp term 5
    00248   AMD(  104,  104, 0,                               DIR_N ), // 19 Term group 2 - opp term 6 & exit2
    00249   AMD(  104,   88, 0,                               DIR_N ), // 20 Term group 2 - opp term 7 & hangar area 2
    00250   AMD(  104,   72, 0,                               DIR_N ), // 21 Term group 2 - opp term 8
    00251   AMD(  104,   56, 0,                               DIR_N ), // 22 Taxi Term group 2 exit a
    00252   AMD(  104,   40, 0,                               DIR_N ), // 23 Taxi Term group 2 exit b
    00253   AMD(   56,   40, 0,                               DIR_N ), // 24 Term group 2 exit 2a
    00254   AMD(   40,   40, 0,                               DIR_N ), // 25 Term group 2 exit 2b
    00255   AMD(   40,  120, 0,                               DIR_N ), // 26 Term group 1 - opp term 1
    00256   AMD(   40,  104, 0,                               DIR_N ), // 27 Term group 1 - opp term 2 & hangar area 1
    00257   AMD(   40,   88, 0,                               DIR_N ), // 28 Term group 1 - opp term 3
    00258   AMD(   40,   72, 0,                               DIR_N ), // 29 Term group 1 - opp term 4
    00259   AMD(   18,   72, 0,                               DIR_NW), // 30 Outway 1
    00260   AMD(    8,   40, 0,                               DIR_NW), // 31 Airport OUTWAY
    00261   AMD(    8,   24, AMED_EXACTPOS,                   DIR_SW), // 32 Accelerate to end of runway
    00262   AMD(  119,   24, AMED_NOSPDCLAMP,                 DIR_N ), // 33 Release control of runway, for smoother movement
    00263   AMD(  117,   24, AMED_NOSPDCLAMP,                 DIR_N ), // 34 End of runway
    00264   AMD(  197,   24, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 35 Take off
    00265   AMD(  254,   84, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 36 Flying to landing position in air
    00266   AMD(  117,  168, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 37 Going down for land
    00267   AMD(    8,  168, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 38 Just landed, brake until end of runway
    00268   AMD(    8,  168, 0,                               DIR_N ), // 39 Just landed, turn around and taxi
    00269   AMD(    8,  144, 0,                               DIR_NW), // 40 Taxi from runway
    00270   AMD(    8,  128, 0,                               DIR_NW), // 41 Taxi from runway
    00271   AMD(    8,  120, AMED_EXACTPOS,                   DIR_NW), // 42 Airport entrance
    00272   AMD(   56,  344, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 43 Fly around waiting for a landing spot (north-east)
    00273   AMD( -200,   88, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 44 Fly around waiting for a landing spot (north-west)
    00274   AMD(   56, -168, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 45 Fly around waiting for a landing spot (south-west)
    00275   AMD(  312,   88, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 46 Fly around waiting for a landing spot (south)
    00276   /* Helicopter */
    00277   AMD(   96,   40, AMED_NOSPDCLAMP,                 DIR_N ), // 47 Bufferspace before helipad
    00278   AMD(   96,   40, AMED_NOSPDCLAMP,                 DIR_N ), // 48 Bufferspace before helipad
    00279   AMD(   82,   54, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 49 Get in position for Helipad1
    00280   AMD(   64,   56, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 50 Get in position for Helipad2
    00281   AMD(   81,   55, AMED_HELI_LOWER,                 DIR_N ), // 51 Land at Helipad1
    00282   AMD(   64,   56, AMED_HELI_LOWER,                 DIR_N ), // 52 Land at Helipad2
    00283   AMD(   80,   56, AMED_HELI_RAISE,                 DIR_N ), // 53 Takeoff Helipad1
    00284   AMD(   64,   56, AMED_HELI_RAISE,                 DIR_N ), // 54 Takeoff Helipad2
    00285   AMD(  136,   96, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 55 Go to position for Hangarentrance in air
    00286   AMD(  136,   96, AMED_HELI_LOWER,                 DIR_N ), // 56 Land in front of hangar2
    00287   AMD(  126,  104, 0,                               DIR_SE), // 57 Outway 2
    00288   AMD(  136,  136, 0,                               DIR_NE), // 58 Airport OUTWAY 2
    00289   AMD(  136,  152, AMED_EXACTPOS,                   DIR_NE), // 59 Accelerate to end of runway2
    00290   AMD(   16,  152, AMED_NOSPDCLAMP,                 DIR_N ), // 60 Release control of runway2, for smoother movement
    00291   AMD(   20,  152, AMED_NOSPDCLAMP,                 DIR_N ), // 61 End of runway2
    00292   AMD(  -56,  152, AMED_NOSPDCLAMP | AMED_TAKEOFF,  DIR_N ), // 62 Take off2
    00293   AMD(   24,    8, AMED_NOSPDCLAMP | AMED_LAND,     DIR_N ), // 63 Going down for land2
    00294   AMD(  136,    8, AMED_NOSPDCLAMP | AMED_BRAKE,    DIR_N ), // 64 Just landed, brake until end of runway2in
    00295   AMD(  136,    8, 0,                               DIR_N ), // 65 Just landed, turn around and taxi
    00296   AMD(  136,   24, 0,                               DIR_SE), // 66 Taxi from runway 2in
    00297   AMD(  136,   40, 0,                               DIR_SE), // 67 Taxi from runway 2in
    00298   AMD(  136,   56, AMED_EXACTPOS,                   DIR_NE), // 68 Airport entrance2
    00299   AMD(  -56,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 69 Fly to landing position in air2
    00300   AMD(   88,   40, 0,                               DIR_N ), // 70 Taxi Term group 2 exit - opp heli1
    00301   AMD(   72,   40, 0,                               DIR_N ), // 71 Taxi Term group 2 exit - opp heli2
    00302   AMD(   88,   57, AMED_EXACTPOS,                   DIR_SE), // 72 pre-helitakeoff helipad 1
    00303   AMD(   71,   56, AMED_EXACTPOS,                   DIR_NE), // 73 pre-helitakeoff helipad 2
    00304   AMD(    8,  120, AMED_HELI_RAISE,                 DIR_N ), // 74 Helitakeoff outside depot 1
    00305   AMD(  136,  104, AMED_HELI_RAISE,                 DIR_N ), // 75 Helitakeoff outside depot 2
    00306   AMD(  197,  168, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 76 Fly to landing position in air1
    00307 };
    00308
    00309
    00310 /* Heliport (heliport) */
    00311 static const AirportMovingData _airport_moving_data_heliport[9] = {
    00312   AMD(    5,    9, AMED_EXACTPOS,                   DIR_NE), // 0 - At heliport terminal
    00313   AMD(    2,    9, AMED_HELI_RAISE,                 DIR_N ), // 1 - Take off (play sound)
    00314   AMD(   -3,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 - In position above landing spot helicopter
    00315   AMD(   -3,    9, AMED_HELI_LOWER,                 DIR_N ), // 3 - Land
    00316   AMD(    2,    9, 0,                               DIR_N ), // 4 - Goto terminal on ground
    00317   AMD(  -31,   59, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - Circle #1 (north-east)
    00318   AMD(  -31,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - Circle #2 (north-west)
    00319   AMD(   49,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 7 - Circle #3 (south-west)
    00320   AMD(   70,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 8 - Circle #4 (south)
    00321 };
    00322
    00323 /* HeliDepot 2x2 (heliport) */
    00324 static const AirportMovingData _airport_moving_data_helidepot[18] = {
    00325   AMD(   24,    4, AMED_EXACTPOS,                   DIR_NE), // 0 - At depot
    00326   AMD(   24,   28, 0,                               DIR_N ), // 1 Taxi to right outside depot
    00327   AMD(    5,   38, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 Flying
    00328   AMD(  -15,  -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 3 - Circle #1 (north-east)
    00329   AMD(  -15,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 4 - Circle #2 (north-west)
    00330   AMD(   49,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - Circle #3 (south-west)
    00331   AMD(   49,  -15, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - Circle #4 (south-east)
    00332   AMD(    8,   32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 7 - PreHelipad
    00333   AMD(    8,   32, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 8 - Helipad
    00334   AMD(    8,   16, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 9 - Land
    00335   AMD(    8,   16, AMED_HELI_LOWER,                 DIR_NW), // 10 - Land
    00336   AMD(    8,   24, AMED_HELI_RAISE,                 DIR_N ), // 11 - Take off (play sound)
    00337   AMD(   32,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NW), // 12 Air to above hangar area
    00338   AMD(   32,   24, AMED_HELI_LOWER,                 DIR_NW), // 13 Taxi to right outside depot
    00339   AMD(    8,   24, AMED_EXACTPOS,                   DIR_NW), // 14 - on helipad1
    00340   AMD(   24,   28, AMED_HELI_RAISE,                 DIR_N ), // 15 Takeoff right outside depot
    00341   AMD(    8,   24, AMED_HELI_RAISE,                 DIR_SW), // 16 - Take off (play sound)
    00342   AMD(    8,   24, AMED_SLOWTURN | AMED_EXACTPOS,   DIR_E ), // 17 - turn on helipad1 for takeoff
    00343 };
    00344
    00345 /* HeliDepot 2x2 (heliport) */
    00346 static const AirportMovingData _airport_moving_data_helistation[33] = {
    00347   AMD(    8,    3, AMED_EXACTPOS,                   DIR_SE), // 00 In Hangar2
    00348   AMD(    8,   22, 0,                               DIR_N ), // 01 outside hangar 2
    00349   AMD(  116,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 02 Fly to landing position in air
    00350   AMD(   14,   22, AMED_HELI_RAISE,                 DIR_N ), // 03 Helitakeoff outside hangar1(play sound)
    00351   AMD(   24,   22, 0,                               DIR_N ), // 04 taxiing
    00352   AMD(   40,   22, 0,                               DIR_N ), // 05 taxiing
    00353   AMD(   40,    8, AMED_EXACTPOS,                   DIR_NE), // 06 Helipad 1
    00354   AMD(   56,    8, AMED_EXACTPOS,                   DIR_NE), // 07 Helipad 2
    00355   AMD(   56,   24, AMED_EXACTPOS,                   DIR_NE), // 08 Helipad 3
    00356   AMD(   40,    8, AMED_EXACTPOS,                   DIR_N ), // 09 pre-helitakeoff helipad 1
    00357   AMD(   56,    8, AMED_EXACTPOS,                   DIR_N ), // 10 pre-helitakeoff helipad 2
    00358   AMD(   56,   24, AMED_EXACTPOS,                   DIR_N ), // 11 pre-helitakeoff helipad 3
    00359   AMD(   32,    8, AMED_HELI_RAISE,                 DIR_N ), // 12 Takeoff Helipad1
    00360   AMD(   48,    8, AMED_HELI_RAISE,                 DIR_N ), // 13 Takeoff Helipad2
    00361   AMD(   48,   24, AMED_HELI_RAISE,                 DIR_N ), // 14 Takeoff Helipad3
    00362   AMD(   84,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 15 Bufferspace before helipad
    00363   AMD(   68,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 16 Bufferspace before helipad
    00364   AMD(   32,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 17 Get in position for Helipad1
    00365   AMD(   48,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 18 Get in position for Helipad2
    00366   AMD(   48,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_NE), // 19 Get in position for Helipad3
    00367   AMD(   40,    8, AMED_HELI_LOWER,                 DIR_N ), // 20 Land at Helipad1
    00368   AMD(   48,    8, AMED_HELI_LOWER,                 DIR_N ), // 21 Land at Helipad2
    00369   AMD(   48,   24, AMED_HELI_LOWER,                 DIR_N ), // 22 Land at Helipad3
    00370   AMD(    0,   22, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 23 Go to position for Hangarentrance in air
    00371   AMD(    0,   22, AMED_HELI_LOWER,                 DIR_N ), // 24 Land in front of hangar
    00372   AMD(  148,   -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 25 Fly around waiting for a landing spot (south-east)
    00373   AMD(  148,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 26 Fly around waiting for a landing spot (south-west)
    00374   AMD(  132,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 27 Fly around waiting for a landing spot (south-west)
    00375   AMD(  100,   24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 28 Fly around waiting for a landing spot (north-east)
    00376   AMD(   84,    8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 29 Fly around waiting for a landing spot (south-east)
    00377   AMD(   84,   -8, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 30 Fly around waiting for a landing spot (south-west)
    00378   AMD(  100,  -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 31 Fly around waiting for a landing spot (north-west)
    00379   AMD(  132,  -24, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 32 Fly around waiting for a landing spot (north-east)
    00380 };
    00381
    00382 /* Oilrig */
    00383 static const AirportMovingData _airport_moving_data_oilrig[9] = {
    00384   AMD(   31,    9, AMED_EXACTPOS,                   DIR_NE), // 0 - At oilrig terminal
    00385   AMD(   28,    9, AMED_HELI_RAISE,                 DIR_N ), // 1 - Take off (play sound)
    00386   AMD(   23,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 2 - In position above landing spot helicopter
    00387   AMD(   23,    9, AMED_HELI_LOWER,                 DIR_N ), // 3 - Land
    00388   AMD(   28,    9, 0,                               DIR_N ), // 4 - Goto terminal on ground
    00389   AMD(  -31,   69, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 5 - circle #1 (north-east)
    00390   AMD(  -31,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 6 - circle #2 (north-west)
    00391   AMD(   69,  -49, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 7 - circle #3 (south-west)
    00392   AMD(   69,    9, AMED_NOSPDCLAMP | AMED_SLOWTURN, DIR_N ), // 8 - circle #4 (south)
    00393 };
    00394
    00395 #undef AMD
    00396
    00399 static const byte _airport_entries_dummy[] = {0, 1, 2, 3};
    00400 static const AirportFTAbuildup _airport_fta_dummy[] = {
    00401   { 0, 0, 0, 3},
    00402   { 1, 0, 0, 0},
    00403   { 2, 0, 0, 1},
    00404   { 3, 0, 0, 2},
    00405   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00406 };
    00407
    00408 /* First element of terminals array tells us how many depots there are (to know size of array)
    00409  * this may be changed later when airports are moved to external file  */
    00410 static const TileIndexDiffC _airport_depots_country[] = {{3, 0}};
    00411 static const byte _airport_terminal_country[] = {1, 2};
    00412 static const byte _airport_entries_country[] = {16, 15, 18, 17};
    00413 static const AirportFTAbuildup _airport_fta_country[] = {
    00414   {  0, HANGAR, NOTHING_block, 1 },
    00415   {  1, 255, AIRPORT_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM1, TERM1_block, 2 }, { 1, TERM2, 0, 4 }, { 1, HELITAKEOFF, 0, 19 }, { 1, 0, 0, 6 },
    00416   {  2, TERM1, TERM1_block, 1 },
    00417   {  3, TERM2, TERM2_block, 5 },
    00418   {  4, 255, AIRPORT_BUSY_block, 0 }, { 4, TERM2, 0, 5 }, { 4, HANGAR, 0, 1 }, { 4, TAKEOFF, 0, 6 }, { 4, HELITAKEOFF, 0, 1 },
    00419   {  5, 255, AIRPORT_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, 0, 0, 4 },
    00420   {  6, 0, AIRPORT_BUSY_block, 7 },
    00421   /* takeoff */
    00422   {  7, TAKEOFF, AIRPORT_BUSY_block, 8 },
    00423   {  8, STARTTAKEOFF, NOTHING_block, 9 },
    00424   {  9, ENDTAKEOFF, NOTHING_block, 0 },
    00425   /* landing */
    00426   { 10, FLYING, NOTHING_block, 15 }, { 10, LANDING, 0, 11 }, { 10, HELILANDING, 0, 20 },
    00427   { 11, LANDING, AIRPORT_BUSY_block, 12 },
    00428   { 12, 0, AIRPORT_BUSY_block, 13 },
    00429   { 13, ENDLANDING, AIRPORT_BUSY_block, 14 }, { 13, TERM2, 0, 5 }, { 13, 0, 0, 14 },
    00430   { 14, 0, AIRPORT_BUSY_block, 1 },
    00431   /* In air */
    00432   { 15, 0, NOTHING_block, 16 },
    00433   { 16, 0, NOTHING_block, 17 },
    00434   { 17, 0, NOTHING_block, 18 },
    00435   { 18, 0, NOTHING_block, 10 },
    00436   { 19, HELITAKEOFF, NOTHING_block, 0 },
    00437   { 20, HELILANDING, AIRPORT_BUSY_block, 21 },
    00438   { 21, HELIENDLANDING, AIRPORT_BUSY_block, 1 },
    00439   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00440 };
    00441
    00442 static const TileIndexDiffC _airport_depots_commuter[] = { { 4, 0 } };
    00443 static const byte _airport_terminal_commuter[] = { 1, 3 };
    00444 static const byte _airport_helipad_commuter[] = { 1, 2 };
    00445 static const byte _airport_entries_commuter[] = {22, 21, 24, 23};
    00446 static const AirportFTAbuildup _airport_fta_commuter[] = {
    00447   {  0, HANGAR, NOTHING_block, 1 }, { 0, HELITAKEOFF, HELIPAD2_block, 1 }, { 0, 0, 0, 1 },
    00448   {  1, 255, 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, 10 }, { 1, 0, 0, 0 },
    00449   {  2, 255, 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, 0, 0, 2 },
    00450   {  3, TERM1, TERM1_block, 8 }, { 3, HANGAR, 0, 8 }, { 3, TAKEOFF, 0, 8 }, { 3, 0, 0, 3 },
    00451   {  4, TERM2, TERM2_block, 9 }, { 4, HANGAR, 0, 9 }, { 4, TAKEOFF, 0, 9 }, { 4, 0, 0, 4 },
    00452   {  5, TERM3, TERM3_block, 10 }, { 5, HANGAR, 0, 10 }, { 5, TAKEOFF, 0, 10 }, { 5, 0, 0, 5 },
    00453   {  6, HELIPAD1, HELIPAD1_block, 6 }, { 6, HANGAR, TAXIWAY_BUSY_block, 9 }, { 6, HELITAKEOFF, 0, 35 },
    00454   {  7, HELIPAD2, HELIPAD2_block, 7 }, { 7, HANGAR, TAXIWAY_BUSY_block, 10 }, { 7, HELITAKEOFF, 0, 36 },
    00455   {  8, 255, TAXIWAY_BUSY_block, 8 }, { 8, TAKEOFF, TAXIWAY_BUSY_block, 9 }, { 8, HANGAR, TAXIWAY_BUSY_block, 9 }, { 8, TERM1, TERM1_block, 3 }, { 8, 0, TAXIWAY_BUSY_block, 9 },
    00456   {  9, 255, 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, 0, TAXIWAY_BUSY_block, 10 },
    00457   { 10, 255, TAXIWAY_BUSY_block, 10 }, { 10, TERM3, TERM3_block, 5 }, { 10, HELIPAD1, 0, 9 }, { 10, HELIPAD2, HELIPAD2_block, 7 }, { 10, HELITAKEOFF, HELIPAD2_block, 7 }, { 10, TAKEOFF, TAXIWAY_BUSY_block, 1 }, { 10, HANGAR, TAXIWAY_BUSY_block, 1 }, { 10, 0, TAXIWAY_BUSY_block, 9 },
    00458   { 11, 0, OUT_WAY_block, 12 },
    00459   /* takeoff */
    00460   { 12, TAKEOFF, RUNWAY_IN_OUT_block, 13 },
    00461   { 13, 0, RUNWAY_IN_OUT_block, 14 },
    00462   { 14, STARTTAKEOFF, RUNWAY_IN_OUT_block, 15 },
    00463   { 15, ENDTAKEOFF, NOTHING_block, 0 },
    00464   /* landing */
    00465   { 16, FLYING, NOTHING_block, 21 }, { 16, LANDING, IN_WAY_block, 17 }, { 16, HELILANDING, 0, 25 },
    00466   { 17, LANDING, RUNWAY_IN_OUT_block, 18 },
    00467   { 18, 0, RUNWAY_IN_OUT_block, 19 },
    00468   { 19, 0, RUNWAY_IN_OUT_block, 20 },
    00469   { 20, ENDLANDING, IN_WAY_block, 2 },
    00470   /* In Air */
    00471   { 21, 0, NOTHING_block, 22 },
    00472   { 22, 0, NOTHING_block, 23 },
    00473   { 23, 0, NOTHING_block, 24 },
    00474   { 24, 0, NOTHING_block, 16 },
    00475   /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
    00476   { 25, HELILANDING, PRE_HELIPAD_block, 26 },
    00477   { 26, HELIENDLANDING, PRE_HELIPAD_block, 26 }, { 26, HELIPAD1, 0, 27 }, { 26, HELIPAD2, 0, 28 }, { 26, HANGAR, 0, 33 },
    00478   { 27, 0, NOTHING_block, 29 }, // helipad1 approach
    00479   { 28, 0, NOTHING_block, 30 },
    00480   /* landing */
    00481   { 29, 255, NOTHING_block, 0 }, { 29, HELIPAD1, HELIPAD1_block, 6 },
    00482   { 30, 255, NOTHING_block, 0 }, { 30, HELIPAD2, HELIPAD2_block, 7 },
    00483   /* Helicopter -- takeoff */
    00484   { 31, HELITAKEOFF, NOTHING_block, 0 },
    00485   { 32, HELITAKEOFF, NOTHING_block, 0 },
    00486   { 33, 0, TAXIWAY_BUSY_block, 34 }, // need to go to hangar when waiting in air
    00487   { 34, 0, TAXIWAY_BUSY_block, 1 },
    00488   { 35, 0, HELIPAD1_block, 31 },
    00489   { 36, 0, HELIPAD2_block, 32 },
    00490   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00491 };
    00492
    00493 static const TileIndexDiffC _airport_depots_city[] = { { 5, 0 } };
    00494 static const byte _airport_terminal_city[] = { 1, 3 };
    00495 static const byte _airport_entries_city[] = {26, 29, 27, 28};
    00496 static const AirportFTAbuildup _airport_fta_city[] = {
    00497   {  0, HANGAR, NOTHING_block, 1 }, { 0, TAKEOFF, OUT_WAY_block, 1 }, { 0, 0, 0, 1 },
    00498   {  1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, 0, 0, 7 }, // for all else, go to 7
    00499   {  2, TERM1, TERM1_block, 7 }, { 2, TAKEOFF, OUT_WAY_block, 7 }, { 2, 0, 0, 7 },
    00500   {  3, TERM2, TERM2_block, 5 }, { 3, TAKEOFF, OUT_WAY_block, 6 }, { 3, 0, 0, 6 },
    00501   {  4, TERM3, TERM3_block, 5 }, { 4, TAKEOFF, OUT_WAY_block, 5 }, { 4, 0, 0, 5 },
    00502   {  5, 255, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, 0, 0, 6 },
    00503   {  6, 255, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, TERM2_block, 3 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, 0, 0, 7 },
    00504   {  7, 255, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, OUT_WAY_block, 8 }, { 7, HELITAKEOFF, 0, 22 }, { 7, HANGAR, 0, 1 }, { 7, 0, 0, 6 },
    00505   {  8, 0, OUT_WAY_block, 9 },
    00506   {  9, 0, RUNWAY_IN_OUT_block, 10 },
    00507   /* takeoff */
    00508   { 10, TAKEOFF, RUNWAY_IN_OUT_block, 11 },
    00509   { 11, STARTTAKEOFF, NOTHING_block, 12 },
    00510   { 12, ENDTAKEOFF, NOTHING_block, 0 },
    00511   /* landing */
    00512   { 13, FLYING, NOTHING_block, 18 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 23 },
    00513   { 14, LANDING, RUNWAY_IN_OUT_block, 15 },
    00514   { 15, 0, RUNWAY_IN_OUT_block, 17 },
    00515   { 16, 0, RUNWAY_IN_OUT_block, 17 }, // not used, left for compatibility
    00516   { 17, ENDLANDING, IN_WAY_block, 7 },
    00517   /* In Air */
    00518   { 18, 0, NOTHING_block, 25 },
    00519   { 19, 0, NOTHING_block, 20 },
    00520   { 20, 0, NOTHING_block, 21 },
    00521   { 21, 0, NOTHING_block, 13 },
    00522   /* helicopter */
    00523   { 22, HELITAKEOFF, NOTHING_block, 0 },
    00524   { 23, HELILANDING, IN_WAY_block, 24 },
    00525   { 24, HELIENDLANDING, IN_WAY_block, 17 },
    00526   { 25, 0, NOTHING_block, 20},
    00527   { 26, 0, NOTHING_block, 19},
    00528   { 27, 0, NOTHING_block, 28},
    00529   { 28, 0, NOTHING_block, 19},
    00530   { 29, 0, NOTHING_block, 26},
    00531   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00532 };
    00533
    00534 static const TileIndexDiffC _airport_depots_metropolitan[] = { { 5, 0 } };
    00535 static const byte _airport_terminal_metropolitan[] = { 1, 3 };
    00536 static const byte _airport_entries_metropolitan[] = {20, 19, 22, 21};
    00537 static const AirportFTAbuildup _airport_fta_metropolitan[] = {
    00538   {  0, HANGAR, NOTHING_block, 1 },
    00539   {  1, 255, TAXIWAY_BUSY_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, TERM2, 0, 6 }, { 1, TERM3, 0, 6 }, { 1, 0, 0, 7 }, // for all else, go to 7
    00540   {  2, TERM1, TERM1_block, 7 },
    00541   {  3, TERM2, TERM2_block, 6 },
    00542   {  4, TERM3, TERM3_block, 5 },
    00543   {  5, 255, TAXIWAY_BUSY_block, 0 }, { 5, TERM2, TERM2_block, 3 }, { 5, TERM3, TERM3_block, 4 }, { 5, 0, 0, 6 },
    00544   {  6, 255, TAXIWAY_BUSY_block, 0 }, { 6, TERM2, TERM2_block, 3 }, { 6, TERM3, 0, 5 }, { 6, HANGAR, 0, 1 }, { 6, 0, 0, 7 },
    00545   {  7, 255, TAXIWAY_BUSY_block, 0 }, { 7, TERM1, TERM1_block, 2 }, { 7, TAKEOFF, 0, 8 }, { 7, HELITAKEOFF, 0, 23 }, { 7, HANGAR, 0, 1 }, { 7, 0, 0, 6 },
    00546   {  8, 0, OUT_WAY_block, 9 },
    00547   {  9, 0, RUNWAY_OUT_block, 10 },
    00548   /* takeoff */
    00549   { 10, TAKEOFF, RUNWAY_OUT_block, 11 },
    00550   { 11, STARTTAKEOFF, NOTHING_block, 12 },
    00551   { 12, ENDTAKEOFF, NOTHING_block, 0 },
    00552   /* landing */
    00553   { 13, FLYING, NOTHING_block, 19 }, { 13, LANDING, 0, 14 }, { 13, HELILANDING, 0, 25 },
    00554   { 14, LANDING, RUNWAY_IN_block, 15 },
    00555   { 15, 0, RUNWAY_IN_block, 16 },
    00556   { 16, 255, RUNWAY_IN_block, 0 }, { 16, ENDLANDING, IN_WAY_block, 17 },
    00557   { 17, 255, RUNWAY_OUT_block, 0 }, { 17, ENDLANDING, IN_WAY_block, 18 },
    00558   { 18, ENDLANDING, IN_WAY_block, 27 },
    00559   /* In Air */
    00560   { 19, 0, NOTHING_block, 20 },
    00561   { 20, 0, NOTHING_block, 21 },
    00562   { 21, 0, NOTHING_block, 22 },
    00563   { 22, 0, NOTHING_block, 13 },
    00564   /* helicopter */
    00565   { 23, 0, NOTHING_block, 24 },
    00566   { 24, HELITAKEOFF, NOTHING_block, 0 },
    00567   { 25, HELILANDING, IN_WAY_block, 26 },
    00568   { 26, HELIENDLANDING, IN_WAY_block, 18 },
    00569   { 27, 255, TAXIWAY_BUSY_block, 27 }, { 27, TERM1, TERM1_block, 2 }, { 27, 0, 0, 7 },
    00570   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00571 };
    00572
    00573 static const TileIndexDiffC _airport_depots_international[] = { { 0, 3 }, { 6, 1 } };
    00574 static const byte _airport_terminal_international[] = { 2, 3, 3 };
    00575 static const byte _airport_helipad_international[] = { 1, 2 };
    00576 static const byte _airport_entries_international[] = { 38, 37, 40, 39 };
    00577 static const AirportFTAbuildup _airport_fta_international[] = {
    00578   {  0, HANGAR, NOTHING_block, 2 }, { 0, 255, TERM_GROUP1_block, 0 }, { 0, 255, TERM_GROUP2_ENTER1_block, 1 }, { 0, HELITAKEOFF, HELIPAD1_block, 2 }, { 0, 0, 0, 2 },
    00579   {  1, HANGAR, NOTHING_block, 3 }, { 1, 255, HANGAR2_AREA_block, 1 }, { 1, HELITAKEOFF, HELIPAD2_block, 3 }, { 1, 0, 0, 3 },
    00580   {  2, 255, 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, 12 }, { 2, 0, 0, 23 },
    00581   {  3, 255, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, 0, 0, 18 },
    00582   {  4, TERM1, TERM1_block, 23 }, { 4, HANGAR, AIRPORT_ENTRANCE_block, 23 }, { 4, 0, 0, 23 },
    00583   {  5, TERM2, TERM2_block, 24 }, { 5, HANGAR, AIRPORT_ENTRANCE_block, 24 }, { 5, 0, 0, 24 },
    00584   {  6, TERM3, TERM3_block, 25 }, { 6, HANGAR, AIRPORT_ENTRANCE_block, 25 }, { 6, 0, 0, 25 },
    00585   {  7, TERM4, TERM4_block, 16 }, { 7, HANGAR, HANGAR2_AREA_block, 16 }, { 7, 0, 0, 16 },
    00586   {  8, TERM5, TERM5_block, 17 }, { 8, HANGAR, HANGAR2_AREA_block, 17 }, { 8, 0, 0, 17 },
    00587   {  9, TERM6, TERM6_block, 18 }, { 9, HANGAR, HANGAR2_AREA_block, 18 }, { 9, 0, 0, 18 },
    00588   { 10, HELIPAD1, HELIPAD1_block, 10 }, { 10, HANGAR, HANGAR2_AREA_block, 16 }, { 10, HELITAKEOFF, 0, 47 },
    00589   { 11, HELIPAD2, HELIPAD2_block, 11 }, { 11, HANGAR, HANGAR2_AREA_block, 17 }, { 11, HELITAKEOFF, 0, 48 },
    00590   { 12, 0, TERM_GROUP2_ENTER1_block, 13 },
    00591   { 13, 0, TERM_GROUP2_ENTER1_block, 14 },
    00592   { 14, 0, TERM_GROUP2_ENTER2_block, 15 },
    00593   { 15, 0, TERM_GROUP2_ENTER2_block, 16 },
    00594   { 16, 255, TERM_GROUP2_block, 0 }, { 16, TERM4, TERM4_block, 7 }, { 16, HELIPAD1, HELIPAD1_block, 10 }, { 16, HELITAKEOFF, HELIPAD1_block, 10 }, { 16, 0, 0, 17 },
    00595   { 17, 255, 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, 0, 0, 18 },
    00596   { 18, 255, TERM_GROUP2_block, 0 }, { 18, TERM6, TERM6_block, 9 }, { 18, TAKEOFF, 0, 19 }, { 18, HANGAR, HANGAR2_AREA_block, 3 }, { 18, 0, 0, 17 },
    00597   { 19, 0, TERM_GROUP2_EXIT1_block, 20 },
    00598   { 20, 0, TERM_GROUP2_EXIT1_block, 21 },
    00599   { 21, 0, TERM_GROUP2_EXIT2_block, 22 },
    00600   { 22, 0, TERM_GROUP2_EXIT2_block, 26 },
    00601   { 23, 255, TERM_GROUP1_block, 0 }, { 23, TERM1, TERM1_block, 4 }, { 23, HANGAR, AIRPORT_ENTRANCE_block, 2 }, { 23, 0, 0, 24 },
    00602   { 24, 255, TERM_GROUP1_block, 0 }, { 24, TERM2, TERM2_block, 5 }, { 24, TERM1, 0, 23 }, { 24, HANGAR, 0, 23 }, { 24, 0, 0, 25 },
    00603   { 25, 255, TERM_GROUP1_block, 0 }, { 25, TERM3, TERM3_block, 6 }, { 25, TAKEOFF, 0, 26 }, { 25, 0, 0, 24 },
    00604   { 26, 255, TAXIWAY_BUSY_block, 0 }, { 26, TAKEOFF, 0, 27 }, { 26, 0, 0, 25 },
    00605   { 27, 0, OUT_WAY_block, 28 },
    00606   /* takeoff */
    00607   { 28, TAKEOFF, OUT_WAY_block, 29 },
    00608   { 29, 0, RUNWAY_OUT_block, 30 },
    00609   { 30, STARTTAKEOFF, NOTHING_block, 31 },
    00610   { 31, ENDTAKEOFF, NOTHING_block, 0 },
    00611   /* landing */
    00612   { 32, FLYING, NOTHING_block, 37 }, { 32, LANDING, 0, 33 }, { 32, HELILANDING, 0, 41 },
    00613   { 33, LANDING, RUNWAY_IN_block, 34 },
    00614   { 34, 0, RUNWAY_IN_block, 35 },
    00615   { 35, 0, RUNWAY_IN_block, 36 },
    00616   { 36, ENDLANDING, IN_WAY_block, 36 }, { 36, 255, TERM_GROUP1_block, 0 }, { 36, 255, TERM_GROUP2_ENTER1_block, 1 }, { 36, TERM4, 0, 12 }, { 36, TERM5, 0, 12 }, { 36, TERM6, 0, 12 }, { 36, 0, 0, 2 },
    00617   /* In Air */
    00618   { 37, 0, NOTHING_block, 38 },
    00619   { 38, 0, NOTHING_block, 39 },
    00620   { 39, 0, NOTHING_block, 40 },
    00621   { 40, 0, NOTHING_block, 32 },
    00622   /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
    00623   { 41, HELILANDING, PRE_HELIPAD_block, 42 },
    00624   { 42, HELIENDLANDING, PRE_HELIPAD_block, 42 }, { 42, HELIPAD1, 0, 43 }, { 42, HELIPAD2, 0, 44 }, { 42, HANGAR, 0, 49 },
    00625   { 43, 0, NOTHING_block, 45 },
    00626   { 44, 0, NOTHING_block, 46 },
    00627   /* landing */
    00628   { 45, 255, NOTHING_block, 0 }, { 45, HELIPAD1, HELIPAD1_block, 10 },
    00629   { 46, 255, NOTHING_block, 0 }, { 46, HELIPAD2, HELIPAD2_block, 11 },
    00630   /* Helicopter -- takeoff */
    00631   { 47, HELITAKEOFF, NOTHING_block, 0 },
    00632   { 48, HELITAKEOFF, NOTHING_block, 0 },
    00633   { 49, 0, HANGAR2_AREA_block, 50 }, // need to go to hangar when waiting in air
    00634   { 50, 0, HANGAR2_AREA_block, 3 },
    00635   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00636 };
    00637
    00638 /* intercontinental */
    00639 static const TileIndexDiffC _airport_depots_intercontinental[] = { { 0, 5 }, { 8, 4 } };
    00640 static const byte _airport_terminal_intercontinental[] = { 2, 4, 4 };
    00641 static const byte _airport_helipad_intercontinental[] = { 1, 2 };
    00642 static const byte _airport_entries_intercontinental[] = { 44, 43, 46, 45 };
    00643 static const AirportFTAbuildup _airport_fta_intercontinental[] = {
    00644   {  0, HANGAR, NOTHING_block, 2 }, { 0, 255, HANGAR1_AREA_block | TERM_GROUP1_block, 0 }, { 0, 255, HANGAR1_AREA_block | TERM_GROUP1_block, 1 }, { 0, TAKEOFF, HANGAR1_AREA_block | TERM_GROUP1_block, 2 }, { 0, 0, 0, 2 },
    00645   {  1, HANGAR, NOTHING_block, 3 }, { 1, 255, HANGAR2_AREA_block, 1 }, { 1, 255, HANGAR2_AREA_block, 0 }, { 1, 0, 0, 3 },
    00646   {  2, 255, HANGAR1_AREA_block, 0 }, { 2, 255, TERM_GROUP1_block, 0 }, { 2, 255, 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, 0, 0, 27 },
    00647   {  3, 255, HANGAR2_AREA_block, 0 }, { 3, HANGAR, 0, 1 }, { 3, HELITAKEOFF, 0, 75 }, {3, TAKEOFF, 0, 59}, { 3, 0, 0, 20 },
    00648   {  4, TERM1, TERM1_block, 26 }, { 4, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 26 }, { 4, 0, 0, 26 },
    00649   {  5, TERM2, TERM2_block, 27 }, { 5, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 27 }, { 5, 0, 0, 27 },
    00650   {  6, TERM3, TERM3_block, 28 }, { 6, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 28 }, { 6, 0, 0, 28 },
    00651   {  7, TERM4, TERM4_block, 29 }, { 7, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 7, 0, 0, 29 },
    00652   {  8, TERM5, TERM5_block, 18 }, { 8, HANGAR, HANGAR2_AREA_block, 18 }, { 8, 0, 0, 18 },
    00653   {  9, TERM6, TERM6_block, 19 }, { 9, HANGAR, HANGAR2_AREA_block, 19 }, { 9, 0, 0, 19 },
    00654   { 10, TERM7, TERM7_block, 20 }, { 10, HANGAR, HANGAR2_AREA_block, 20 }, { 10, 0, 0, 20 },
    00655   { 11, TERM8, TERM8_block, 21 }, { 11, HANGAR, HANGAR2_AREA_block, 21 }, { 11, 0, 0, 21 },
    00656   { 12, HELIPAD1, HELIPAD1_block, 12 }, { 12, HANGAR, 0, 70 }, { 12, HELITAKEOFF, 0, 72 },
    00657   { 13, HELIPAD2, HELIPAD2_block, 13 }, { 13, HANGAR, 0, 71 }, { 13, HELITAKEOFF, 0, 73 },
    00658   { 14, 0, TERM_GROUP2_ENTER1_block, 15 },
    00659   { 15, 0, TERM_GROUP2_ENTER1_block, 16 },
    00660   { 16, 0, TERM_GROUP2_ENTER2_block, 17 },
    00661   { 17, 0, TERM_GROUP2_ENTER2_block, 18 },
    00662   { 18, 255, TERM_GROUP2_block, 0 }, { 18, TERM5, TERM5_block, 8 }, { 18, TAKEOFF, 0, 19 }, { 18, HELITAKEOFF, HELIPAD1_block, 19 }, { 18, 0, TERM_GROUP2_EXIT1_block, 19 },
    00663   { 19, 255, TERM_GROUP2_block, 0 }, { 19, TERM6, TERM6_block, 9 }, { 19, TERM5, 0, 18 }, { 19, TAKEOFF, 0, 57 }, { 19, HELITAKEOFF, HELIPAD1_block, 20 }, { 19, 0, TERM_GROUP2_EXIT1_block, 20 }, // add exit to runway out 2
    00664   { 20, 255, 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, 0, TERM_GROUP2_EXIT1_block, 21 },
    00665   { 21, 255, 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, 0, TERM_GROUP2_EXIT1_block, 22 },
    00666   { 22, 255, 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, 0, 0, 23 },
    00667   { 23, 0, TERM_GROUP2_EXIT1_block, 70 },
    00668   { 24, 0, TERM_GROUP2_EXIT2_block, 25 },
    00669   { 25, 255, TERM_GROUP2_EXIT2_block, 0 }, { 25, HANGAR, HANGAR1_AREA_block | TERM_GROUP1_block, 29 }, { 25, 0, 0, 29 },
    00670   { 26, 255, 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, 0, 0, 27 },
    00671   { 27, 255, 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, 0, 0, 28 },
    00672   { 28, 255, 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, 0, 0, 29 },
    00673   { 29, 255, TERM_GROUP1_block, 0 }, { 29, TERM4, TERM4_block, 7 }, { 29, HANGAR, HANGAR1_AREA_block, 27 }, { 29, TAKEOFF, 0, 30 }, { 29, 0, 0, 28 },
    00674   { 30, 0, OUT_WAY_block2, 31 },
    00675   { 31, 0, OUT_WAY_block, 32 },
    00676   /* takeoff */
    00677   { 32, TAKEOFF, RUNWAY_OUT_block, 33 },
    00678   { 33, 0, RUNWAY_OUT_block, 34 },
    00679   { 34, STARTTAKEOFF, NOTHING_block, 35 },
    00680   { 35, ENDTAKEOFF, NOTHING_block, 0 },
    00681   /* landing */
    00682   { 36, 0, 0, 0 },
    00683   { 37, LANDING, RUNWAY_IN_block, 38 },
    00684   { 38, 0, RUNWAY_IN_block, 39 },
    00685   { 39, 0, RUNWAY_IN_block, 40 },
    00686   { 40, ENDLANDING, RUNWAY_IN_block, 41 },
    00687   { 41, 0, IN_WAY_block, 42 },
    00688   { 42, 255, IN_WAY_block, 0 }, { 42, 255, TERM_GROUP1_block, 0 }, { 42, 255, TERM_GROUP1_block, 1 }, { 42, HANGAR, 0, 2 }, { 42, 0, 0, 26 },
    00689   /* In Air */
    00690   { 43, 0, 0, 44 },
    00691   { 44, FLYING, 0, 45 }, { 44, HELILANDING, 0, 47 }, { 44, LANDING, 0, 69 }, { 44, 0, 0, 45 },
    00692   { 45, 0, 0, 46 },
    00693   { 46, FLYING, 0, 43 }, { 46, LANDING, 0, 76 }, { 46, 0, 0, 43 },
    00694   /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
    00695   { 47, HELILANDING, PRE_HELIPAD_block, 48 },
    00696   { 48, HELIENDLANDING, PRE_HELIPAD_block, 48 }, { 48, HELIPAD1, 0, 49 }, { 48, HELIPAD2, 0, 50 }, { 48, HANGAR, 0, 55 },
    00697   { 49, 0, NOTHING_block, 51 },
    00698   { 50, 0, NOTHING_block, 52 },
    00699   /* landing */
    00700   { 51, 255, NOTHING_block, 0 }, { 51, HELIPAD1, HELIPAD1_block, 12 }, { 51, HANGAR, 0, 55 }, { 51, 0, 0, 12 },
    00701   { 52, 255, NOTHING_block, 0 }, { 52, HELIPAD2, HELIPAD2_block, 13 }, { 52, HANGAR, 0, 55 }, { 52, 0, 0, 13 },
    00702   /* Helicopter -- takeoff */
    00703   { 53, HELITAKEOFF, NOTHING_block, 0 },
    00704   { 54, HELITAKEOFF, NOTHING_block, 0 },
    00705   { 55, 0, HANGAR2_AREA_block, 56 }, // need to go to hangar when waiting in air
    00706   { 56, 0, HANGAR2_AREA_block, 3 },
    00707   /* runway 2 out support */
    00708   { 57, 255, OUT_WAY2_block, 0 }, { 57, TAKEOFF, 0, 58 }, { 57, 0, 0, 58 },
    00709   { 58, 0, OUT_WAY2_block, 59 },
    00710   { 59, TAKEOFF, RUNWAY_OUT2_block, 60 }, // takeoff
    00711   { 60, 0, RUNWAY_OUT2_block, 61 },
    00712   { 61, STARTTAKEOFF, NOTHING_block, 62 },
    00713   { 62, ENDTAKEOFF, NOTHING_block, 0 },
    00714   /* runway 2 in support */
    00715   { 63, LANDING, RUNWAY_IN2_block, 64 },
    00716   { 64, 0, RUNWAY_IN2_block, 65 },
    00717   { 65, 0, RUNWAY_IN2_block, 66 },
    00718   { 66, ENDLANDING, RUNWAY_IN2_block, 0 }, { 66, 255, 0, 1 }, { 66, 255, 0, 0 }, { 66, 0, 0, 67 },
    00719   { 67, 0, IN_WAY2_block, 68 },
    00720   { 68, 255, IN_WAY2_block, 0 }, { 68, 255, TERM_GROUP2_block, 1 }, { 68, 255, TERM_GROUP1_block, 0 }, { 68, HANGAR, HANGAR2_AREA_block, 22 }, { 68, 0, 0, 22 },
    00721   { 69, 255, RUNWAY_IN2_block, 0 }, { 69, 0, RUNWAY_IN2_block, 63 },
    00722   { 70, 255, TERM_GROUP2_EXIT1_block, 0 }, { 70, HELIPAD1, HELIPAD1_block, 12 }, { 70, HELITAKEOFF, HELIPAD1_block, 12 }, { 70, 0, 0, 71 },
    00723   { 71, 255, TERM_GROUP2_EXIT1_block, 0 }, { 71, HELIPAD2, HELIPAD2_block, 13 }, { 71, HELITAKEOFF, HELIPAD1_block, 12 }, { 71, 0, 0, 24 },
    00724   { 72, 0, HELIPAD1_block, 53 },
    00725   { 73, 0, HELIPAD2_block, 54 },
    00726   { 74, HELITAKEOFF, NOTHING_block, 0 },
    00727   { 75, HELITAKEOFF, NOTHING_block, 0 },
    00728   { 76, 255, RUNWAY_IN_block, 0 }, { 76, 0, RUNWAY_IN_block, 37 },
    00729   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00730 };
    00731
    00732
    00733 /* heliports, oilrigs don't have depots */
    00734 static const byte _airport_helipad_heliport_oilrig[] = { 1, 1 };
    00735 static const byte _airport_entries_heliport_oilrig[] = { 7, 7, 7, 7 };
    00736 static const AirportFTAbuildup _airport_fta_heliport_oilrig[] = {
    00737   { 0, HELIPAD1, HELIPAD1_block, 1 },
    00738   { 1, HELITAKEOFF, NOTHING_block, 0 }, // takeoff
    00739   { 2, 255, AIRPORT_BUSY_block, 0 }, { 2, HELILANDING, 0, 3 }, { 2, HELITAKEOFF, 0, 1 },
    00740   { 3, HELILANDING, AIRPORT_BUSY_block, 4 },
    00741   { 4, HELIENDLANDING, AIRPORT_BUSY_block, 4 }, { 4, HELIPAD1, HELIPAD1_block, 0 }, { 4, HELITAKEOFF, 0, 2 },
    00742   /* In Air */
    00743   { 5, 0, NOTHING_block, 6 },
    00744   { 6, 0, NOTHING_block, 7 },
    00745   { 7, 0, NOTHING_block, 8 },
    00746   { 8, FLYING, NOTHING_block, 5 }, { 8, HELILANDING, HELIPAD1_block, 2 }, // landing
    00747   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00748 };
    00749
    00750 /* helidepots */
    00751 static const TileIndexDiffC _airport_depots_helidepot[] = { { 1, 0 } };
    00752 static const byte _airport_helipad_helidepot[] = { 1, 1 };
    00753 static const byte _airport_entries_helidepot[] = { 4, 4, 4, 4 };
    00754 static const AirportFTAbuildup _airport_fta_helidepot[] = {
    00755   {  0, HANGAR, NOTHING_block, 1 },
    00756   {  1, 255, HANGAR2_AREA_block, 0 }, { 1, HANGAR, 0, 0 }, { 1, HELIPAD1, HELIPAD1_block, 14 }, { 1, HELITAKEOFF, 0, 15 }, { 1, 0, 0, 0 },
    00757   {  2, FLYING, NOTHING_block, 3 }, { 2, HELILANDING, PRE_HELIPAD_block, 7 }, { 2, HANGAR, 0, 12 }, { 2, HELITAKEOFF, NOTHING_block, 16 },
    00758   /* In Air */
    00759   {  3, 0, NOTHING_block, 4 },
    00760   {  4, 0, NOTHING_block, 5 },
    00761   {  5, 0, NOTHING_block, 6 },
    00762   {  6, 0, NOTHING_block, 2 },
    00763   /* Helicopter -- stay in air in special place as a buffer to choose from helipads */
    00764   {  7, HELILANDING, PRE_HELIPAD_block, 8 },
    00765   {  8, HELIENDLANDING, PRE_HELIPAD_block, 8 }, { 8, HELIPAD1, 0, 9 }, { 8, HANGAR, 0, 12 }, { 8, 0, 0, 2 },
    00766   {  9, 0, NOTHING_block, 10 },
    00767   /* landing */
    00768   { 10, 255, NOTHING_block, 10 }, { 10, HELIPAD1, HELIPAD1_block, 14 }, { 10, HANGAR, 0, 1 }, { 10, 0, 0, 14 },
    00769   /* Helicopter -- takeoff */
    00770   { 11, HELITAKEOFF, NOTHING_block, 0 },
    00771   { 12, 0, HANGAR2_AREA_block, 13 }, // need to go to hangar when waiting in air
    00772   { 13, 0, HANGAR2_AREA_block, 1 },
    00773   { 14, HELIPAD1, HELIPAD1_block, 14 }, { 14, HANGAR, 0, 1 }, { 14, HELITAKEOFF, 0, 17 },
    00774   { 15, HELITAKEOFF, NOTHING_block, 0 }, // takeoff outside depot
    00775   { 16, HELITAKEOFF, 0, 14 },
    00776   { 17, 0, NOTHING_block, 11 },
    00777   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00778 };
    00779
    00780 /* helistation */
    00781 static const TileIndexDiffC _airport_depots_helistation[] = { { 0, 0 } };
    00782 static const byte _airport_helipad_helistation[] = { 1, 3 };
    00783 static const byte _airport_entries_helistation[] = { 25, 25, 25, 25 };
    00784 static const AirportFTAbuildup _airport_fta_helistation[] = {
    00785   {  0, HANGAR, NOTHING_block, 8 },    { 0, HELIPAD1, 0, 1 }, { 0, HELIPAD2, 0, 1 }, { 0, HELIPAD3, 0, 1 }, { 0, HELITAKEOFF, 0, 1 }, { 0, 0, 0, 0 },
    00786   {  1, 255, HANGAR2_AREA_block, 0 },  { 1, HANGAR, 0, 0 }, { 1, HELITAKEOFF, 0, 3 }, { 1, 0, 0, 4 },
    00787   /* landing */
    00788   {  2, FLYING, NOTHING_block, 28 },   { 2, HELILANDING, 0, 15 }, { 2, 0, 0, 28 },
    00789   /* helicopter side */
    00790   {  3, HELITAKEOFF, NOTHING_block, 0 }, // helitakeoff outside hangar2
    00791   {  4, 255, TAXIWAY_BUSY_block, 0 },  { 4, HANGAR, HANGAR2_AREA_block, 1 }, { 4, HELITAKEOFF, 0, 1 }, { 4, 0, 0, 5 },
    00792   {  5, 255, TAXIWAY_BUSY_block, 0 },  { 5, HELIPAD1, HELIPAD1_block, 6 }, { 5, HELIPAD2, HELIPAD2_block, 7 }, { 5, HELIPAD3, HELIPAD3_block, 8 }, { 5, 0, 0, 4 },
    00793   {  6, HELIPAD1, HELIPAD1_block, 5 }, { 6, HANGAR, HANGAR2_AREA_block, 5 }, { 6, HELITAKEOFF, 0, 9 }, { 6, 0, 0, 6 },
    00794   {  7, HELIPAD2, HELIPAD2_block, 5 }, { 7, HANGAR, HANGAR2_AREA_block, 5 }, { 7, HELITAKEOFF, 0, 10 }, { 7, 0, 0, 7 },
    00795   {  8, HELIPAD3, HELIPAD3_block, 5 }, { 8, HANGAR, HANGAR2_AREA_block, 5 }, { 8, HELITAKEOFF, 0, 11 }, { 8, 0, 0, 8 },
    00796   {  9, 0, HELIPAD1_block, 12 },
    00797   { 10, 0, HELIPAD2_block, 13 },
    00798   { 11, 0, HELIPAD3_block, 14 },
    00799   { 12, HELITAKEOFF, NOTHING_block, 0 },
    00800   { 13, HELITAKEOFF, NOTHING_block, 0 },
    00801   { 14, HELITAKEOFF, NOTHING_block, 0 },
    00802   /* heli - in flight moves */
    00803   { 15, HELILANDING, PRE_HELIPAD_block, 16 },
    00804   { 16, HELIENDLANDING, PRE_HELIPAD_block, 16 }, { 16, HELIPAD1, 0, 17 }, { 16, HELIPAD2, 0, 18 }, { 16, HELIPAD3, 0, 19 }, { 16, HANGAR, 0, 23 },
    00805   { 17, 0, NOTHING_block, 20 },
    00806   { 18, 0, NOTHING_block, 21 },
    00807   { 19, 0, NOTHING_block, 22 },
    00808   /* heli landing */
    00809   { 20, 255, NOTHING_block, 0 }, { 20, HELIPAD1, HELIPAD1_block, 6 }, { 20, HANGAR, 0, 23 }, { 20, 0, 0, 6 },
    00810   { 21, 255, NOTHING_block, 0 }, { 21, HELIPAD2, HELIPAD2_block, 7 }, { 21, HANGAR, 0, 23 }, { 21, 0, 0, 7 },
    00811   { 22, 255, NOTHING_block, 0 }, { 22, HELIPAD3, HELIPAD3_block, 8 }, { 22, HANGAR, 0, 23 }, { 22, 0, 0, 8 },
    00812   { 23, 0, HANGAR2_AREA_block, 24 }, // need to go to helihangar when waiting in air
    00813   { 24, 0, HANGAR2_AREA_block, 1 },
    00814   { 25, 0, NOTHING_block, 26 },
    00815   { 26, 0, NOTHING_block, 27 },
    00816   { 27, 0, NOTHING_block, 2 },
    00817   { 28, 0, NOTHING_block, 29 },
    00818   { 29, 0, NOTHING_block, 30 },
    00819   { 30, 0, NOTHING_block, 31 },
    00820   { 31, 0, NOTHING_block, 32 },
    00821   { 32, 0, NOTHING_block, 25 },
    00822   { MAX_ELEMENTS, 0, 0, 0 } // end marker. DO NOT REMOVE
    00823 };
    00824
    00825 #endif /* AIRPORT_MOVEMENT_H */