12 #ifndef NEWGRF_AIRPORT_H 13 #define NEWGRF_AIRPORT_H 49 if (this->att->
ti.
x == -0x80) {
60 return this->att->
gfx;
125 bool IsAvailable()
const;
127 static void ResetAirports();
132 assert(
this >= specs &&
this <
endof(specs));
133 return (byte)(
this - specs);
id for small airports class
TTDPAirportType ttd_airport_type
ttdpatch airport type (Small/Large/Helipad/Oilrig)
Finite sTate mAchine (FTA) of an airport.
AirportClassID
List of default airport classes.
TileIndexDiffC ti
Tile offset from the top-most airport tile.
byte size_y
size of airport in y direction
byte hangar_num
The hangar to which this tile belongs.
void BindAirportSpecs()
Tie all airportspecs to their class.
const HangarTileTable * depot_table
gives the position of the depots on the airports
byte GetIndex() const
Get the index of this spec.
Iterator to iterate over all tiles belonging to an airport spec.
static const AirportSpec dummy
The dummy airport.
A list of all hangar tiles in an airport.
Lowest valid airport class id.
int32 Year
Type for the year, note: 0 based, i.e. starts at the year 0.
const struct AirportFTAClass * fsm
the finite statemachine for the default airports
Year min_year
first year the airport is available
byte nof_depots
the number of hangar tiles in this airport
uint16 maintenance_cost
maintenance cost multiplier
Direction
Defines the 8 directions on the map.
const AirportTileTable *const * table
list of the tiles composing the airport
Various declarations for airports.
byte catchment
catchment area of this airport
Maximal number of airports in total.
byte noise_level
noise that this airport generates
Struct containing information relating to NewGRF classes for stations and airports.
AirportClassID cls_id
the class to which this airport type belongs
NewGRFClass< AirportSpec, AirportClassID, APC_MAX > AirportClass
Information related to airport classes.
const Direction * rotation
the rotation of each tiletable
Data related to the handling of grf files.
maximum number of airport classes
const AirportTileTable * att
The offsets.
int16 x
The x value of the coordinate.
byte num_table
number of elements in the table
Base class for tile iterators.
StationGfx gfx
AirportTile to use for this tile.
virtual AirportTileTableIterator * Clone() const
Allocate a new iterator that is a copy of this one.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
TileIndex base_tile
The tile we base the offsets off.
TileIndexDiffC ti
Tile offset from the top-most airport tile.
StationGfx GetStationGfx() const
Get the StationGfx for the current tile.
A pair-construct of a TileIndexDiff.
static TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
Return the offset between to tiles from a TileIndexDiffC struct.
byte StationGfx
Copy from station_map.h.
Header file for classes to be used by e.g.
Direction dir
Direction of the exit.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32 TileIndex
The index/ID of a Tile.
StringID name
name of this airport
StringID GetAirportTextCallback(const AirportSpec *as, byte layout, uint16 callback)
Get a custom text for the airport.
AirportTileTableIterator(const AirportTileTable *att, TileIndex base_tile)
Construct the iterator.
byte size_x
size of airport in x direction
Tile-offset / AirportTileID pair.
#define endof(x)
Get the end element of an fixed size array.
id for hub airports class
Type for storing the 'area' of something uses on the map.
Types related to the dates in OpenTTD.
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities...
bool enabled
Entity still available (by default true). Newgrf can disable it, though.
SpriteID preview_sprite
preview sprite for this airport
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
Defines the data structure for an airport.
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
TTDPAirportType
Allow incrementing of AirportClassID variables.
Year max_year
last year the airport is available
id for large airports class