|
OpenTTD Source 20251117-master-g7398d2e290
|
NewGRF handling of airports. More...
#include "airport.h"#include "timer/timer_game_calendar.h"#include "newgrf_badge_type.h"#include "newgrf_class.h"#include "newgrf_commons.h"#include "newgrf_spritegroup.h"#include "newgrf_town.h"#include "tilearea_type.h"Go to the source code of this file.
Data Structures | |
| struct | AirportTileTable |
| Tile-offset / AirportTileID pair. More... | |
| class | AirportTileTableIterator |
| Iterator to iterate over all tiles belonging to an airport spec. More... | |
| struct | HangarTileTable |
| A list of all hangar tiles in an airport. More... | |
| struct | AirportTileLayout |
| struct | AirportSpec |
| Defines the data structure for an airport. More... | |
| struct | AirportScopeResolver |
| Resolver for the airport scope. More... | |
| struct | AirportResolverObject |
| Resolver object for airports. More... | |
Typedefs | |
| typedef uint8_t | StationGfx |
| Copy from station_map.h. | |
| using | AirportClass = NewGRFClass< AirportSpec, AirportClassID, APC_MAX > |
| Information related to airport classes. | |
Enumerations | |
| enum | AirportClassID : uint8_t { APC_BEGIN = 0 , APC_SMALL = 0 , APC_LARGE , APC_HUB , APC_HELIPORT , APC_MAX = 16 } |
| List of default airport classes. More... | |
| enum | TTDPAirportType : uint8_t { ATP_TTDP_SMALL , ATP_TTDP_LARGE , ATP_TTDP_HELIPORT , ATP_TTDP_OILRIG } |
| Allow incrementing of AirportClassID variables. More... | |
Functions | |
| void | BindAirportSpecs () |
| Tie all airportspecs to their class. | |
| StringID | GetAirportTextCallback (const AirportSpec *as, uint8_t layout, uint16_t callback) |
| Get a custom text for the airport. | |
NewGRF handling of airports.
Definition in file newgrf_airport.h.
| using AirportClass = NewGRFClass<AirportSpec, AirportClassID, APC_MAX> |
Information related to airport classes.
Definition at line 152 of file newgrf_airport.h.
| typedef uint8_t StationGfx |
Copy from station_map.h.
Definition at line 23 of file newgrf_airport.h.
| enum AirportClassID : uint8_t |
List of default airport classes.
Definition at line 74 of file newgrf_airport.h.
| enum TTDPAirportType : uint8_t |
Allow incrementing of AirportClassID variables.
TTDP airport types. Used to map our types to TTDPatch's
| Enumerator | |
|---|---|
| ATP_TTDP_SMALL | Same as AT_SMALL. |
| ATP_TTDP_LARGE | Same as AT_LARGE. |
| ATP_TTDP_HELIPORT | Same as AT_HELIPORT. |
| ATP_TTDP_OILRIG | Same as AT_OILRIG. |
Definition at line 87 of file newgrf_airport.h.
| void BindAirportSpecs | ( | ) |
Tie all airportspecs to their class.
Definition at line 128 of file newgrf_airport.cpp.
References NewGRFClass< Tspec, Tindex, Tmax >::Assign(), AirportSpec::enabled, AirportSpec::GetWithoutOverride(), and NUM_AIRPORTS.
Referenced by AfterLoadGRFs().
| StringID GetAirportTextCallback | ( | const AirportSpec * | as, |
| uint8_t | layout, | ||
| uint16_t | callback | ||
| ) |
Get a custom text for the airport.
| as | The airport type's specification. |
| layout | The layout index. |
| callback | The callback to call. |
Definition at line 280 of file newgrf_airport.cpp.
References CALLBACK_FAILED, ErrorUnknownCallbackResult(), GetGRFStringID(), AirportSpec::grf_prop, GRFFilePropsBase::grfid, GRFSTR_MISC_GRF_TEXT, and INVALID_TILE.
Referenced by BuildAirportWindow::DrawWidget(), BuildAirportWindow::GetWidgetString(), and BuildAirportWindow::UpdateWidgetSize().