10 #ifndef NEWGRF_ROADTYPE_H 11 #define NEWGRF_ROADTYPE_H 25 uint32
GetVariable(byte variable, uint32 parameter,
bool *available)
const;
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope)...
ResolverObject & ro
Surrounding resolver object.
RoadTypeSpriteGroup
Sprite groups for a roadtype.
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
Interface for SpriteGroup-s to access the gamestate.
TileContext context
Are we resolving sprites for the upper halftile, or on a bridge?
Resolver for the railtype scope.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
uint32 GetRandomBits() const
Get a few random bits.
RoadType
The different roadtypes we support.
SpriteID GetCustomRoadSprite(const RoadTypeInfo *rti, TileIndex tile, RoadTypeSpriteGroup rtsg, TileContext context=TCX_NORMAL, uint *num_results=nullptr)
Get the sprite to draw for the given tile.
uint32 GetVariable(byte variable, uint32 parameter, bool *available) const
Get a variable value.
uint8 GetReverseRoadTypeTranslation(RoadType roadtype, const GRFFile *grffile)
Perform a reverse roadtype lookup to get the GRF internal ID.
TileIndex tile
Tracktile. For track on a bridge this is the southern bridgehead.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32 TileIndex
The index/ID of a Tile.
RoadTypeScopeResolver roadtype_scope
Resolver for the roadtype scope.
Resolver object for road types.
RoadTypeScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context)
Constructor of the roadtype scope resolvers.
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities...
Dynamic data of a loaded NewGRF.
TileContext
Context for tile accesses.