refactor(editor): extract --info-tilemap into cli_tilemap.cpp

Moves the project-wide ADT-grid visualization handler
(--info-tilemap) out of main.cpp into a new
cli_tilemap.{hpp,cpp} module. Renders the WoW 64x64 tile
grid showing which tiles are claimed by which zones, with
collision detection (multiple zones claiming the same tile)
and per-zone glyph legend. Empty rows are skipped so the
output stays bounded for projects in one map corner.

main.cpp shrinks by 114 lines (3,433 to 3,319). --json
output mode preserved for CI pipelines.
This commit is contained in:
Kelsi 2026-05-09 09:14:01 -07:00
parent 822efff70f
commit 4db41b5974
4 changed files with 179 additions and 119 deletions

View file

@ -0,0 +1,19 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the --info-tilemap project-wide tile-grid handler.
// Renders the WoW 64x64 ADT grid showing which tiles are
// claimed by which zones, with collision detection (multiple
// zones claiming the same tile). Useful for spotting tile-
// coord overlaps before two zones try to ship conflicting
// content. Supports --json for machine-readable reports.
//
// Returns true if matched; outRc holds the exit code.
bool handleTilemap(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee