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.
This commit is contained in:
Niels Martin Hansen
2020-01-26 13:45:51 +01:00
committed by GitHub
parent f88ac83408
commit c8779fb311
40 changed files with 691 additions and 20 deletions

View File

@@ -527,6 +527,16 @@ uint32 Waypoint::GetNewGRFVariable(const ResolverObject &object, byte variable,
return group->loading[0];
}
GrfSpecFeature StationResolverObject::GetFeature() const
{
return GSF_STATIONS;
}
uint32 StationResolverObject::GetDebugID() const
{
return this->station_scope.statspec->grf_prop.local_id;
}
/**
* Resolver for stations.
* @param statspec Station (type) specification.