Go to the documentation of this file.
10 #ifndef NEWGRF_RAILTYPE_H
11 #define NEWGRF_RAILTYPE_H
35 uint32
GetVariable(
byte variable, uint32 parameter,
bool *available)
const override;
RailType GetRailTypeTranslation(uint8 railtype, const GRFFile *grffile)
Translate an index to the GRF-local railtype-translation table into a RailType.
uint32 TileIndex
The index/ID of a Tile.
TileContext context
Are we resolving sprites for the upper halftile, or on a bridge?
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0) override
Get a resolver for the scope.
uint32 GetRandomBits() const override
Get a few random bits.
Interface for SpriteGroup-s to access the gamestate.
This struct contains all the info that is needed to draw and construct tracks.
SignalState
These are states in which a signal can be.
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
RailTypeSpriteGroup
Sprite groups for a railtype.
@ VSG_SCOPE_SELF
Resolved object itself.
SignalType
Type of signal, i.e.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
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.
RailType
Enumeration for all possible railtypes.
Resolver for the railtype scope.
TileContext
Context for tile accesses.
uint32 GetDebugID() const override
Get an identifier for the item being resolved.
@ TCX_NORMAL
Nothing special.
TileIndex tile
Tracktile. For track on a bridge this is the southern bridgehead.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
RailTypeScopeResolver(ResolverObject &ro, const RailtypeInfo *rti, TileIndex tile, TileContext context)
Constructor of the railtype scope resolvers.
uint32 GetVariable(byte variable, uint32 parameter, bool *available) const override
Get a variable value.
GrfSpecFeature GetFeature() const override
Get the feature number being resolved for.
RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1=0, uint32 param2=0)
Resolver object for rail types.
const SpriteGroup * ResolveReal(const RealSpriteGroup *group) const override
Get the real sprites of the grf.
SignalVariant
Variant of the signal, i.e.
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context=TCX_NORMAL, uint *num_results=nullptr)
Get the sprite to draw for the given tile.
Resolver object for rail types.
ResolverObject & ro
Surrounding resolver object.
uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile)
Perform a reverse railtype lookup to get the GRF internal ID.
Dynamic data of a loaded NewGRF.
RailTypeScopeResolver railtype_scope
Resolver for the railtype scope.