10 #ifndef AIRPORT_DEFAULTS_H
11 #define AIRPORT_DEFAULTS_H
23 #define MK(x, y, m) {{x, y}, m}
28 #define MKEND {{-0x80, 0}, 0}
32 MK(0, 0, APT_SMALL_BUILDING_1),
33 MK(1, 0, APT_SMALL_BUILDING_2),
34 MK(2, 0, APT_SMALL_BUILDING_3),
35 MK(3, 0, APT_SMALL_DEPOT_SE),
36 MK(0, 1, APT_GRASS_FENCE_NE_FLAG),
37 MK(1, 1, APT_GRASS_1),
38 MK(2, 1, APT_GRASS_2),
39 MK(3, 1, APT_GRASS_FENCE_SW),
40 MK(0, 2, APT_RUNWAY_SMALL_FAR_END),
41 MK(1, 2, APT_RUNWAY_SMALL_MIDDLE),
42 MK(2, 2, APT_RUNWAY_SMALL_MIDDLE),
43 MK(3, 2, APT_RUNWAY_SMALL_NEAR_END),
47 static const std::initializer_list<AirportTileLayout> _tile_table_country = {
54 MK(1, 0, APT_BUILDING_3),
55 MK(2, 0, APT_HELIPAD_2_FENCE_NW),
56 MK(3, 0, APT_HELIPAD_2_FENCE_NW),
57 MK(4, 0, APT_DEPOT_SE),
58 MK(0, 1, APT_APRON_FENCE_NE),
62 MK(4, 1, APT_APRON_FENCE_SW),
63 MK(0, 2, APT_APRON_FENCE_NE),
67 MK(4, 2, APT_APRON_FENCE_SW),
68 MK(0, 3, APT_RUNWAY_END_FENCE_SE),
69 MK(1, 3, APT_RUNWAY_2),
70 MK(2, 3, APT_RUNWAY_2),
71 MK(3, 3, APT_RUNWAY_2),
72 MK(4, 3, APT_RUNWAY_END_FENCE_SE),
76 static const std::initializer_list<AirportTileLayout> _tile_table_commuter = {
82 MK(0, 0, APT_BUILDING_1),
83 MK(1, 0, APT_APRON_FENCE_NW),
84 MK(2, 0, APT_STAND_1),
85 MK(3, 0, APT_APRON_FENCE_NW),
86 MK(4, 0, APT_APRON_FENCE_NW),
87 MK(5, 0, APT_DEPOT_SE),
88 MK(0, 1, APT_BUILDING_2),
90 MK(2, 1, APT_ROUND_TERMINAL),
91 MK(3, 1, APT_STAND_PIER_NE),
93 MK(5, 1, APT_APRON_FENCE_SW),
94 MK(0, 2, APT_BUILDING_3),
96 MK(2, 2, APT_PIER_NW_NE),
97 MK(3, 2, APT_APRON_S),
98 MK(4, 2, APT_APRON_HOR),
99 MK(5, 2, APT_APRON_N_FENCE_SW),
100 MK(0, 3, APT_RADIO_TOWER_FENCE_NE),
101 MK(1, 3, APT_APRON_W),
102 MK(2, 3, APT_APRON_VER_CROSSING_S),
103 MK(3, 3, APT_APRON_HOR_CROSSING_E),
104 MK(4, 3, APT_ARPON_N),
105 MK(5, 3, APT_TOWER_FENCE_SW),
106 MK(0, 4, APT_EMPTY_FENCE_NE),
107 MK(1, 4, APT_APRON_S),
108 MK(2, 4, APT_APRON_HOR_CROSSING_W),
109 MK(3, 4, APT_APRON_VER_CROSSING_N),
110 MK(4, 4, APT_APRON_E),
111 MK(5, 4, APT_RADAR_GRASS_FENCE_SW),
112 MK(0, 5, APT_RUNWAY_END_FENCE_SE),
113 MK(1, 5, APT_RUNWAY_1),
114 MK(2, 5, APT_RUNWAY_2),
115 MK(3, 5, APT_RUNWAY_3),
116 MK(4, 5, APT_RUNWAY_4),
117 MK(5, 5, APT_RUNWAY_END_FENCE_SE),
121 static const std::initializer_list<AirportTileLayout> _tile_table_city = {
127 MK(0, 0, APT_BUILDING_1),
128 MK(1, 0, APT_APRON_FENCE_NW),
129 MK(2, 0, APT_STAND_1),
130 MK(3, 0, APT_APRON_FENCE_NW),
131 MK(4, 0, APT_APRON_FENCE_NW),
132 MK(5, 0, APT_DEPOT_SE),
133 MK(0, 1, APT_BUILDING_2),
135 MK(2, 1, APT_ROUND_TERMINAL),
136 MK(3, 1, APT_STAND_PIER_NE),
138 MK(5, 1, APT_APRON_FENCE_SW),
139 MK(0, 2, APT_BUILDING_3),
141 MK(2, 2, APT_PIER_NW_NE),
142 MK(3, 2, APT_APRON_S),
143 MK(4, 2, APT_APRON_HOR),
144 MK(5, 2, APT_APRON_N_FENCE_SW),
145 MK(0, 3, APT_RADAR_FENCE_NE),
150 MK(5, 3, APT_TOWER_FENCE_SW),
151 MK(0, 4, APT_RUNWAY_END),
152 MK(1, 4, APT_RUNWAY_5),
153 MK(2, 4, APT_RUNWAY_5),
154 MK(3, 4, APT_RUNWAY_5),
155 MK(4, 4, APT_RUNWAY_5),
156 MK(5, 4, APT_RUNWAY_END),
157 MK(0, 5, APT_RUNWAY_END_FENCE_SE),
158 MK(1, 5, APT_RUNWAY_2),
159 MK(2, 5, APT_RUNWAY_2),
160 MK(3, 5, APT_RUNWAY_2),
161 MK(4, 5, APT_RUNWAY_2),
162 MK(5, 5, APT_RUNWAY_END_FENCE_SE),
166 static const std::initializer_list<AirportTileLayout> _tile_table_metropolitan = {
172 MK(0, 0, APT_RUNWAY_END_FENCE_NW),
173 MK(1, 0, APT_RUNWAY_FENCE_NW),
174 MK(2, 0, APT_RUNWAY_FENCE_NW),
175 MK(3, 0, APT_RUNWAY_FENCE_NW),
176 MK(4, 0, APT_RUNWAY_FENCE_NW),
177 MK(5, 0, APT_RUNWAY_FENCE_NW),
178 MK(6, 0, APT_RUNWAY_END_FENCE_NW),
179 MK(0, 1, APT_RADIO_TOWER_FENCE_NE),
185 MK(6, 1, APT_DEPOT_SE),
186 MK(0, 2, APT_BUILDING_3),
189 MK(3, 2, APT_BUILDING_2),
192 MK(6, 2, APT_APRON_FENCE_SW),
193 MK(0, 3, APT_DEPOT_SE),
196 MK(3, 3, APT_BUILDING_2),
199 MK(6, 3, APT_HELIPAD_1),
200 MK(0, 4, APT_APRON_FENCE_NE),
206 MK(6, 4, APT_HELIPAD_1),
207 MK(0, 5, APT_APRON_FENCE_NE),
213 MK(6, 5, APT_RADAR_FENCE_SW),
214 MK(0, 6, APT_RUNWAY_END_FENCE_SE),
215 MK(1, 6, APT_RUNWAY_2),
216 MK(2, 6, APT_RUNWAY_2),
217 MK(3, 6, APT_RUNWAY_2),
218 MK(4, 6, APT_RUNWAY_2),
219 MK(5, 6, APT_RUNWAY_2),
220 MK(6, 6, APT_RUNWAY_END_FENCE_SE),
224 static const std::initializer_list<AirportTileLayout> _tile_table_international = {
230 MK(0, 0, APT_RADAR_FENCE_NE),
231 MK(1, 0, APT_RUNWAY_END_FENCE_NE_NW),
232 MK(2, 0, APT_RUNWAY_FENCE_NW),
233 MK(3, 0, APT_RUNWAY_FENCE_NW),
234 MK(4, 0, APT_RUNWAY_FENCE_NW),
235 MK(5, 0, APT_RUNWAY_FENCE_NW),
236 MK(6, 0, APT_RUNWAY_FENCE_NW),
237 MK(7, 0, APT_RUNWAY_FENCE_NW),
238 MK(8, 0, APT_RUNWAY_END_FENCE_NW_SW),
239 MK(0, 1, APT_RUNWAY_END_FENCE_NE_NW),
240 MK(1, 1, APT_RUNWAY_2),
241 MK(2, 1, APT_RUNWAY_2),
242 MK(3, 1, APT_RUNWAY_2),
243 MK(4, 1, APT_RUNWAY_2),
244 MK(5, 1, APT_RUNWAY_2),
245 MK(6, 1, APT_RUNWAY_2),
246 MK(7, 1, APT_RUNWAY_END_FENCE_SE_SW),
247 MK(8, 1, APT_APRON_FENCE_NE_SW),
248 MK(0, 2, APT_APRON_FENCE_NE_SW),
250 MK(2, 2, APT_APRON_FENCE_NE),
255 MK(7, 2, APT_RADIO_TOWER_FENCE_NE),
256 MK(8, 2, APT_APRON_FENCE_NE_SW),
257 MK(0, 3, APT_APRON_FENCE_NE),
258 MK(1, 3, APT_APRON_HALF_EAST),
259 MK(2, 3, APT_APRON_FENCE_NE),
261 MK(4, 3, APT_HELIPAD_2),
262 MK(5, 3, APT_HELIPAD_2),
264 MK(7, 3, APT_APRON_FENCE_NW),
265 MK(8, 3, APT_APRON_FENCE_SW),
266 MK(0, 4, APT_APRON_FENCE_NE),
270 MK(4, 4, APT_BUILDING_1),
273 MK(7, 4, APT_LOW_BUILDING),
274 MK(8, 4, APT_DEPOT_SE),
275 MK(0, 5, APT_DEPOT_SE),
276 MK(1, 5, APT_LOW_BUILDING),
279 MK(4, 5, APT_BUILDING_2),
283 MK(8, 5, APT_APRON_FENCE_SW),
284 MK(0, 6, APT_APRON_FENCE_NE),
288 MK(4, 6, APT_BUILDING_3),
292 MK(8, 6, APT_APRON_FENCE_SW),
293 MK(0, 7, APT_APRON_FENCE_NE),
294 MK(1, 7, APT_APRON_FENCE_SE),
297 MK(4, 7, APT_ROUND_TERMINAL),
299 MK(6, 7, APT_APRON_FENCE_SW),
300 MK(7, 7, APT_APRON_HALF_WEST),
301 MK(8, 7, APT_APRON_FENCE_SW),
302 MK(0, 8, APT_APRON_FENCE_NE),
303 MK(1, 8, APT_GRASS_FENCE_NE_FLAG_2),
304 MK(2, 8, APT_APRON_FENCE_NE),
308 MK(6, 8, APT_APRON_FENCE_SW),
310 MK(8, 8, APT_APRON_FENCE_NE_SW),
311 MK(0, 9, APT_APRON_FENCE_NE),
312 MK(1, 9, APT_RUNWAY_END_FENCE_NE_NW),
313 MK(2, 9, APT_RUNWAY_FENCE_NW),
314 MK(3, 9, APT_RUNWAY_FENCE_NW),
315 MK(4, 9, APT_RUNWAY_FENCE_NW),
316 MK(5, 9, APT_RUNWAY_FENCE_NW),
317 MK(6, 9, APT_RUNWAY_FENCE_NW),
318 MK(7, 9, APT_RUNWAY_FENCE_NW),
319 MK(8, 9, APT_RUNWAY_END_FENCE_SE_SW),
320 MK(0, 10, APT_RUNWAY_END_FENCE_NE_SE),
321 MK(1, 10, APT_RUNWAY_2),
322 MK(2, 10, APT_RUNWAY_2),
323 MK(3, 10, APT_RUNWAY_2),
324 MK(4, 10, APT_RUNWAY_2),
325 MK(5, 10, APT_RUNWAY_2),
326 MK(6, 10, APT_RUNWAY_2),
327 MK(7, 10, APT_RUNWAY_END_FENCE_SE_SW),
328 MK(8, 10, APT_EMPTY),
332 static const std::initializer_list<AirportTileLayout> _tile_table_intercontinental = {
338 MK(0, 0, APT_HELIPORT),
342 static const std::initializer_list<AirportTileLayout> _tile_table_heliport = {
348 MK(0, 0, APT_LOW_BUILDING_FENCE_N),
349 MK(1, 0, APT_DEPOT_SE),
350 MK(0, 1, APT_HELIPAD_2_FENCE_NE_SE),
351 MK(1, 1, APT_APRON_FENCE_SE_SW),
355 static const std::initializer_list<AirportTileLayout> _tile_table_helidepot = {
361 MK(0, 0, APT_DEPOT_SE),
362 MK(1, 0, APT_LOW_BUILDING_FENCE_NW),
363 MK(2, 0, APT_HELIPAD_3_FENCE_NW),
364 MK(3, 0, APT_HELIPAD_3_FENCE_NW_SW),
365 MK(0, 1, APT_APRON_FENCE_NE_SE),
366 MK(1, 1, APT_APRON_FENCE_SE),
367 MK(2, 1, APT_APRON_FENCE_SE),
368 MK(3, 1, APT_HELIPAD_3_FENCE_SE_SW),
372 static const std::initializer_list<AirportTileLayout> _tile_table_helistation = {
380 #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) \
381 {{class_id, 0}, fsm, layouts, depots, size_x, size_y, noise, catchment, min_year, max_year, name, ttdpatch_type, preview, maint_cost, enabled, GRFFileProps(AT_INVALID)}
384 #define AS_ND(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview) \
385 AS_GENERIC(&_airportfta_##ap_name, _tile_table_##ap_name, {}, \
386 size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, true)
389 #define AS(ap_name, size_x, size_y, min_year, max_year, catchment, noise, maint_cost, ttdpatch_type, class_id, name, preview) \
390 AS_GENERIC(&_airportfta_##ap_name, _tile_table_##ap_name, _airport_depots_##ap_name, \
391 size_x, size_y, noise, catchment, min_year, max_year, maint_cost, ttdpatch_type, class_id, name, preview, true)
394 extern const AirportSpec _origin_airport_specs[] = {
395 AS(country, 4, 3, 0, 1959, 4, 3, 7,
ATP_TTDP_SMALL,
APC_SMALL, STR_AIRPORT_SMALL, SPR_AIRPORT_PREVIEW_SMALL),
396 AS(city, 6, 6, 1955,
CalendarTime::MAX_YEAR, 5, 5, 24,
ATP_TTDP_LARGE,
APC_LARGE, STR_AIRPORT_CITY, SPR_AIRPORT_PREVIEW_LARGE),
397 AS_ND(heliport, 1, 1, 1963,
CalendarTime::MAX_YEAR, 4, 1, 4,
ATP_TTDP_HELIPORT,
APC_HELIPORT, STR_AIRPORT_HELIPORT, SPR_AIRPORT_PREVIEW_HELIPORT),
398 AS(metropolitan, 6, 6, 1980,
CalendarTime::MAX_YEAR, 6, 8, 28,
ATP_TTDP_LARGE,
APC_LARGE, STR_AIRPORT_METRO, SPR_AIRPORT_PREVIEW_METROPOLITAN),
399 AS(international, 7, 7, 1990,
CalendarTime::MAX_YEAR, 8, 17, 42,
ATP_TTDP_LARGE,
APC_HUB, STR_AIRPORT_INTERNATIONAL, SPR_AIRPORT_PREVIEW_INTERNATIONAL),
400 AS(commuter, 5, 4, 1983,
CalendarTime::MAX_YEAR, 4, 4, 20,
ATP_TTDP_SMALL,
APC_SMALL, STR_AIRPORT_COMMUTER, SPR_AIRPORT_PREVIEW_COMMUTER),
401 AS(helidepot, 2, 2, 1976,
CalendarTime::MAX_YEAR, 4, 2, 7,
ATP_TTDP_SMALL,
APC_HELIPORT, STR_AIRPORT_HELIDEPOT, SPR_AIRPORT_PREVIEW_HELIDEPOT),
402 AS(intercontinental, 9, 11, 2002,
CalendarTime::MAX_YEAR, 10, 25, 72,
ATP_TTDP_LARGE,
APC_HUB, STR_AIRPORT_INTERCONTINENTAL, SPR_AIRPORT_PREVIEW_INTERCONTINENTAL),
403 AS(helistation, 4, 2, 1980,
CalendarTime::MAX_YEAR, 4, 3, 14,
ATP_TTDP_SMALL,
APC_HELIPORT, STR_AIRPORT_HELISTATION, SPR_AIRPORT_PREVIEW_HELISTATION),
404 AS_GENERIC(&_airportfta_oilrig, {}, {}, 1, 1, 0, 4, 0, 0, 0,
ATP_TTDP_OILRIG,
APC_HELIPORT, STR_NULL, 0,
false),
409 const AirportSpec AirportSpec::dummy =
AS_GENERIC(&_airportfta_dummy, {}, {}, 0, 0, 0, 0,
CalendarTime::MIN_YEAR,
CalendarTime::MIN_YEAR, 0,
ATP_TTDP_LARGE,
APC_BEGIN, STR_NULL, 0,
false);
@ NEW_AIRPORT_OFFSET
Number of the first newgrf airport.
#define MK(x, y, m)
Definition of an airport tiles layout.
static const std::initializer_list< AirportTileTable > _tile_table_heliport_0
Tiles for Heliport.
static const std::initializer_list< AirportTileTable > _tile_table_helidepot_0
Tiles for Helidepot.
static const std::initializer_list< AirportTileTable > _tile_table_metropolitan_0
Tiles for Metropolitain Airport (large) - 2 runways.
#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.
#define MKEND
Terminator of airport tiles layout 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.
static const std::initializer_list< AirportTileTable > _tile_table_international_0
Tiles for International Airport (large) - 2 runways.
#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.
static const std::initializer_list< AirportTileTable > _tile_table_intercontinental_0
Tiles for International Airport (large) - 2 runways.
static const std::initializer_list< AirportTileTable > _tile_table_city_0
Tiles for City Airport (large)
static const std::initializer_list< AirportTileTable > _tile_table_commuter_0
Tiles for Commuter Airfield (small)
static const std::initializer_list< AirportTileTable > _tile_table_helistation_0
Tiles for Helistation.
static const std::initializer_list< AirportTileTable > _tile_table_country_0
Tiles for Country Airfield (small)
static constexpr TimerGame< struct Calendar >::Year MIN_YEAR
The absolute minimum year in OTTD.
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,...
@ APC_HELIPORT
id for heliports
@ APC_SMALL
id for small airports class
@ APC_BEGIN
Lowest valid airport class id.
@ APC_LARGE
id for large airports class
@ APC_HUB
id for hub airports class
@ ATP_TTDP_HELIPORT
Same as AT_HELIPORT.
@ ATP_TTDP_OILRIG
Same as AT_OILRIG.
@ ATP_TTDP_SMALL
Same as AT_SMALL.
@ ATP_TTDP_LARGE
Same as AT_LARGE.
#define lengthof(array)
Return the length of an fixed size array.
Defines the data structure for an airport.
static const AirportSpec dummy
The dummy airport.
Definition of the game-calendar-timer.