feat(editor): add WOW JSON round-trip authoring workflow

Mirrors the WOL JSON pair from the previous batch — same
hand-edit authoring loop for the binary .wow weather format:

  • --export-wow-json <wow-base> [out.json]
        Dumps a .wow to a human-readable JSON sidecar
        (defaults to <base>.wow.json). Each entry includes
        BOTH the raw typeId (0..6) and the human-friendly
        type name ("clear" / "rain" / "snow" / "storm" /
        "sandstorm" / "fog" / "blizzard").

  • --import-wow-json <json-path> [out-base]
        Reads a JSON sidecar and writes back binary .wow.
        Accepts either typeId int OR type-name string
        (typeId wins if both present). Schema mismatches
        fail with a clear message.

Workflow: --gen-weather-* → --export-wow-json → hand-edit
weights / durations / intensities → --import-wow-json →
use in runtime.

Round-trip verified: elwynn.wow → elwynn.wow.json →
elwynn_rt.wow shows byte-identical entries via --info-wow.

Both atmosphere formats now have full JSON authoring support:
  WOL: --export-wol-json / --import-wol-json
  WOW: --export-wow-json / --import-wow-json
This commit is contained in:
Kelsi 2026-05-09 14:25:41 -07:00
parent e7695d6e3b
commit d9761046f9
3 changed files with 133 additions and 0 deletions

View file

@ -803,6 +803,10 @@ void printUsage(const char* argv0) {
std::printf(" Export binary .wol to a human-editable JSON sidecar (defaults to <base>.wol.json)\n");
std::printf(" --import-wol-json <json-path> [out-base]\n");
std::printf(" Import a .wol.json sidecar back into binary .wol (round-trip with --export-wol-json)\n");
std::printf(" --export-wow-json <wow-base> [out.json]\n");
std::printf(" Export binary .wow to a human-editable JSON sidecar (defaults to <base>.wow.json)\n");
std::printf(" --import-wow-json <json-path> [out-base]\n");
std::printf(" Import a .wow.json sidecar back into binary .wow (accepts type-name string OR typeId int)\n");
std::printf(" --info-wow <wow-base> [--json]\n");
std::printf(" Print WOW weather entries (zone + per-state type / intensity / weight / duration) and exit\n");
std::printf(" --validate-wow <wow-base> [--json]\n");