mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 17:43:51 +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
|
|
@ -81,6 +81,12 @@ public:
|
|||
// Convert an M2 model to WoweeModel (static geometry only, no animation)
|
||||
static WoweeModel fromM2(const std::string& m2Path, class AssetManager* am);
|
||||
|
||||
// Same as fromM2() but takes parsed M2 bytes + optional skin bytes
|
||||
// directly. Lets the asset extractor convert during MPQ→loose-files
|
||||
// without standing up an AssetManager.
|
||||
static WoweeModel fromM2Bytes(const std::vector<uint8_t>& m2Data,
|
||||
const std::vector<uint8_t>& skinData = {});
|
||||
|
||||
// Check if a .wom exists
|
||||
static bool exists(const std::string& basePath);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue