mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 07:43:51 +00:00
Replace MPQ runtime with loose file asset system
Extract assets from MPQ archives into organized loose files indexed by manifest.json, enabling fully parallel reads without StormLib serialization. Add asset_extract and blp_convert tools, PNG texture override support.
This commit is contained in:
parent
5fda1a3157
commit
aa16a687c2
16 changed files with 1427 additions and 101 deletions
43
tools/asset_extract/extractor.hpp
Normal file
43
tools/asset_extract/extractor.hpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
namespace wowee {
|
||||
namespace tools {
|
||||
|
||||
/**
|
||||
* Extraction pipeline: MPQ archives → loose files + manifest
|
||||
*/
|
||||
class Extractor {
|
||||
public:
|
||||
struct Options {
|
||||
std::string mpqDir; // Path to WoW Data directory
|
||||
std::string outputDir; // Output directory for extracted assets
|
||||
int threads = 0; // 0 = auto-detect
|
||||
bool verify = false; // CRC32 verify after extraction
|
||||
bool verbose = false; // Verbose logging
|
||||
};
|
||||
|
||||
struct Stats {
|
||||
std::atomic<uint64_t> filesExtracted{0};
|
||||
std::atomic<uint64_t> bytesExtracted{0};
|
||||
std::atomic<uint64_t> filesSkipped{0};
|
||||
std::atomic<uint64_t> filesFailed{0};
|
||||
};
|
||||
|
||||
/**
|
||||
* Run the extraction pipeline
|
||||
* @return true on success
|
||||
*/
|
||||
static bool run(const Options& opts);
|
||||
|
||||
private:
|
||||
static bool enumerateFiles(const Options& opts,
|
||||
std::vector<std::string>& outFiles);
|
||||
};
|
||||
|
||||
} // namespace tools
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue