refactor(editor): extract 8 spawn/snap handlers into cli_spawn_audit.cpp

Moves the NPC spawn / object placer audit + ground-snap
handlers out of main.cpp:
  --snap-zone-to-ground       --snap-project-to-ground
  --audit-zone-spawns         --audit-project-spawns
  --list-zone-spawns          --list-project-spawns
  --diff-zone-spawns          --info-spawn

All operate on creatures.json + objects.json sidecars and
the WHM terrain heightfield via WoweeTerrainLoader.

main.cpp drops 14,628 → 13,887 lines (-741). Behavior verified
by re-running --audit-zone-spawns on a test zone (PASSED with
0 issues, same as before).
This commit is contained in:
Kelsi 2026-05-09 05:05:22 -07:00
parent 47e78d4e08
commit 83c7fd9bee
4 changed files with 849 additions and 745 deletions

View file

@ -0,0 +1,22 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the NPC spawn / object placer audit + ground-snap
// handlers (8 in this group):
// --snap-zone-to-ground --snap-project-to-ground
// --audit-zone-spawns --audit-project-spawns
// --list-zone-spawns --list-project-spawns
// --diff-zone-spawns --info-spawn
//
// All operate on creatures.json + objects.json sidecars and
// the WHM terrain heightfield via WoweeTerrainLoader.
//
// Returns true if matched; outRc holds the exit code.
bool handleSpawnAudit(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee