Debug: Allow clicking to highlight group in sprite group dump window
This commit is contained in:
@@ -397,9 +397,9 @@ class NIHVehicle : public NIHelper {
|
||||
output.print(buffer);
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
extern void DumpVehicleSpriteGroup(const Vehicle *v, std::function<void(const char *)> print);
|
||||
extern void DumpVehicleSpriteGroup(const Vehicle *v, DumpSpriteGroupPrinter print);
|
||||
DumpVehicleSpriteGroup(Vehicle::Get(index), std::move(print));
|
||||
}
|
||||
};
|
||||
@@ -467,7 +467,7 @@ class NIHStation : public NIHelper {
|
||||
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra);
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
StationResolverObject ro(GetStationSpec(index), Station::GetByTile(index), index, INVALID_RAILTYPE);
|
||||
DumpSpriteGroup(ro.root_spritegroup, std::move(print));
|
||||
@@ -567,7 +567,7 @@ class NIHHouse : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
DumpSpriteGroup(HouseSpec::Get(GetHouseType(index))->grf_prop.spritegroup[0], std::move(print));
|
||||
}
|
||||
@@ -640,11 +640,11 @@ class NIHIndustryTile : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
const IndustryTileSpec *indts = GetIndustryTileSpec(GetIndustryGfx(index));
|
||||
if (indts) {
|
||||
extern void DumpIndustryTileSpriteGroup(const IndustryTileSpec *spec, std::function<void(const char *)> print);
|
||||
extern void DumpIndustryTileSpriteGroup(const IndustryTileSpec *spec, DumpSpriteGroupPrinter print);
|
||||
DumpIndustryTileSpriteGroup(indts, std::move(print));
|
||||
}
|
||||
}
|
||||
@@ -832,11 +832,11 @@ class NIHIndustry : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
const Industry *ind = Industry::GetIfValid(index);
|
||||
if (ind) {
|
||||
extern void DumpIndustrySpriteGroup(const IndustrySpec *spec, std::function<void(const char *)> print);
|
||||
extern void DumpIndustrySpriteGroup(const IndustrySpec *spec, DumpSpriteGroupPrinter print);
|
||||
DumpIndustrySpriteGroup(GetIndustrySpec(ind->type), std::move(print));
|
||||
}
|
||||
}
|
||||
@@ -970,9 +970,9 @@ class NIHObject : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
extern void DumpObjectSpriteGroup(const ObjectSpec *spec, std::function<void(const char *)> print);
|
||||
extern void DumpObjectSpriteGroup(const ObjectSpec *spec, DumpSpriteGroupPrinter print);
|
||||
DumpObjectSpriteGroup(ObjectSpec::GetByTile(index), std::move(print));
|
||||
}
|
||||
};
|
||||
@@ -1482,9 +1482,9 @@ class NIHRoadStop : public NIHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/* virtual */ void SpriteDump(uint index, std::function<void(const char *)> print) const override
|
||||
/* virtual */ void SpriteDump(uint index, DumpSpriteGroupPrinter print) const override
|
||||
{
|
||||
extern void DumpRoadStopSpriteGroup(const BaseStation *st, const RoadStopSpec *spec, std::function<void(const char *)> print);
|
||||
extern void DumpRoadStopSpriteGroup(const BaseStation *st, const RoadStopSpec *spec, DumpSpriteGroupPrinter print);
|
||||
DumpRoadStopSpriteGroup(BaseStation::GetByTile(index), GetRoadStopSpec(index), std::move(print));
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user