feat(extract): emit WOM and WOB side-files (M2/WMO → open formats)

Extends asset_extract with two more open-format emitters:
  --emit-wom  foo.m2 (+ foo00.skin) → foo.wom
  --emit-wob  foo.wmo (+ foo_NNN.wmo groups) → foo.wob
  --emit-open now also turns these on

Originals are preserved so private servers still load .m2/.wmo
through the manifest path; the wowee runtime/editor pick up the
.wom/.wob next to them via the existing open-format search rules.

Implementation:
- New WoweeModelLoader::fromM2Bytes(m2Data, skinData) shares the
  conversion body with fromM2(path, am) via a static helper
  (convertM2ToWom). Lets the extractor convert without standing
  up an AssetManager.
- fromM2(path, am) moved to a separate translation unit
  (wowee_model_fromm2.cpp) so asset_extract doesn't have to
  link the AssetManager dependency.
- WoweeBuildingLoader::fromWMO already takes a WMOModel directly,
  so emitWobFromWmo just needs to read root + group files and
  call save().
- Group sub-files (<base>_NNN.wmo) are skipped during the walk
  since they're merged into the root WMO.
This commit is contained in:
Kelsi 2026-05-06 10:32:17 -07:00
parent 5ed2008621
commit e6ace7cce5
9 changed files with 167 additions and 26 deletions

View file

@ -26,7 +26,9 @@ static void printUsage(const char* prog) {
<< " --dbc-csv-out <dir> Write CSV DBCs into <dir> (overrides default output path)\n"
<< " --emit-png Emit foo.png next to every extracted foo.blp\n"
<< " --emit-json-dbc Emit foo.json next to every extracted foo.dbc\n"
<< " --emit-open Shortcut: enable every open-format emitter (png+json)\n"
<< " --emit-wom Emit foo.wom next to every extracted foo.m2 (+skin)\n"
<< " --emit-wob Emit foo.wob next to every extracted foo.wmo (+groups)\n"
<< " --emit-open Shortcut: enable every open-format emitter (png+json+wom+wob)\n"
<< " --verify CRC32 verify all extracted files\n"
<< " --threads <N> Number of extraction threads (default: auto)\n"
<< " --verbose Verbose output\n"
@ -59,10 +61,16 @@ int main(int argc, char** argv) {
opts.emitPng = true;
} else if (std::strcmp(argv[i], "--emit-json-dbc") == 0) {
opts.emitJsonDbc = true;
} else if (std::strcmp(argv[i], "--emit-wom") == 0) {
opts.emitWom = true;
} else if (std::strcmp(argv[i], "--emit-wob") == 0) {
opts.emitWob = true;
} else if (std::strcmp(argv[i], "--emit-open") == 0) {
// Meta-flag: turn on every available open-format emitter.
opts.emitPng = true;
opts.emitJsonDbc = true;
opts.emitWom = true;
opts.emitWob = true;
} else if (std::strcmp(argv[i], "--dbc-csv-out") == 0 && i + 1 < argc) {
opts.dbcCsvOutputDir = argv[++i];
} else if (std::strcmp(argv[i], "--listfile") == 0 && i + 1 < argc) {