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_house.cpp | |
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_house.cpp')
-rw-r--r-- | src/newgrf_house.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index b7d8048c9..b585a682d 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -62,6 +62,16 @@ HouseResolverObject::HouseResolverObject(HouseID house_id, TileIndex tile, Town this->root_spritegroup = HouseSpec::Get(house_id)->grf_prop.spritegroup[0]; } +GrfSpecFeature HouseResolverObject::GetFeature() const +{ + return GSF_HOUSES; +} + +uint32 HouseResolverObject::GetDebugID() const +{ + return HouseSpec::Get(this->house_scope.house_id)->grf_prop.local_id; +} + HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid) { /* Start from 1 because 0 means that no class has been assigned. */ |