airport.cpp File Reference

Functions related to airports. More...

#include "stdafx.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 AirportFTAAirportBuildAutomata (uint nofelements, const AirportFTAbuildup *apFA)
static byte AirportGetTerminalCount (const byte *terminals, byte *groups)
 We calculate the terminal/helipod count based on the data passed to us This data (terminals) contains an index as a first element as to how many groups there are, and then the number of terminals for each group.
static byte AirportTestFTA (uint nofelements, const AirportFTA *layout, const byte *terminals)
const AirportFTAClassGetAirport (const byte airport_type)
uint32 GetValidAirports ()
 Get buildable airport bitmask.

Variables

static AirportFTAClassDummyAirport
static AirportFTAClassCountryAirport
static AirportFTAClassCityAirport
static AirportFTAClassOilrig
static AirportFTAClassHeliport
static AirportFTAClassMetropolitanAirport
static AirportFTAClassInternationalAirport
static AirportFTAClassCommuterAirport
static AirportFTAClassHeliDepot
static AirportFTAClassIntercontinentalAirport
static AirportFTAClassHeliStation


Detailed Description

Functions related to airports.

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 475 of file airport.cpp.

References _cur_year, _settings_game, StationSettings::always_small_airport, SetBit(), and GameSettings::station.

Referenced by CmdBuildAirport(), and AIAirport::IsValidAirportType().


Generated on Sun Nov 15 15:40:17 2009 for OpenTTD by  doxygen 1.5.6