diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2020-01-26 13:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-26 13:45:51 +0100 |
commit | c8779fb311c2665d3fc45c18b2f3460cd998d179 (patch) | |
tree | 15321da1e265a40fce50700182b218a87494d24a /src/newgrf_roadtype.h | |
parent | f88ac83408bff58022699b4d9488818d509ef974 (diff) | |
download | openttd-c8779fb311c2665d3fc45c18b2f3460cd998d179.tar.xz |
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
Diffstat (limited to 'src/newgrf_roadtype.h')
-rw-r--r-- | src/newgrf_roadtype.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_roadtype.h b/src/newgrf_roadtype.h index ee0773d7d..56b65f127 100644 --- a/src/newgrf_roadtype.h +++ b/src/newgrf_roadtype.h @@ -18,8 +18,9 @@ struct RoadTypeScopeResolver : 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 RoadTypeInfo *rti; - RoadTypeScopeResolver(ResolverObject &ro, TileIndex tile, TileContext context); + RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context); /* virtual */ uint32 GetRandomBits() const; /* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const; @@ -40,6 +41,9 @@ struct RoadTypeResolverObject : public ResolverObject { } /* virtual */ const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const; + + GrfSpecFeature GetFeature() const override; + uint32 GetDebugID() const override; }; SpriteID GetCustomRoadSprite(const RoadTypeInfo *rti, TileIndex tile, RoadTypeSpriteGroup rtsg, TileContext context = TCX_NORMAL, uint *num_results = nullptr); |