OpenTTD Source: src/table/airport_defaults.h File Reference

OpenTTD Source 15.3

Macros | Variables
airport_defaults.h File Reference

Tables with default values for airports and airport tiles. More...

`#include "../timer/timer_game_calendar.h"`

Go to the source code of this file.

## Macros
#define | MK(x, y, m) {{x, y}, m}
| Definition of an airport tiles layout.
#define | AS_GENERIC(fsm, layouts, depots, size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, enabled) {{class_id, 0}, fsm, layouts, depots, size_x, size_y, noise, catchment, TimerGameCalendar::Year{min_year}, TimerGameCalendar::Year{max_year}, name, ttdpatch_type, preview, maint_cost, enabled, SubstituteGRFFileProps(AT_INVALID), {}}
| General AirportSpec definition.
#define | AS_ND(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview)
| AirportSpec definition for airports without any depot.
#define | AS(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview)
| AirportSpec definition for airports with at least one depot.

## Variables
static const std::initializer_list< AirportTileTable > | _tile_table_country_0
| Tiles for Country Airfield (small)
static const std::initializer_list< AirportTileLayout > | _tile_table_country
static const std::initializer_list< AirportTileTable > | _tile_table_commuter_0
| Tiles for Commuter Airfield (small)
static const std::initializer_list< AirportTileLayout > | _tile_table_commuter
static const std::initializer_list< AirportTileTable > | _tile_table_city_0
| Tiles for City Airport (large)
static const std::initializer_list< AirportTileLayout > | _tile_table_city
static const std::initializer_list< AirportTileTable > | _tile_table_metropolitan_0
| Tiles for Metropolitan Airport (large) - 2 runways.
static const std::initializer_list< AirportTileLayout > | _tile_table_metropolitan
static const std::initializer_list< AirportTileTable > | _tile_table_international_0
| Tiles for International Airport (large) - 2 runways.
static const std::initializer_list< AirportTileLayout > | _tile_table_international
static const std::initializer_list< AirportTileTable > | _tile_table_intercontinental_0
| Tiles for International Airport (large) - 2 runways.
static const std::initializer_list< AirportTileLayout > | _tile_table_intercontinental
static const std::initializer_list< AirportTileTable > | _tile_table_heliport_0
| Tiles for Heliport.
static const std::initializer_list< AirportTileLayout > | _tile_table_heliport
static const std::initializer_list< AirportTileTable > | _tile_table_helidepot_0
| Tiles for Helidepot.
static const std::initializer_list< AirportTileLayout > | _tile_table_helidepot
static const std::initializer_list< AirportTileTable > | _tile_table_helistation_0
| Tiles for Helistation.
static const std::initializer_list< AirportTileLayout > | _tile_table_helistation
const AirportSpec | _origin_airport_specs []

## Detailed Description

Tables with default values for airports and airport tiles.

Definition in file airport_defaults.h.

## Macro Definition Documentation

## ◆ AS

#define AS | ( |  | ap_name,
|  |  | size_x,
|  |  | size_y,
|  |  | min_year,
|  |  | max_year,
|  |  | catchment,
|  |  | noise,
|  |  | maint_cost,
|  |  | ttdpatch_type,
|  |  | class_id,
|  |  | name,
|  |  | preview
| ) |  |

Value:
AS_GENERIC(&_airportfta_##ap_name, _tile_table_##ap_name, _airport_depots_##ap_name, \
size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, true)
AS_GENERIC
#define AS_GENERIC(fsm, layouts, depots, size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, enabled)
General AirportSpec definition.
Definition airport_defaults.h:365

AirportSpec definition for airports with at least one depot.

Definition at line 374 of file airport_defaults.h.

## ◆ AS_GENERIC

#define AS_GENERIC | ( |  | fsm,
|  |  | layouts,
|  |  | depots,
|  |  | size_x,
|  |  | size_y,
|  |  | noise,
|  |  | catchment,
|  |  | min_year,
|  |  | max_year,
|  |  | maint_cost,
|  |  | ttdpatch_type,
|  |  | class_id,
|  |  | name,
|  |  | preview,
|  |  | enabled
| ) |  | {{class_id, 0}, fsm, layouts, depots, size_x, size_y, noise, catchment, TimerGameCalendar::Year{min_year}, TimerGameCalendar::Year{max_year}, name, ttdpatch_type, preview, maint_cost, enabled, SubstituteGRFFileProps(AT_INVALID), {}}

General AirportSpec definition.

Definition at line 365 of file airport_defaults.h.

## ◆ AS_ND

#define AS_ND | ( |  | ap_name,
|  |  | size_x,
|  |  | size_y,
|  |  | min_year,
|  |  | max_year,
|  |  | catchment,
|  |  | noise,
|  |  | maint_cost,
|  |  | ttdpatch_type,
|  |  | class_id,
|  |  | name,
|  |  | preview
| ) |  |

Value:
AS_GENERIC(&_airportfta_##ap_name, _tile_table_##ap_name, {}, \
size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, true)

AirportSpec definition for airports without any depot.

Definition at line 369 of file airport_defaults.h.

## ◆ MK

#define MK | ( |  | x,
|  |  | y,
|  |  | m
| ) |  | {{x, y}, m}

Definition of an airport tiles layout.

Parameters

  x | offset x of this tile
  y | offset y of this tile
  m | StationGfx of the tile

See also
  _airport_specs
  AirportTileTable

Definition at line 23 of file airport_defaults.h.

## Variable Documentation

## ◆ _origin_airport_specs

const AirportSpec _origin_airport_specs[]
| extern

Initial value:
= {
AS(country, 4, 3, 0, 1959, 4, 3, 7, ATP_TTDP_SMALL, APC_SMALL, STR_AIRPORT_SMALL, SPR_AIRPORT_PREVIEW_SMALL),
AS(city, 6, 6, 1955, CalendarTime::MAX_YEAR, 5, 5, 24, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_CITY, SPR_AIRPORT_PREVIEW_LARGE),
AS_ND(heliport, 1, 1, 1963, CalendarTime::MAX_YEAR, 4, 1, 4, ATP_TTDP_HELIPORT, APC_HELIPORT, STR_AIRPORT_HELIPORT, SPR_AIRPORT_PREVIEW_HELIPORT),
AS(metropolitan, 6, 6, 1980, CalendarTime::MAX_YEAR, 6, 8, 28, ATP_TTDP_LARGE, APC_LARGE, STR_AIRPORT_METRO, SPR_AIRPORT_PREVIEW_METROPOLITAN),
AS(international, 7, 7, 1990, CalendarTime::MAX_YEAR, 8, 17, 42, ATP_TTDP_LARGE, APC_HUB, STR_AIRPORT_INTERNATIONAL, SPR_AIRPORT_PREVIEW_INTERNATIONAL),
AS(commuter, 5, 4, 1983, CalendarTime::MAX_YEAR, 4, 4, 20, ATP_TTDP_SMALL, APC_SMALL, STR_AIRPORT_COMMUTER, SPR_AIRPORT_PREVIEW_COMMUTER),
AS(helidepot, 2, 2, 1976, CalendarTime::MAX_YEAR, 4, 2, 7, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELIDEPOT, SPR_AIRPORT_PREVIEW_HELIDEPOT),
AS(intercontinental, 9, 11, 2002, CalendarTime::MAX_YEAR, 10, 25, 72, ATP_TTDP_LARGE, APC_HUB, STR_AIRPORT_INTERCONTINENTAL, SPR_AIRPORT_PREVIEW_INTERCONTINENTAL),
AS(helistation, 4, 2, 1980, CalendarTime::MAX_YEAR, 4, 3, 14, ATP_TTDP_SMALL, APC_HELIPORT, STR_AIRPORT_HELISTATION, SPR_AIRPORT_PREVIEW_HELISTATION),
AS_GENERIC(&_airportfta_oilrig, {}, {}, 1, 1, 0, 4, 0, 0, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, 0, false),
}
AS_ND
#define AS_ND(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview)
AirportSpec definition for airports without any depot.
Definition airport_defaults.h:369
AS
#define AS(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview)
AirportSpec definition for airports with at least one depot.
Definition airport_defaults.h:374
TimerGameConst< struct Calendar >::MAX_YEAR
static constexpr TimerGame< struct Calendar >::Year MAX_YEAR
MAX_YEAR, nicely rounded value of the number of years that can be encoded in a single 32 bits date,...
Definition timer_game_common.h:173
APC_HELIPORT
@ APC_HELIPORT
id for heliports
Definition newgrf_airport.h:79
APC_SMALL
@ APC_SMALL
id for small airports class
Definition newgrf_airport.h:76
APC_LARGE
@ APC_LARGE
id for large airports class
Definition newgrf_airport.h:77
APC_HUB
@ APC_HUB
id for hub airports class
Definition newgrf_airport.h:78
ATP_TTDP_HELIPORT
@ ATP_TTDP_HELIPORT
Same as AT_HELIPORT.
Definition newgrf_airport.h:90
ATP_TTDP_OILRIG
@ ATP_TTDP_OILRIG
Same as AT_OILRIG.
Definition newgrf_airport.h:91
ATP_TTDP_SMALL
@ ATP_TTDP_SMALL
Same as AT_SMALL.
Definition newgrf_airport.h:88
ATP_TTDP_LARGE
@ ATP_TTDP_LARGE
Same as AT_LARGE.
Definition newgrf_airport.h:89

## ◆ _tile_table_city

const std::initializer_list<AirportTileLayout> _tile_table_city
| static

Initial value:
= {
{ _tile_table_city_0, DIR_N },
}
_tile_table_city_0
static const std::initializer_list< AirportTileTable > _tile_table_city_0
Tiles for City Airport (large)
Definition airport_defaults.h:74
DIR_N
@ DIR_N
North.
Definition direction_type.h:26

Definition at line 113 of file airport_defaults.h.

## ◆ _tile_table_city_0

const std::initializer_list<AirportTileTable> _tile_table_city_0
| static

Tiles for City Airport (large)

Definition at line 74 of file airport_defaults.h.

## ◆ _tile_table_commuter

const std::initializer_list<AirportTileLayout> _tile_table_commuter
| static

Initial value:
= {
{ _tile_table_commuter_0, DIR_N },
}
_tile_table_commuter_0
static const std::initializer_list< AirportTileTable > _tile_table_commuter_0
Tiles for Commuter Airfield (small)
Definition airport_defaults.h:46

Definition at line 69 of file airport_defaults.h.

## ◆ _tile_table_commuter_0

const std::initializer_list<AirportTileTable> _tile_table_commuter_0
| static

Initial value:
= {
MK(0, 0, APT_TOWER),
MK(1, 0, APT_BUILDING_3),
MK(2, 0, APT_HELIPAD_2_FENCE_NW),
MK(3, 0, APT_HELIPAD_2_FENCE_NW),
MK(4, 0, APT_DEPOT_SE),
MK(0, 1, APT_APRON_FENCE_NE),
MK(1, 1, APT_APRON),
MK(2, 1, APT_APRON),
MK(3, 1, APT_APRON),
MK(4, 1, APT_APRON_FENCE_SW),
MK(0, 2, APT_APRON_FENCE_NE),
MK(1, 2, APT_STAND),
MK(2, 2, APT_STAND),
MK(3, 2, APT_STAND),
MK(4, 2, APT_APRON_FENCE_SW),
MK(0, 3, APT_RUNWAY_END_FENCE_SE),
MK(1, 3, APT_RUNWAY_2),
MK(2, 3, APT_RUNWAY_2),
MK(3, 3, APT_RUNWAY_2),
MK(4, 3, APT_RUNWAY_END_FENCE_SE),
}
MK
#define MK(x, y, m)
Definition of an airport tiles layout.
Definition airport_defaults.h:23

Tiles for Commuter Airfield (small)

Definition at line 46 of file airport_defaults.h.

## ◆ _tile_table_country

const std::initializer_list<AirportTileLayout> _tile_table_country
| static

Initial value:
= {
{ _tile_table_country_0, DIR_N },
}
_tile_table_country_0
static const std::initializer_list< AirportTileTable > _tile_table_country_0
Tiles for Country Airfield (small)
Definition airport_defaults.h:26

Definition at line 41 of file airport_defaults.h.

## ◆ _tile_table_country_0

const std::initializer_list<AirportTileTable> _tile_table_country_0
| static

Initial value:
= {
MK(0, 0, APT_SMALL_BUILDING_1),
MK(1, 0, APT_SMALL_BUILDING_2),
MK(2, 0, APT_SMALL_BUILDING_3),
MK(3, 0, APT_SMALL_DEPOT_SE),
MK(0, 1, APT_GRASS_FENCE_NE_FLAG),
MK(1, 1, APT_GRASS_1),
MK(2, 1, APT_GRASS_2),
MK(3, 1, APT_GRASS_FENCE_SW),
MK(0, 2, APT_RUNWAY_SMALL_FAR_END),
MK(1, 2, APT_RUNWAY_SMALL_MIDDLE),
MK(2, 2, APT_RUNWAY_SMALL_MIDDLE),
MK(3, 2, APT_RUNWAY_SMALL_NEAR_END),
}

Tiles for Country Airfield (small)

Definition at line 26 of file airport_defaults.h.

## ◆ _tile_table_helidepot

const std::initializer_list<AirportTileLayout> _tile_table_helidepot
| static

Initial value:
= {
{ _tile_table_helidepot_0, DIR_N },
}
_tile_table_helidepot_0
static const std::initializer_list< AirportTileTable > _tile_table_helidepot_0
Tiles for Helidepot.
Definition airport_defaults.h:335

Definition at line 342 of file airport_defaults.h.

## ◆ _tile_table_helidepot_0

const std::initializer_list<AirportTileTable> _tile_table_helidepot_0
| static

Initial value:
= {
MK(0, 0, APT_LOW_BUILDING_FENCE_N),
MK(1, 0, APT_DEPOT_SE),
MK(0, 1, APT_HELIPAD_2_FENCE_NE_SE),
MK(1, 1, APT_APRON_FENCE_SE_SW),
}

Tiles for Helidepot.

Definition at line 335 of file airport_defaults.h.

## ◆ _tile_table_heliport

const std::initializer_list<AirportTileLayout> _tile_table_heliport
| static

Initial value:
= {
{ _tile_table_heliport_0, DIR_N },
}
_tile_table_heliport_0
static const std::initializer_list< AirportTileTable > _tile_table_heliport_0
Tiles for Heliport.
Definition airport_defaults.h:326

Definition at line 330 of file airport_defaults.h.

## ◆ _tile_table_heliport_0

const std::initializer_list<AirportTileTable> _tile_table_heliport_0
| static

Initial value:
= {
MK(0, 0, APT_HELIPORT),
}

Tiles for Heliport.

Definition at line 326 of file airport_defaults.h.

## ◆ _tile_table_helistation

const std::initializer_list<AirportTileLayout> _tile_table_helistation
| static

Initial value:
= {
{ _tile_table_helistation_0, DIR_N },
}
_tile_table_helistation_0
static const std::initializer_list< AirportTileTable > _tile_table_helistation_0
Tiles for Helistation.
Definition airport_defaults.h:347

Definition at line 358 of file airport_defaults.h.

## ◆ _tile_table_helistation_0

const std::initializer_list<AirportTileTable> _tile_table_helistation_0
| static

Initial value:
= {
MK(0, 0, APT_DEPOT_SE),
MK(1, 0, APT_LOW_BUILDING_FENCE_NW),
MK(2, 0, APT_HELIPAD_3_FENCE_NW),
MK(3, 0, APT_HELIPAD_3_FENCE_NW_SW),
MK(0, 1, APT_APRON_FENCE_NE_SE),
MK(1, 1, APT_APRON_FENCE_SE),
MK(2, 1, APT_APRON_FENCE_SE),
MK(3, 1, APT_HELIPAD_3_FENCE_SE_SW),
}

Tiles for Helistation.

Definition at line 347 of file airport_defaults.h.

## ◆ _tile_table_intercontinental

const std::initializer_list<AirportTileLayout> _tile_table_intercontinental
| static

Initial value:
= {
{ _tile_table_intercontinental_0, DIR_N },
}
_tile_table_intercontinental_0
static const std::initializer_list< AirportTileTable > _tile_table_intercontinental_0
Tiles for International Airport (large) - 2 runways.
Definition airport_defaults.h:219

Definition at line 321 of file airport_defaults.h.

## ◆ _tile_table_intercontinental_0

const std::initializer_list<AirportTileTable> _tile_table_intercontinental_0
| static

Tiles for International Airport (large) - 2 runways.

Definition at line 219 of file airport_defaults.h.

## ◆ _tile_table_international

const std::initializer_list<AirportTileLayout> _tile_table_international
| static

Initial value:
= {
{ _tile_table_international_0, DIR_N },
}
_tile_table_international_0
static const std::initializer_list< AirportTileTable > _tile_table_international_0
Tiles for International Airport (large) - 2 runways.
Definition airport_defaults.h:162

Definition at line 214 of file airport_defaults.h.

## ◆ _tile_table_international_0

const std::initializer_list<AirportTileTable> _tile_table_international_0
| static

Tiles for International Airport (large) - 2 runways.

Definition at line 162 of file airport_defaults.h.

## ◆ _tile_table_metropolitan

const std::initializer_list<AirportTileLayout> _tile_table_metropolitan
| static

Initial value:
= {
{ _tile_table_metropolitan_0, DIR_N },
}
_tile_table_metropolitan_0
static const std::initializer_list< AirportTileTable > _tile_table_metropolitan_0
Tiles for Metropolitan Airport (large) - 2 runways.
Definition airport_defaults.h:118

Definition at line 157 of file airport_defaults.h.

## ◆ _tile_table_metropolitan_0

const std::initializer_list<AirportTileTable> _tile_table_metropolitan_0
| static

Tiles for Metropolitan Airport (large) - 2 runways.

Definition at line 118 of file airport_defaults.h.