OpenTTD Source
20241108-master-g80f628063a
|
Various declarations for airports. More...
Go to the source code of this file.
Data Structures | |
struct | AirportMovingData |
A single location on an airport where aircraft can move to. More... | |
struct | AirportFTAClass |
Finite sTate mAchine (FTA) of an airport. More... | |
struct | AirportFTA |
Internal structure used in openttd - Finite sTate mAchine --> FTA. More... | |
Functions | |
AirportMovingData | RotateAirportMovingData (const AirportMovingData *orig, Direction rotation, uint num_tiles_x, uint num_tiles_y) |
Rotate the airport moving data to another rotation. More... | |
const AirportFTAClass * | GetAirport (const uint8_t airport_type) |
Get the finite state machine of an airport type. More... | |
uint8_t | GetVehiclePosOnBuild (TileIndex hangar_tile) |
Get the vehicle position when an aircraft is build at the given tile. More... | |
Variables | |
static const uint | MAX_TERMINALS = 8 |
Some airport-related constants. More... | |
static const uint | MAX_HELIPADS = 3 |
maximum number of helipads per airport | |
static const uint | MAX_ELEMENTS = 255 |
maximum number of aircraft positions at airport | |
static const uint | NUM_AIRPORTTILES_PER_GRF = 255 |
Number of airport tiles per NewGRF; limited to 255 to allow extending Action3 with an extended byte later on. | |
static const uint | NUM_AIRPORTTILES = 256 |
Total number of airport tiles. | |
static const uint | NEW_AIRPORTTILE_OFFSET = 74 |
offset of first newgrf airport tile | |
static const uint | INVALID_AIRPORTTILE = NUM_AIRPORTTILES |
id for an invalid airport tile | |
static const uint64_t | TERM1_block = 1ULL << 0 |
Movement Blocks on Airports blocks (eg_airport_flags). More... | |
static const uint64_t | TERM2_block = 1ULL << 1 |
Block belonging to terminal 2. | |
static const uint64_t | TERM3_block = 1ULL << 2 |
Block belonging to terminal 3. | |
static const uint64_t | TERM4_block = 1ULL << 3 |
Block belonging to terminal 4. | |
static const uint64_t | TERM5_block = 1ULL << 4 |
Block belonging to terminal 5. | |
static const uint64_t | TERM6_block = 1ULL << 5 |
Block belonging to terminal 6. | |
static const uint64_t | HELIPAD1_block = 1ULL << 6 |
Block belonging to helipad 1. | |
static const uint64_t | HELIPAD2_block = 1ULL << 7 |
Block belonging to helipad 2. | |
static const uint64_t | RUNWAY_IN_OUT_block = 1ULL << 8 |
static const uint64_t | RUNWAY_IN_block = 1ULL << 8 |
static const uint64_t | AIRPORT_BUSY_block = 1ULL << 8 |
static const uint64_t | RUNWAY_OUT_block = 1ULL << 9 |
static const uint64_t | TAXIWAY_BUSY_block = 1ULL << 10 |
static const uint64_t | OUT_WAY_block = 1ULL << 11 |
static const uint64_t | IN_WAY_block = 1ULL << 12 |
static const uint64_t | AIRPORT_ENTRANCE_block = 1ULL << 13 |
static const uint64_t | TERM_GROUP1_block = 1ULL << 14 |
static const uint64_t | TERM_GROUP2_block = 1ULL << 15 |
static const uint64_t | HANGAR2_AREA_block = 1ULL << 16 |
static const uint64_t | TERM_GROUP2_ENTER1_block = 1ULL << 17 |
static const uint64_t | TERM_GROUP2_ENTER2_block = 1ULL << 18 |
static const uint64_t | TERM_GROUP2_EXIT1_block = 1ULL << 19 |
static const uint64_t | TERM_GROUP2_EXIT2_block = 1ULL << 20 |
static const uint64_t | PRE_HELIPAD_block = 1ULL << 21 |
static const uint64_t | TERM7_block = 1ULL << 22 |
Block belonging to terminal 7. | |
static const uint64_t | TERM8_block = 1ULL << 23 |
Block belonging to terminal 8. | |
static const uint64_t | HELIPAD3_block = 1ULL << 24 |
Block belonging to helipad 3. | |
static const uint64_t | HANGAR1_AREA_block = 1ULL << 26 |
static const uint64_t | OUT_WAY2_block = 1ULL << 27 |
static const uint64_t | IN_WAY2_block = 1ULL << 28 |
static const uint64_t | RUNWAY_IN2_block = 1ULL << 29 |
static const uint64_t | RUNWAY_OUT2_block = 1ULL << 10 |
static const uint64_t | HELIPAD_GROUP_block = 1ULL << 13 |
static const uint64_t | OUT_WAY_block2 = 1ULL << 31 |
static const uint64_t | NOTHING_block = 1ULL << 30 |
static const uint64_t | AIRPORT_CLOSED_block = 1ULL << 63 |
Dummy block for indicating a closed airport. | |
Various declarations for airports.
Definition in file airport.h.
Movement States on Airports (headings target)
Enumerator | |
---|---|
TO_ALL | Go in this direction for every target. |
HANGAR | Heading for hangar. |
TERM1 | Heading for terminal 1. |
TERM2 | Heading for terminal 2. |
TERM3 | Heading for terminal 3. |
TERM4 | Heading for terminal 4. |
TERM5 | Heading for terminal 5. |
TERM6 | Heading for terminal 6. |
HELIPAD1 | Heading for helipad 1. |
HELIPAD2 | Heading for helipad 2. |
TAKEOFF | Airplane wants to leave the airport. |
STARTTAKEOFF | Airplane has arrived at a runway for take-off. |
ENDTAKEOFF | Airplane has reached end-point of the take-off runway. |
HELITAKEOFF | Helicopter wants to leave the airport. |
FLYING | Vehicle is flying in the air. |
LANDING | Airplane wants to land. |
ENDLANDING | Airplane wants to finish landing. |
HELILANDING | Helicopter wants to land. |
HELIENDLANDING | Helicopter wants to finish landing. |
TERM7 | Heading for terminal 7. |
TERM8 | Heading for terminal 8. |
HELIPAD3 | Heading for helipad 3. |
MAX_HEADINGS | Last valid target to head for. |
TERMGROUP | Aircraft is looking for a free terminal in a terminalgroup. |
Flags for airport movement data.
enum AirportTypes |
Airport types.
const AirportFTAClass* GetAirport | ( | const uint8_t | airport_type | ) |
Get the finite state machine of an airport type.
airport_type | Airport type to query FTA from. |
Definition at line 207 of file airport.cpp.
References AT_DUMMY, AirportSpec::fsm, and AirportSpec::Get().
Referenced by AircraftController().
uint8_t GetVehiclePosOnBuild | ( | TileIndex | hangar_tile | ) |
Get the vehicle position when an aircraft is build at the given tile.
hangar_tile | The tile on which the vehicle is build |
Definition at line 218 of file airport.cpp.
References Station::airport, SpecializedStation< Station, false >::GetByTile(), Airport::GetFTA(), Airport::GetHangarTile(), HANGAR, AirportFTA::heading, AirportFTAClass::layout, and AirportFTA::position.
AirportMovingData RotateAirportMovingData | ( | const AirportMovingData * | orig, |
Direction | rotation, | ||
uint | num_tiles_x, | ||
uint | num_tiles_y | ||
) |
Rotate the airport moving data to another rotation.
orig | Pointer to the moving data to rotate. |
rotation | How to rotate the moving data. |
num_tiles_x | Number of tiles in x direction. |
num_tiles_y | Number of tiles in y direction. |
Definition at line 80 of file airport.cpp.
References ChangeDir(), DIR_E, DIR_N, DIR_S, DIR_W, AirportMovingData::direction, AirportMovingData::flag, TILE_SIZE, AirportMovingData::x, and AirportMovingData::y.
|
static |
|
static |
Some airport-related constants.
maximum number of terminals per airport
Definition at line 17 of file airport.h.
Referenced by AirportFindFreeHelipad().
|
static |