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
@@ -139,11 +139,22 @@ IndustryTileResolverObject::IndustryTileResolverObject(IndustryGfx gfx, TileInde
|
||||
CallbackID callback, uint32 callback_param1, uint32 callback_param2)
|
||||
: ResolverObject(GetIndTileGrffile(gfx), callback, callback_param1, callback_param2),
|
||||
indtile_scope(*this, indus, tile),
|
||||
ind_scope(*this, tile, indus, indus->type)
|
||||
ind_scope(*this, tile, indus, indus->type),
|
||||
gfx(gfx)
|
||||
{
|
||||
this->root_spritegroup = GetIndustryTileSpec(gfx)->grf_prop.spritegroup[0];
|
||||
}
|
||||
|
||||
GrfSpecFeature IndustryTileResolverObject::GetFeature() const
|
||||
{
|
||||
return GSF_INDUSTRYTILES;
|
||||
}
|
||||
|
||||
uint32 IndustryTileResolverObject::GetDebugID() const
|
||||
{
|
||||
return GetIndustryTileSpec(gfx)->grf_prop.local_id;
|
||||
}
|
||||
|
||||
static void IndustryDrawTileLayout(const TileInfo *ti, const TileLayoutSpriteGroup *group, byte rnd_colour, byte stage, IndustryGfx gfx)
|
||||
{
|
||||
const DrawTileSprites *dts = group->ProcessRegisters(&stage);
|
||||
|
||||
Reference in New Issue
Block a user