OpenTTD Source
20241108-master-g80f628063a
|
Resolver for the railtype scope. More...
#include <newgrf_roadtype.h>
Public Member Functions | |
RoadTypeScopeResolver (ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context) | |
Constructor of the roadtype scope resolvers. 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 | |
TileIndex | tile |
Tracktile. For track on a bridge this is the southern bridgehead. | |
TileContext | context |
Are we resolving sprites for the upper halftile, or on a bridge? | |
const RoadTypeInfo * | rti |
Data Fields inherited from ScopeResolver | |
ResolverObject & | ro |
Surrounding resolver object. | |
Resolver for the railtype scope.
Definition at line 18 of file newgrf_roadtype.h.
|
inline |
Constructor of the roadtype scope resolvers.
ro | Surrounding resolver. |
rti | Associated RoadTypeInfo. |
tile | Tile containing the track. For track on a bridge this is the southern bridgehead. |
context | Are we resolving sprites for the upper halftile, or on a bridge? |
Definition at line 30 of file newgrf_roadtype.h.
|
overridevirtual |
Get a few random bits.
Default implementation has no random bits.
Reimplemented from ScopeResolver.
Definition at line 20 of file newgrf_roadtype.cpp.
References CountBits(), GB(), tile, TILE_SIZE, TileX(), and TileY().
|
overridevirtual |
Get a variable value.
Default implementation has no available variables.
variable | Variable to read | |
parameter | Parameter for 60+x variables | |
[out] | available | Set to false, in case the variable does not exist. |
Reimplemented from ScopeResolver.
Definition at line 26 of file newgrf_roadtype.cpp.
References TimerGameCalendar::date, INVALID_TILE, and tile.