OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef NEWGRF_ROADTYPE_H
11 #define NEWGRF_ROADTYPE_H
26 uint32
GetVariable(
byte variable, uint32 parameter,
bool *available)
const;
uint32 TileIndex
The index/ID of a Tile.
RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context)
Constructor of the roadtype scope resolvers.
RoadTypeResolverObject(const RoadTypeInfo *rti, TileIndex tile, TileContext context, RoadTypeSpriteGroup rtsg, uint32 param1=0, uint32 param2=0)
Resolver object for road types.
TileContext context
Are we resolving sprites for the upper halftile, or on a bridge?
RoadType GetRoadTypeTranslation(RoadTramType rtt, uint8 tracktype, const GRFFile *grffile)
Translate an index to the GRF-local road/tramtype-translation table into a RoadType.
Interface for SpriteGroup-s to access the gamestate.
Interface to query and set values specific to a single VarSpriteGroupScope (action 2 scope).
@ VSG_SCOPE_SELF
Resolved object itself.
ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0) override
Get a resolver for the scope.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
RoadTypeSpriteGroup
Sprite groups for a roadtype.
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.
virtual ScopeResolver * GetScope(VarSpriteGroupScope scope=VSG_SCOPE_SELF, byte relative=0)
Get a resolver for the scope.
RoadType
The different roadtypes we support.
uint8 GetReverseRoadTypeTranslation(RoadType roadtype, const GRFFile *grffile)
Perform a reverse roadtype lookup to get the GRF internal ID.
GrfSpecFeature GetFeature() const override
Get the feature number being resolved for.
Resolver object for road types.
TileIndex tile
Tracktile. For track on a bridge this is the southern bridgehead.
RoadTypeScopeResolver roadtype_scope
Resolver for the roadtype scope.
ResolverObject & ro
Surrounding resolver object.
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.
uint32 GetRandomBits() const
Get a few random bits.
Dynamic data of a loaded NewGRF.