refactor(editor): extract WCP pack handlers into cli_pack.cpp

Moves the six WoWee Content Pack (.wcp) handlers out of
main.cpp:
  --list-wcp           --info-wcp
  --info-pack-budget   --info-pack-tree
  --pack-wcp           --unpack-wcp

All six defer to wowee::editor::ContentPacker for actual pack
I/O; the handlers just parse args and format output, so the
extraction has no behavioral impact on the pack format itself.

main.cpp drops 17,766 → 17,505 lines (-261). Behavior verified
by re-running --info-wcp on a missing file (same error message).
This commit is contained in:
Kelsi 2026-05-09 03:12:09 -07:00
parent dab7705c0f
commit f283ab2ce7
4 changed files with 352 additions and 265 deletions

20
tools/editor/cli_pack.hpp Normal file
View file

@ -0,0 +1,20 @@
#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the WoWee Content Pack (.wcp) handlers:
// --list-wcp --info-wcp
// --info-pack-budget --info-pack-tree
// --pack-wcp --unpack-wcp
//
// All defer to wowee::editor::ContentPacker for actual pack
// I/O; the handlers just parse args and format output.
//
// Returns true if matched; outRc holds the exit code.
bool handlePack(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee