mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 18:13:52 +00:00
feat(extract): emit open-format side-files (BLP→PNG, DBC→JSON)
The asset_extract tool now optionally writes wowee open-format
copies next to each extracted proprietary file:
--emit-png foo.blp → foo.png
--emit-json-dbc foo.dbc → foo.json
--emit-open shortcut for both
Originals are left untouched, so private servers (AzerothCore,
TrinityCore) that load from the manifest's .blp/.dbc paths
continue to work unchanged. The wowee runtime / editor can now
consume the open formats directly without an extra conversion pass.
Implementation:
- New tools/asset_extract/open_format_emitter.{hpp,cpp} encapsulates
the post-extract walk + per-file conversion.
- BLP→PNG uses BLPLoader::load + stbi_write_png with the same
dimension/buffer-size sanity guards the editor's texture exporter
applies.
- DBC→JSON mirrors the editor's DBCExporter::exportAsJson schema
(string/float/uint heuristic) so the runtime DBC overlay loader
can consume the output drop-in.
This commit is contained in:
parent
9e801f93b6
commit
5ed2008621
6 changed files with 212 additions and 0 deletions
|
|
@ -24,6 +24,9 @@ static void printUsage(const char* prog) {
|
|||
<< " --reference-manifest <path>\n"
|
||||
<< " Only extract files NOT in this manifest (delta extraction)\n"
|
||||
<< " --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"
|
||||
<< " --verify CRC32 verify all extracted files\n"
|
||||
<< " --threads <N> Number of extraction threads (default: auto)\n"
|
||||
<< " --verbose Verbose output\n"
|
||||
|
|
@ -52,6 +55,14 @@ int main(int argc, char** argv) {
|
|||
opts.skipDbcExtraction = true;
|
||||
} else if (std::strcmp(argv[i], "--dbc-csv") == 0) {
|
||||
opts.generateDbcCsv = true;
|
||||
} else if (std::strcmp(argv[i], "--emit-png") == 0) {
|
||||
opts.emitPng = true;
|
||||
} else if (std::strcmp(argv[i], "--emit-json-dbc") == 0) {
|
||||
opts.emitJsonDbc = 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;
|
||||
} 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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue