mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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.
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
namespace wowee {
|
|
namespace tools {
|
|
|
|
/**
|
|
* Generates manifest.json from extracted file metadata.
|
|
*/
|
|
class ManifestWriter {
|
|
public:
|
|
struct FileEntry {
|
|
std::string wowPath; // Normalized WoW virtual path (lowercase, backslash)
|
|
std::string filesystemPath; // Relative path from basePath (forward slashes, original case)
|
|
uint64_t size; // File size in bytes
|
|
uint32_t crc32; // CRC32 checksum
|
|
};
|
|
|
|
/**
|
|
* Write manifest.json
|
|
* @param outputPath Full path to manifest.json
|
|
* @param basePath Value for basePath field (e.g., "assets")
|
|
* @param entries All extracted file entries
|
|
* @return true on success
|
|
*/
|
|
static bool write(const std::string& outputPath,
|
|
const std::string& basePath,
|
|
const std::vector<FileEntry>& entries);
|
|
|
|
/**
|
|
* Compute CRC32 of file data
|
|
*/
|
|
static uint32_t computeCRC32(const uint8_t* data, size_t size);
|
|
};
|
|
|
|
} // namespace tools
|
|
} // namespace wowee
|