OpenTTD
|
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope). More...
#include <newgrf_spritegroup.h>
Public Member Functions | |
ScopeResolver (ResolverObject &ro) | |
virtual uint32 | GetRandomBits () const |
Get a few random bits. More... | |
virtual uint32 | GetTriggers () const |
Get the triggers. More... | |
virtual uint32 | GetVariable (byte variable, uint32 parameter, bool *available) const |
Get a variable value. More... | |
virtual void | StorePSA (uint reg, int32 value) |
Store a value into the persistent storage area (PSA). More... | |
Data Fields | |
ResolverObject & | ro |
Surrounding resolver object. | |
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
Multiple of these interfaces are combined into a ResolverObject to allow access to different game entities from a SpriteGroup-chain (action 1-2-3 chain).
Definition at line 291 of file newgrf_spritegroup.h.
|
virtual |
Get a few random bits.
Default implementation has no random bits.
Reimplemented in ObjectScopeResolver, HouseScopeResolver, StationScopeResolver, VehicleScopeResolver, AirportScopeResolver, AirportTileScopeResolver, IndustriesScopeResolver, IndustryTileScopeResolver, RailTypeScopeResolver, and CanalScopeResolver.
Definition at line 91 of file newgrf_spritegroup.cpp.
|
virtual |
Get the triggers.
Base class returns 0
to prevent trouble.
Reimplemented in HouseScopeResolver, StationScopeResolver, VehicleScopeResolver, IndustriesScopeResolver, and IndustryTileScopeResolver.
Definition at line 100 of file newgrf_spritegroup.cpp.
|
virtual |
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 in ObjectScopeResolver, HouseScopeResolver, StationScopeResolver, GenericScopeResolver, VehicleScopeResolver, AirportScopeResolver, AirportTileScopeResolver, TownScopeResolver, IndustriesScopeResolver, IndustryTileScopeResolver, RailTypeScopeResolver, and CanalScopeResolver.
Definition at line 112 of file newgrf_spritegroup.cpp.
References DEBUG.
Referenced by NIHVehicle::Resolve(), NIHHouse::Resolve(), NIHIndustryTile::Resolve(), NIHIndustry::Resolve(), NIHObject::Resolve(), NIHAirportTile::Resolve(), and NIHTown::Resolve().
|
virtual |
Store a value into the persistent storage area (PSA).
Default implementation does nothing (for newgrf classes without storage).
pos | Position to store into. |
value | Value to store. |
Reimplemented in AirportScopeResolver, IndustriesScopeResolver, and TownScopeResolver.
Definition at line 124 of file newgrf_spritegroup.cpp.