Signals: Add variable for restriction info, add bit for reserve through
This commit is contained in:
@@ -14,11 +14,14 @@
|
||||
#include "newgrf_commons.h"
|
||||
#include "newgrf_spritegroup.h"
|
||||
|
||||
struct TraceRestrictProgram;
|
||||
|
||||
/** Resolver for the railtype scope. */
|
||||
struct RailTypeScopeResolver : public ScopeResolver {
|
||||
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?
|
||||
const RailtypeInfo *rti;
|
||||
const TraceRestrictProgram *prog;
|
||||
|
||||
/**
|
||||
* Constructor of the railtype scope resolvers.
|
||||
@@ -26,8 +29,8 @@ struct RailTypeScopeResolver : public ScopeResolver {
|
||||
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
|
||||
* @param context Are we resolving sprites for the upper halftile, or on a bridge?
|
||||
*/
|
||||
RailTypeScopeResolver(ResolverObject &ro, const RailtypeInfo *rti, TileIndex tile, TileContext context)
|
||||
: ScopeResolver(ro), tile(tile), context(context), rti(rti)
|
||||
RailTypeScopeResolver(ResolverObject &ro, const RailtypeInfo *rti, TileIndex tile, TileContext context, const TraceRestrictProgram *prog)
|
||||
: ScopeResolver(ro), tile(tile), context(context), rti(rti), prog(prog)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ struct RailTypeScopeResolver : public ScopeResolver {
|
||||
struct RailTypeResolverObject : public ResolverObject {
|
||||
RailTypeScopeResolver railtype_scope; ///< Resolver for the railtype scope.
|
||||
|
||||
RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1 = 0, uint32 param2 = 0);
|
||||
RailTypeResolverObject(const RailtypeInfo *rti, TileIndex tile, TileContext context, RailTypeSpriteGroup rtsg, uint32 param1 = 0, uint32 param2 = 0, const TraceRestrictProgram *prog = nullptr);
|
||||
|
||||
ScopeResolver *GetScope(VarSpriteGroupScope scope = VSG_SCOPE_SELF, byte relative = 0) override
|
||||
{
|
||||
@@ -59,7 +62,7 @@ struct CustomSignalSpriteResult {
|
||||
};
|
||||
|
||||
SpriteID GetCustomRailSprite(const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context = TCX_NORMAL, uint *num_results = nullptr);
|
||||
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui = false, bool restricted = false);
|
||||
CustomSignalSpriteResult GetCustomSignalSprite(const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, uint8 aspect, bool gui = false, const TraceRestrictProgram *prog = nullptr);
|
||||
|
||||
RailType GetRailTypeTranslation(uint8 railtype, const GRFFile *grffile);
|
||||
uint8 GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile);
|
||||
|
Reference in New Issue
Block a user