diff options
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/airport_defaults.h | 4 | ||||
-rw-r--r-- | src/table/airporttiles.h | 200 |
2 files changed, 203 insertions, 1 deletions
diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index 2876b5810..84b67eb78 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -388,7 +388,7 @@ static AirportTileTable *_tile_table_helistation[] = { #define AS(ap_name, size_x, size_y, min_year, max_year, catchment, noise) \ AS_GENERIC(_tile_table_##ap_name, _airport_depots_##ap_name, lengthof(_airport_depots_##ap_name), size_x, size_y, noise, catchment, min_year, max_year) -AirportSpec _origin_airport_specs[NUM_AIRPORTS] = { +static const AirportSpec _origin_airport_specs[] = { AS(country, 4, 3, 0, 1959, 4, 3), AS(city, 6, 6, 1960, MAX_YEAR, 5, 5), AS_ND(heliport, 1, 1, 1963, MAX_YEAR, 4, 1), @@ -400,6 +400,8 @@ AirportSpec _origin_airport_specs[NUM_AIRPORTS] = { AS(helistation, 4, 2, 1980, MAX_YEAR, 4, 3), }; +assert_compile(NUM_AIRPORTS == lengthof(_origin_airport_specs)); + #undef AS #undef AS_ND #undef AS_GENERIC diff --git a/src/table/airporttiles.h b/src/table/airporttiles.h new file mode 100644 index 000000000..e3114f77a --- /dev/null +++ b/src/table/airporttiles.h @@ -0,0 +1,200 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. + */ + +/** @file airporttiles.h Tables with airporttile defaults. */ + +#ifndef AIRPORTTILES_H +#define AIRPORTTILES_H + + +/** Writes all airport tile properties in the AirportTile struct */ +#define AT(anim_next, anim_speed) {anim_next, anim_speed} +/** All default airport tiles. + * @see AirportTiles for a list of names. */ +static const AirportTileSpec _origin_airporttile_specs[] = { + /* 0..9 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 10..19 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 20..29*/ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 30..39*/ + AT(AIRPORTTILE_NOANIM, 2), + AT( 32, 2), + AT( 33, 2), + AT( 34, 2), + AT( 35, 2), + AT( 36, 2), + AT( 37, 2), + AT( 38, 2), + AT( 39, 2), + AT( 40, 2), + + /* 40..49 */ + AT( 41, 2), + AT( 42, 2), + AT( 31, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 50..59 */ + AT( 51, 1), + AT( 52, 1), + AT( 53, 1), + AT( 50, 1), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 60..69 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT( 67, 2), + AT( 68, 2), + AT( 69, 2), + AT( 70, 2), + + /* 70..79 */ + AT( 71, 2), + AT( 72, 2), + AT( 73, 2), + AT( 74, 2), + AT( 75, 2), + AT( 76, 2), + AT( 77, 2), + AT( 66, 2), + AT( 79, 2), + AT( 80, 2), + + /* 80..89 */ + AT( 81, 2), + AT( 82, 2), + AT( 83, 2), + AT( 84, 2), + AT( 85, 2), + AT( 86, 2), + AT( 87, 2), + AT( 88, 2), + AT( 89, 2), + AT( 78, 2), + + /* 90..99 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 100..109 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 110..119 */ + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 120..129 */ + AT(AIRPORTTILE_NOANIM, 2), + AT( 122, 2), + AT( 123, 2), + AT( 124, 2), + AT( 125, 2), + AT( 126, 2), + AT( 127, 2), + AT( 128, 2), + AT( 129, 2), + AT( 130, 2), + + /* 130..139 */ + AT( 131, 2), + AT( 132, 2), + AT( 121, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + AT(AIRPORTTILE_NOANIM, 2), + + /* 140..143 */ + AT( 141, 1), + AT( 142, 1), + AT( 143, 1), + AT( 140, 1), +}; + +assert_compile(NUM_AIRPORTTILES == lengthof(_origin_airporttile_specs)); + +#undef AT + +#endif /* AIRPORTTILES_H */ |