summaryrefslogtreecommitdiff
path: root/src/newgrf_airporttiles.h
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2020-01-26 13:45:51 +0100
committerGitHub <noreply@github.com>2020-01-26 13:45:51 +0100
commitc8779fb311c2665d3fc45c18b2f3460cd998d179 (patch)
tree15321da1e265a40fce50700182b218a87494d24a /src/newgrf_airporttiles.h
parentf88ac83408bff58022699b4d9488818d509ef974 (diff)
downloadopenttd-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_airporttiles.h')
-rw-r--r--src/newgrf_airporttiles.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_airporttiles.h b/src/newgrf_airporttiles.h
index 191b79e9a..37460622d 100644
--- a/src/newgrf_airporttiles.h
+++ b/src/newgrf_airporttiles.h
@@ -22,6 +22,7 @@ struct AirportTileScopeResolver : public ScopeResolver {
struct Station *st; ///< %Station of the airport for which the callback is run, or \c nullptr for build gui.
byte airport_id; ///< Type of airport for which the callback is run.
TileIndex tile; ///< Tile for the callback, only valid for airporttile callbacks.
+ const AirportTileSpec *ats;
/**
* Constructor of the scope resolver specific for airport tiles.
@@ -30,7 +31,7 @@ struct AirportTileScopeResolver : public ScopeResolver {
* @param st Station of the airport for which the callback is run, or \c nullptr for build gui.
*/
AirportTileScopeResolver(ResolverObject &ro, const AirportTileSpec *ats, TileIndex tile, Station *st)
- : ScopeResolver(ro), st(st), tile(tile)
+ : ScopeResolver(ro), st(st), tile(tile), ats(ats)
{
assert(st != nullptr);
this->airport_id = st->airport.type;
@@ -54,6 +55,9 @@ struct AirportTileResolverObject : public ResolverObject {
default: return ResolverObject::GetScope(scope, relative);
}
}
+
+ GrfSpecFeature GetFeature() const override;
+ uint32 GetDebugID() const override;
};
/**