OpenTTD Source  20241121-master-g67a0fccfad
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. More...
 
uint32_t GetRandomBits () const override
 Get a few random bits. More...
 
uint32_t GetVariable (uint8_t variable, [[maybe_unused]] uint32_t parameter, bool &available) const override
 Get a variable value. More...
 
- Public Member Functions inherited from ScopeResolver
 ScopeResolver (ResolverObject &ro)
 
virtual uint32_t GetTriggers () const
 Get the triggers. More...
 
virtual void StorePSA (uint reg, int32_t value)
 Store a value into the persistent storage area (PSA). More...
 

Data Fields

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

Detailed Description

Scope resolver for handling the tiles of an airport.

Definition at line 21 of file newgrf_airporttiles.h.

Constructor & Destructor Documentation

◆ AirportTileScopeResolver()

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

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 nullptr for build gui.

Definition at line 33 of file newgrf_airporttiles.h.

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

Member Function Documentation

◆ GetRandomBits()

uint32_t AirportTileScopeResolver::GetRandomBits ( ) const
overridevirtual

Get a few random bits.

Default implementation has no random bits.

Returns
Random bits.

Reimplemented from ScopeResolver.

Definition at line 201 of file newgrf_airporttiles.cpp.

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

◆ GetVariable()

uint32_t AirportTileScopeResolver::GetVariable ( uint8_t  variable,
[[maybe_unused] ] uint32_t  parameter,
bool &  available 
) const
overridevirtual

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 162 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, tile, and OrthogonalTileArea::tile.


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