12 #ifndef NEWGRF_RAILTYPE_H 13 #define NEWGRF_RAILTYPE_H 36 uint32
GetVariable(byte variable, uint32 parameter,
bool *available)
const;
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope)...
Resolver object for rail types.
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context=TCX_NORMAL, uint *num_results=NULL)
Get the sprite to draw for the given tile.
SignalType
Type of signal, i.e.
RailType
Enumeration for all possible railtypes.
ResolverObject & ro
Surrounding resolver object.
Interface for SpriteGroup-s to access the gamestate.
SignalState
These are states in which a signal can be.
Resolver for the railtype scope.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile)
Perform a reverse railtype lookup to get the GRF internal ID.
SpriteID GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, SignalState state, bool gui=false)
Get the sprite to draw for a given signal.
TileContext context
Are we resolving sprites for the upper halftile, or on a bridge?
This struct contains all the info that is needed to draw and construct tracks.
TileIndex tile
Tracktile. For track on a bridge this is the southern bridgehead.
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
RailTypeSpriteGroup
Sprite groups for a railtype.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32 TileIndex
The index/ID of a Tile.
RailTypeScopeResolver railtype_scope
Resolver for the railtype scope.
This file simplyfies and embeds a common mechanism of loading/saving and mapping of grf entities...
RailTypeScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context)
Constructor of the railtype scope resolvers.
SignalVariant
Variant of the signal, i.e.
uint32 GetVariable(byte variable, uint32 parameter, bool *available) const
Get a variable value.
uint32 GetRandomBits() const
Get a few random bits.
Dynamic data of a loaded NewGRF.
TileContext
Context for tile accesses.