Resolver for the railtype scope. More...
#include <newgrf_railtype.h>
Public Member Functions | |
| RailTypeScopeResolver (ResolverObject *ro, TileIndex tile, TileContext context) | |
| Constructor of the railtype scope resolvers. | |
| uint32 | GetRandomBits () const |
| Get a few random bits. | |
| uint32 | GetVariable (byte variable, uint32 parameter, bool *available) const |
| Get a variable value. | |
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? | |
Resolver for the railtype scope.
Definition at line 20 of file newgrf_railtype.h.
| RailTypeScopeResolver::RailTypeScopeResolver | ( | ResolverObject * | ro, | |
| TileIndex | tile, | |||
| TileContext | context | |||
| ) |
Constructor of the railtype scope resolvers.
| ro | Surrounding resolver. | |
| 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 74 of file newgrf_railtype.cpp.
| uint32 RailTypeScopeResolver::GetRandomBits | ( | ) | const [virtual] |
Get a few random bits.
Default implementation has no random bits.
Reimplemented from ScopeResolver.
Definition at line 19 of file newgrf_railtype.cpp.
References CountBits(), GB(), tile, TILE_SIZE, TileX(), and TileY().
| uint32 RailTypeScopeResolver::GetVariable | ( | byte | variable, | |
| uint32 | parameter, | |||
| bool * | available | |||
| ) | const [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 from ScopeResolver.
Definition at line 25 of file newgrf_railtype.cpp.
References _date, Depot::build_date, ClosestTownFromTile(), context, DEBUG, GetTerrainType(), GetTownRadiusGroup(), INVALID_TILE, IsCrossingBarred(), IsLevelCrossingTile(), IsRailDepotTile(), and tile.
1.7.1