OpenTTD
Public Member Functions | Data Fields
AirportTileScopeResolver Struct Reference

Scope resolver for handling the tiles of an airport. More...

#include <newgrf_airporttiles.h>

Inheritance diagram for AirportTileScopeResolver:
ScopeResolver

Public Member Functions

 AirportTileScopeResolver (ResolverObject &ro, const AirportTileSpec *ats, TileIndex tile, Station *st)
 Constructor of the scope resolver specific for airport tiles.
uint32 GetRandomBits () const
 Get a few random bits.
uint32 GetVariable (byte variable, uint32 parameter, bool *available) const
 Get a variable value.
- Public Member Functions inherited from ScopeResolver
 ScopeResolver (ResolverObject &ro)
virtual uint32 GetTriggers () const
 Get the triggers.
virtual void SetTriggers (int triggers) const
 Set the triggers.
virtual void StorePSA (uint reg, int32 value)
 Store a value into the persistent storage area (PSA).

Data Fields

struct Stationst
 Station of the airport for which the callback is run, or NULL for build gui.
byte airport_id
 Type of airport for which the callback is run.
TileIndex tile
 Tile for the callback, only valid for airporttile callbacks.
- Data Fields inherited from ScopeResolver
ResolverObjectro
 Surrounding resolver object.

Detailed Description

Scope resolver for handling the tiles of an airport.

Definition at line 22 of file newgrf_airporttiles.h.

Constructor & Destructor Documentation

AirportTileScopeResolver::AirportTileScopeResolver ( ResolverObject ro,
const AirportTileSpec ats,
TileIndex  tile,
Station st 
)

Constructor of the scope resolver specific for airport tiles.

Parameters
atsSpecification of the airport tiles.
tileTile for the callback, only valid for airporttile callbacks.
stStation of the airport for which the callback is run, or NULL for build gui.

Definition at line 231 of file newgrf_airporttiles.cpp.

References Station::airport, airport_id, st, tile, and Airport::type.

Member Function Documentation

uint32 AirportTileScopeResolver::GetRandomBits ( ) const
virtual

Get a few random bits.

Default implementation has no random bits.

Returns
Random bits.

Reimplemented from ScopeResolver.

Definition at line 204 of file newgrf_airporttiles.cpp.

References GetStationTileRandomBits(), INVALID_TILE, BaseStation::random_bits, st, and tile.

uint32 AirportTileScopeResolver::GetVariable ( byte  variable,
uint32  parameter,
bool *  available 
) const
virtual

Get a variable value.

Default implementation has no available variables.

Parameters
variableVariable to read
parameterParameter for 60+x variables
[out]availableSet to false, in case the variable does not exist.
Returns
Value

Reimplemented from ScopeResolver.

Definition at line 163 of file newgrf_airporttiles.cpp.

References Station::airport, ClosestTownFromTile(), DEBUG, GetAirportTileIDAtOffset(), GetAnimationFrame(), GetNearbyAirportTileInformation(), GetNearbyTile(), GetRelativePosition(), GetTerrainType(), GetTownRadiusGroup(), ResolverObject::grffile, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, ScopeResolver::ro, st, OrthogonalTileArea::tile, and tile.


The documentation for this struct was generated from the following files: