|
OpenTTD Source 20260129-master-g2bb01bd0e4
|
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 | AirportFTA |
| Internal structure used in openttd - Finite sTate mAchine --> FTA. More... | |
| struct | AirportFTAClass |
| Finite sTate mAchine (FTA) of an airport. More... | |
Typedefs | |
| using | AirportMovingDataFlags = EnumBitSet< AirportMovingDataFlag, uint16_t > |
| using | AirportBlocks = EnumBitSet< AirportBlock, uint64_t > |
Functions | |
| AirportMovingData | RotateAirportMovingData (const AirportMovingData *orig, Direction rotation, uint num_tiles_x, uint num_tiles_y) |
| Rotate the airport moving data to another rotation. | |
| const AirportFTAClass * | GetAirport (const uint8_t airport_type) |
| Get the finite state machine of an airport type. | |
| uint8_t | GetVehiclePosOnBuild (TileIndex hangar_tile) |
| Get the vehicle position when an aircraft is build at the given tile. | |
Variables | |
| static const uint | MAX_TERMINALS = 8 |
| Some airport-related constants. | |
| 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 | |
Various declarations for airports.
Definition in file airport.h.
| using AirportBlocks = EnumBitSet<AirportBlock, uint64_t> |
| using AirportMovingDataFlags = EnumBitSet<AirportMovingDataFlag, uint16_t> |
|
strong |
Movement Blocks on Airports blocks (eg_airport_flags).
| Enumerator | |
|---|---|
| Term1 | Block belonging to terminal 1. |
| Term2 | Block belonging to terminal 2. |
| Term3 | Block belonging to terminal 3. |
| Term4 | Block belonging to terminal 4. |
| Term5 | Block belonging to terminal 5. |
| Term6 | Block belonging to terminal 6. |
| Helipad1 | Block belonging to helipad 1. |
| Helipad2 | Block belonging to helipad 2. |
| RunwayInOut | Runway used for landing and take-off (commuter / city airports). |
| RunwayIn | Runway used for landing (metropolitan / international / intercontinental airports). |
| AirportBusy | Complete airport is busy (small airport / heliport). |
| RunwayOut | Runway used for take off. |
| TaxiwayBusy | Taxiway is occupied (commuter / city airports / helistation). |
| OutWay | Holding point just before take off. |
| InWay | Holding point just after take off. |
| AirportEntrance | Entrance point before terminals. |
| TermGroup1 | First set of terminals. |
| TermGroup2 | Second set of terminals. |
| Hangar2Area | Area in front of the second hangar. |
| TermGroup2Enter1 | First holding point before terminal. |
| TermGroup2Enter2 | Second holding point before terminal. |
| TermGroup2Exit1 | First holding point after terminal. |
| TermGroup2Exit2 | Second holding point after terminal. |
| PreHelipad | Holding point for helicopter landings. |
| Term7 | Block belonging to terminal 7. |
| Term8 | Block belonging to terminal 8. |
| Helipad3 | Block belonging to helipad 3. |
| Hangar1Area | Area in front of the first hangar. |
| OutWay2 | Second holding point just before take off. |
| InWay2 | Second holding point just after take off. |
| RunwayIn2 | Second runway for landing. |
| RunwayOut2 | Second runway for take off.
|
| OutWay3 | Third holding point just before take off. |
| Nothing | Nothing is blocked, for example being in the hanger. |
| Zeppeliner | Block for the zeppeliner disaster vehicle. |
| AirportClosed | Dummy block for indicating a closed airport. |
| enum AirportMovementStates : uint8_t |
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. |
|
strong |
Flags for airport movement data.
| enum AirportTypes : uint8_t |
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 186 of file airport.cpp.
References AT_DUMMY, AirportSpec::fsm, and AirportSpec::Get().
Referenced by AircraftController(), AircraftNextAirportPos_and_Order(), and CmdBuildAirport().
| 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 197 of file airport.cpp.
References Station::airport, BaseStation::GetByTile(), Airport::GetFTA(), Airport::GetHangarTile(), HANGAR, and AirportFTAClass::layout.
Referenced by CmdBuildAircraft().
| 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 81 of file airport.cpp.
References ChangeDir(), DIR_E, DIR_N, DIR_S, DIR_W, AirportMovingData::direction, AirportMovingData::flags, TILE_SIZE, AirportMovingData::x, and AirportMovingData::y.
Referenced by AircraftController().
|
static |
id for an invalid airport tile
Definition at line 25 of file airport.h.
Referenced by AirportChangeInfo(), GetAirportTileIDAtOffset(), and GetTranslatedAirportTileID().
|
static |
maximum number of aircraft positions at airport
Definition at line 19 of file airport.h.
Referenced by AirportGetNofElements().
|
static |
|
static |
Some airport-related constants.
maximum number of terminals per airport
Definition at line 17 of file airport.h.
Referenced by AirportFindFreeHelipad().
|
static |
offset of first newgrf airport tile
Definition at line 24 of file airport.h.
Referenced by GetAirportTileIDAtOffset().
|
static |