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

OpenTTD Source 14.0-RC3

Macros | Variables
airport_defaults.h File Reference
`#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. More...
#define | MKEND {{-0x80, 0}, 0}
| Terminator of airport tiles layout definition.
#define | AS_GENERIC(fsm, att, rot, att_len, depot_tbl, num_depots, size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, enabled) {fsm, att, rot, att_len, depot_tbl, num_depots, size_x, size_y, noise, catchment, min_year, max_year, name, ttdpatch_type, class_id, preview, maint_cost, enabled, GRFFileProps(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. More...
#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. More...

## Variables
static const AirportTileTable | _tile_table_country_0 []
| Tiles for Country Airfield (small) More...
static const AirportTileTable *const | _tile_table_country []
static const AirportTileTable | _tile_table_commuter_0 []
| Tiles for Commuter Airfield (small) More...
static const AirportTileTable *const | _tile_table_commuter []
static const AirportTileTable | _tile_table_city_0 []
| Tiles for City Airport (large)
static const AirportTileTable *const | _tile_table_city []
static const AirportTileTable | _tile_table_metropolitan_0 []
| Tiles for Metropolitain Airport (large) - 2 runways.
static const AirportTileTable *const | _tile_table_metropolitan []
static const AirportTileTable | _tile_table_international_0 []
| Tiles for International Airport (large) - 2 runways.
static const AirportTileTable *const | _tile_table_international []
static const AirportTileTable | _tile_table_intercontinental_0 []
| Tiles for International Airport (large) - 2 runways.
static const AirportTileTable *const | _tile_table_intercontinental []
static const AirportTileTable | _tile_table_heliport_0 []
| Tiles for Heliport. More...
static const AirportTileTable *const | _tile_table_heliport []
static const AirportTileTable | _tile_table_helidepot_0 []
| Tiles for Helidepot. More...
static const AirportTileTable *const | _tile_table_helidepot []
static const AirportTileTable | _tile_table_helistation_0 []
| Tiles for Helistation. More...
static const AirportTileTable *const | _tile_table_helistation []
static const Direction | _default_airports_rotation []
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, _default_airports_rotation, lengthof(_tile_table_##ap_name), _airport_depots_##ap_name, lengthof(_airport_depots_##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 with at least one depot.

Definition at line 393 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, _default_airports_rotation, lengthof(_tile_table_##ap_name), nullptr, 0, \
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 388 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

## ◆ _default_airports_rotation

const Direction _default_airports_rotation[]
| static

Initial value:
= {
DIR_N,
}

Definition at line 376 of file airport_defaults.h.

## ◆ _origin_airport_specs

const AirportSpec _origin_airport_specs[]

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, nullptr, _default_airports_rotation, 0, nullptr, 0, 1, 1, 0, 4, 0, 0, 0, ATP_TTDP_OILRIG, APC_HELIPORT, STR_NULL, 0, false),
}

## ◆ _tile_table_city

const AirportTileTable* const _tile_table_city[]
| static

Initial value:
= {
_tile_table_city_0,
}

Definition at line 121 of file airport_defaults.h.

## ◆ _tile_table_commuter

const AirportTileTable* const _tile_table_commuter[]
| static

Initial value:
= {
_tile_table_commuter_0,
}

Definition at line 76 of file airport_defaults.h.

## ◆ _tile_table_commuter_0

const 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),
MKEND
}

Tiles for Commuter Airfield (small)

Definition at line 52 of file airport_defaults.h.

## ◆ _tile_table_country

const AirportTileTable* const _tile_table_country[]
| static

Initial value:
= {
_tile_table_country_0,
}

Definition at line 47 of file airport_defaults.h.

## ◆ _tile_table_country_0

const 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),
MKEND
}

Tiles for Country Airfield (small)

Definition at line 31 of file airport_defaults.h.

## ◆ _tile_table_helidepot

const AirportTileTable* const _tile_table_helidepot[]
| static

Initial value:
= {
_tile_table_helidepot_0,
}

Definition at line 355 of file airport_defaults.h.

## ◆ _tile_table_helidepot_0

const 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),
MKEND
}

Tiles for Helidepot.

Definition at line 347 of file airport_defaults.h.

## ◆ _tile_table_heliport

const AirportTileTable* const _tile_table_heliport[]
| static

Initial value:
= {
_tile_table_heliport_0,
}

Definition at line 342 of file airport_defaults.h.

## ◆ _tile_table_heliport_0

const AirportTileTable _tile_table_heliport_0[]
| static

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

Tiles for Heliport.

Definition at line 337 of file airport_defaults.h.

## ◆ _tile_table_helistation

const AirportTileTable* const _tile_table_helistation[]
| static

Initial value:
= {
_tile_table_helistation_0,
}

Definition at line 372 of file airport_defaults.h.

## ◆ _tile_table_helistation_0

const 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),
MKEND
}

Tiles for Helistation.

Definition at line 360 of file airport_defaults.h.

## ◆ _tile_table_intercontinental

const AirportTileTable* const _tile_table_intercontinental[]
| static

Initial value:
= {
_tile_table_intercontinental_0,
}

Definition at line 332 of file airport_defaults.h.

## ◆ _tile_table_international

const AirportTileTable* const _tile_table_international[]
| static

Initial value:
= {
_tile_table_international_0,
}

Definition at line 224 of file airport_defaults.h.

## ◆ _tile_table_metropolitan

const AirportTileTable* const _tile_table_metropolitan[]
| static

Initial value:
= {
_tile_table_metropolitan_0,
}

Definition at line 166 of file airport_defaults.h.

AS_GENERIC
#define AS_GENERIC(fsm, att, rot, att_len, depot_tbl, num_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:384
_tile_table_helistation_0
static const AirportTileTable _tile_table_helistation_0[]
Tiles for Helistation.
Definition: airport_defaults.h:360
APC_HUB
@ APC_HUB
id for hub airports class
Definition: newgrf_airport.h:74
DIR_N
@ DIR_N
North.
Definition: direction_type.h:26
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:393
_tile_table_helidepot_0
static const AirportTileTable _tile_table_helidepot_0[]
Tiles for Helidepot.
Definition: airport_defaults.h:347
_tile_table_commuter_0
static const AirportTileTable _tile_table_commuter_0[]
Tiles for Commuter Airfield (small)
Definition: airport_defaults.h:52
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:75
_tile_table_city_0
static const AirportTileTable _tile_table_city_0[]
Tiles for City Airport (large)
Definition: airport_defaults.h:81
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:388
_tile_table_country_0
static const AirportTileTable _tile_table_country_0[]
Tiles for Country Airfield (small)
Definition: airport_defaults.h:31
_tile_table_heliport_0
static const AirportTileTable _tile_table_heliport_0[]
Tiles for Heliport.
Definition: airport_defaults.h:337
ATP_TTDP_HELIPORT
@ ATP_TTDP_HELIPORT
Same as AT_HELIPORT.
Definition: newgrf_airport.h:86
MKEND
#define MKEND
Terminator of airport tiles layout definition.
Definition: airport_defaults.h:28
APC_LARGE
@ APC_LARGE
id for large airports class
Definition: newgrf_airport.h:73
MK
#define MK(x, y, m)
Definition of an airport tiles layout.
Definition: airport_defaults.h:23
APC_SMALL
@ APC_SMALL
id for small airports class
Definition: newgrf_airport.h:72
lengthof
#define lengthof(x)
Return the length of an fixed size array.
Definition: stdafx.h:300
_tile_table_metropolitan_0
static const AirportTileTable _tile_table_metropolitan_0[]
Tiles for Metropolitain Airport (large) - 2 runways.
Definition: airport_defaults.h:126
ATP_TTDP_SMALL
@ ATP_TTDP_SMALL
Same as AT_SMALL.
Definition: newgrf_airport.h:84
ATP_TTDP_LARGE
@ ATP_TTDP_LARGE
Same as AT_LARGE.
Definition: newgrf_airport.h:85
ATP_TTDP_OILRIG
@ ATP_TTDP_OILRIG
Same as AT_OILRIG.
Definition: newgrf_airport.h:87
_tile_table_intercontinental_0
static const AirportTileTable _tile_table_intercontinental_0[]
Tiles for International Airport (large) - 2 runways.
Definition: airport_defaults.h:229
_tile_table_international_0
static const AirportTileTable _tile_table_international_0[]
Tiles for International Airport (large) - 2 runways.
Definition: airport_defaults.h:171