refactor(editor): extract --info-{zone,project}-density into cli_info_density.cpp

Moves the two content-density audit handlers
(--info-zone-density, --info-project-density) out of main.cpp
into a new cli_info_density.{hpp,cpp} module. Both count
creatures/objects/quests per tile to surface sparse zones
(boring) and over-stuffed ones (frame-rate bombs); the project
variant rolls per-zone numbers into a project-wide table with
per-zone averages for content-pacing reviews.

main.cpp shrinks by 201 lines (7,254 to 7,053). Both --json
output modes preserved for balance-audit pipelines.
This commit is contained in:
Kelsi 2026-05-09 07:33:40 -07:00
parent 4ec0c1aea2
commit 30fbd39272
4 changed files with 277 additions and 206 deletions

View file

@ -0,0 +1,22 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the content-density audit handlers — count creatures
// / objects / quests per tile to surface sparse zones (boring)
// and over-stuffed ones (frame-rate bombs). Useful for content
// pacing reviews and balance audits.
// --info-zone-density per-tile bucket within one zone
// --info-project-density per-zone rollup with project-wide averages
//
// Both support an optional trailing `--json` flag for
// machine-readable reports.
//
// Returns true if matched; outRc holds the exit code.
bool handleInfoDensity(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee