Debug: Change interfaces using SpriteGroupDumper

Pass SpriteGroupDumper ref instead of print function
Make use_shadows non-static
This commit is contained in:
Jonathan G Rennison
2023-12-27 23:46:45 +00:00
parent 8c4d36a498
commit 5b6c0c1f2e
14 changed files with 83 additions and 96 deletions

View File

@@ -104,15 +104,14 @@ NewLandscapeResolverObject::NewLandscapeResolverObject(const GRFFile *grffile, c
}
}
void DumpNewLandscapeRocksSpriteGroups(DumpSpriteGroupPrinter print)
void DumpNewLandscapeRocksSpriteGroups(SpriteGroupDumper &dumper)
{
SpriteGroupDumper dumper(print);
bool first = true;
for (const GRFFile *grf : _new_landscape_rocks_grfs) {
if (!first) print(nullptr, DSGPO_PRINT, 0, "");
if (!first) dumper.Print("");
char buffer[64];
seprintf(buffer, lastof(buffer), "GRF: %08X", BSWAP32(grf->grfid));
print(nullptr, DSGPO_PRINT, 0, buffer);
dumper.Print(buffer);
first = false;
dumper.DumpSpriteGroup(grf->new_rocks_group, 0);
}