mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 18:13:52 +00:00
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:
parent
5ed2008621
commit
e6ace7cce5
9 changed files with 167 additions and 26 deletions
|
|
@ -18,6 +18,8 @@ namespace tools {
|
|||
struct OpenFormatStats {
|
||||
uint32_t pngOk = 0, pngFail = 0;
|
||||
uint32_t jsonDbcOk = 0, jsonDbcFail = 0;
|
||||
uint32_t womOk = 0, womFail = 0;
|
||||
uint32_t wobOk = 0, wobFail = 0;
|
||||
};
|
||||
|
||||
// Convert one BLP file on disk to a PNG side-file.
|
||||
|
|
@ -30,10 +32,19 @@ bool emitPngFromBlp(const std::string& blpPath, const std::string& pngPath);
|
|||
// the output drops into custom_zones/<zone>/data/ directly.
|
||||
bool emitJsonFromDbc(const std::string& dbcPath, const std::string& jsonPath);
|
||||
|
||||
// Convert one M2 file on disk to a WOM side-file. Auto-locates and merges
|
||||
// the matching <base>00.skin if present (WotLK+ models store geometry there).
|
||||
bool emitWomFromM2(const std::string& m2Path, const std::string& womBase);
|
||||
|
||||
// Convert one WMO file on disk to a WOB side-file. Auto-locates and merges
|
||||
// matching <base>_NNN.wmo group files if present.
|
||||
bool emitWobFromWmo(const std::string& wmoPath, const std::string& wobBase);
|
||||
|
||||
// Walk an extracted-asset directory and emit open-format side-files for
|
||||
// every BLP and/or DBC found. Counts are accumulated into stats.
|
||||
// every requested format. Counts accumulated into stats.
|
||||
void emitOpenFormats(const std::string& rootDir,
|
||||
bool emitPng, bool emitJsonDbc,
|
||||
bool emitWom, bool emitWob,
|
||||
OpenFormatStats& stats);
|
||||
|
||||
} // namespace tools
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue