OpenTTD Source 20241224-master-gf74b0cf984
CanalScopeResolver Struct Reference

Scope resolver of a canal tile. More...

Inheritance diagram for CanalScopeResolver:
ScopeResolver

Public Member Functions

 CanalScopeResolver (ResolverObject &ro, TileIndex tile)
 
uint32_t GetRandomBits () const override
 Get a few random bits.
 
uint32_t GetVariable (uint8_t variable, uint32_t parameter, bool &available) const override
 Get a variable value.
 
- Public Member Functions inherited from ScopeResolver
 ScopeResolver (ResolverObject &ro)
 
virtual uint32_t GetTriggers () const
 Get the triggers.
 
virtual void StorePSA (uint reg, int32_t value)
 Store a value into the persistent storage area (PSA).
 

Data Fields

TileIndex tile
 Tile containing the canal.
 
- Data Fields inherited from ScopeResolver
ResolverObjectro
 Surrounding resolver object.
 

Detailed Description

Scope resolver of a canal tile.

Definition at line 24 of file newgrf_canal.cpp.

Constructor & Destructor Documentation

◆ CanalScopeResolver()

CanalScopeResolver::CanalScopeResolver ( ResolverObject ro,
TileIndex  tile 
)
inline

Definition at line 27 of file newgrf_canal.cpp.

Member Function Documentation

◆ GetRandomBits()

uint32_t CanalScopeResolver::GetRandomBits ( ) const
overridevirtual

Get a few random bits.

Default implementation has no random bits.

Returns
Random bits.

Reimplemented from ScopeResolver.

Definition at line 56 of file newgrf_canal.cpp.

References GetWaterTileRandomBits(), IsTileType(), MP_WATER, and tile.

◆ GetVariable()

uint32_t CanalScopeResolver::GetVariable ( uint8_t  variable,
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 62 of file newgrf_canal.cpp.

References Debug, DIR_E, DIR_N, DIR_NE, DIR_NW, DIR_S, DIR_SE, DIR_SW, DIR_W, GetLockPart(), GetTerrainType(), GetTileZ(), GetWaterTileRandomBits(), IsLock(), IsTileType(), IsWateredTile(), LOCK_PART_UPPER, MP_WATER, tile, and TileAddXY().

Field Documentation

◆ tile

TileIndex CanalScopeResolver::tile

Tile containing the canal.

Definition at line 25 of file newgrf_canal.cpp.

Referenced by GetRandomBits(), and GetVariable().


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