# airport.cpp File Reference

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "debug.h"`
`#include "airport.h"`
`#include "airport_movement.h"`
`#include "core/bitmath_func.hpp"`
`#include "core/alloc_func.hpp"`
`#include "date_func.h"`
`#include "settings_type.h"`

Go to the source code of this file.

## Functions
void | InitializeAirports ()
void | UnInitializeAirports ()
static uint16 | AirportGetNofElements (const AirportFTAbuildup *apFA)
| Get the number of elements of a source Airport state automata Since it is actually just a big array of AirportFTA types, we only know one element from the other by differing 'position' identifiers.
static AirportFTA * | AirportBuildAutomata (uint nofelements, const AirportFTAbuildup *apFA)
static byte | AirportGetTerminalCount (const byte *terminals, byte *groups)
static byte | AirportTestFTA (uint nofelements, const AirportFTA *layout, const byte *terminals)
const AirportFTAClass * | GetAirport (const byte airport_type)
uint32 | GetValidAirports ()
| Get buildable airport bitmask.
## Variables
static AirportFTAClass * | DummyAirport
static AirportFTAClass * | CountryAirport
static AirportFTAClass * | CityAirport
static AirportFTAClass * | Oilrig
static AirportFTAClass * | Heliport
static AirportFTAClass * | MetropolitanAirport
static AirportFTAClass * | InternationalAirport
static AirportFTAClass * | CommuterAirport
static AirportFTAClass * | HeliDepot
static AirportFTAClass * | IntercontinentalAirport
static AirportFTAClass * | HeliStation

## Detailed Description

Definition in file airport.cpp.

## Function Documentation

uint32 GetValidAirports | ( |  | ) |

Get buildable airport bitmask.

Returns:
  get all buildable airports at this given time, bitmasked. Bit 0 means the small airport is buildable, etc.

Todo:
  set availability of airports by year, instead of airplane

Definition at line 474 of file airport.cpp.

References SetBit().

Referenced by CmdBuildAirport().