OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #ifndef NEWGRF_AIRPORT_H
11 #define NEWGRF_AIRPORT_H
47 if (this->att->
ti.
x == -0x80) {
58 return this->att->
gfx;
132 return (
byte)(
this -
specs);
Year min_year
first year the airport is available
uint32 TileIndex
The index/ID of a Tile.
TileIndex tile
The current tile we are at.
virtual AirportTileTableIterator * Clone() const
Allocate a new iterator that is a copy of this one.
byte StationGfx
Copy from station_map.h.
Direction
Defines the 8 directions on the map.
bool IsWithinMapBounds(byte table, TileIndex index) const
Check if the airport would be within the map bounds at the given tile.
StationGfx GetStationGfx() const
Get the StationGfx for the current tile.
TileIndex base_tile
The tile we base the offsets off.
byte size_y
size of airport in y direction
StringID name
name of this airport
@ APC_HUB
id for hub airports class
Year max_year
last year the airport is available
byte noise_level
noise that this airport generates
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
static void ResetAirports()
This function initializes the airportspec array.
StringID GetAirportTextCallback(const AirportSpec *as, byte layout, uint16 callback)
Get a custom text for the airport.
Defines the data structure for an airport.
uint16 maintenance_cost
maintenance cost multiplier
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
static TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
Return the offset between to tiles from a TileIndexDiffC struct.
const Direction * rotation
the rotation of each tiletable
static const AirportSpec * Get(byte type)
Retrieve airport spec for the given airport.
AirportClassID cls_id
the class to which this airport type belongs
NewGRFClass< AirportSpec, AirportClassID, APC_MAX > AirportClass
Information related to airport classes.
const struct AirportFTAClass * fsm
the finite statemachine for the default airports
byte num_table
number of elements in the table
StationGfx gfx
AirportTile to use for this tile.
Base class for tile iterators.
byte GetIndex() const
Get the index of this spec.
Data related to the handling of grf files.
const AirportTileTable * att
The offsets.
Iterator to iterate over all tiles belonging to an airport spec.
Struct containing information relating to NewGRF classes for stations and airports.
TTDPAirportType ttd_airport_type
ttdpatch airport type (Small/Large/Helipad/Oilrig)
@ NUM_AIRPORTS
Maximal number of airports in total.
TTDPAirportType
Allow incrementing of AirportClassID variables.
void BindAirportSpecs()
Tie all airportspecs to their class.
Finite sTate mAchine (FTA) of an airport.
static const AirportSpec dummy
The dummy airport.
Tile-offset / AirportTileID pair.
@ APC_HELIPORT
id for heliports
static AirportSpec specs[NUM_AIRPORTS]
Specs of the airports.
Direction dir
Direction of the exit.
bool IsAvailable() const
Check whether this airport is available to build.
byte size_x
size of airport in x direction
A pair-construct of a TileIndexDiff.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
TileIndexDiffC ti
Tile offset from the top-most airport tile.
bool enabled
Entity still available (by default true). Newgrf can disable it, though.
SpriteID preview_sprite
preview sprite for this airport
AirportClassID
List of default airport classes.
@ ATP_TTDP_HELIPORT
Same as AT_HELIPORT.
@ APC_LARGE
id for large airports class
#define endof(x)
Get the end element of an fixed size array.
struct GRFFileProps grf_prop
Properties related to the grf file.
@ APC_MAX
maximum number of airport classes
@ APC_SMALL
id for small airports class
TileIterator & operator++()
Move ourselves to the next tile in the rectangle on the map.
static AirportSpec * GetWithoutOverride(byte type)
Retrieve airport spec for the given airport.
AirportTileTableIterator(const AirportTileTable *att, TileIndex base_tile)
Construct the iterator.
const HangarTileTable * depot_table
gives the position of the depots on the airports
byte hangar_num
The hangar to which this tile belongs.
@ ATP_TTDP_SMALL
Same as AT_SMALL.
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
@ ATP_TTDP_LARGE
Same as AT_LARGE.
@ ATP_TTDP_OILRIG
Same as AT_OILRIG.
byte nof_depots
the number of hangar tiles in this airport
TileIndexDiffC ti
Tile offset from the top-most airport tile.
const AirportTileTable *const * table
list of the tiles composing the airport
A list of all hangar tiles in an airport.
@ APC_BEGIN
Lowest valid airport class id.
byte catchment
catchment area of this airport
int16 x
The x value of the coordinate.