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:

committed by
GitHub

parent
f88ac83408
commit
c8779fb311
@@ -58,6 +58,9 @@ struct AirportResolverObject : public ResolverObject {
|
||||
}
|
||||
|
||||
const SpriteGroup *ResolveReal(const RealSpriteGroup *group) const override;
|
||||
|
||||
GrfSpecFeature GetFeature() const override;
|
||||
uint32 GetDebugID() const override;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -226,6 +229,16 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GrfSpecFeature AirportResolverObject::GetFeature() const
|
||||
{
|
||||
return GSF_AIRPORTS;
|
||||
}
|
||||
|
||||
uint32 AirportResolverObject::GetDebugID() const
|
||||
{
|
||||
return AirportSpec::Get(this->airport_scope.airport_id)->grf_prop.local_id;
|
||||
}
|
||||
|
||||
/* virtual */ uint32 AirportScopeResolver::GetRandomBits() const
|
||||
{
|
||||
return this->st == nullptr ? 0 : this->st->random_bits;
|
||||
|
Reference in New Issue
Block a user