mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 08:23:50 +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
32
tools/asset_extract/path_mapper.hpp
Normal file
32
tools/asset_extract/path_mapper.hpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace wowee {
|
||||
namespace tools {
|
||||
|
||||
/**
|
||||
* Maps WoW virtual paths to reorganized filesystem categories.
|
||||
*
|
||||
* Input: WoW virtual path (e.g., "Creature\\Bear\\BearSkin.blp")
|
||||
* Output: Category-based relative path (e.g., "creature/bear/BearSkin.blp")
|
||||
*/
|
||||
class PathMapper {
|
||||
public:
|
||||
/**
|
||||
* Map a WoW virtual path to a reorganized filesystem path.
|
||||
* @param wowPath Original WoW virtual path (backslash-separated)
|
||||
* @return Reorganized relative path (forward-slash separated, original casing preserved)
|
||||
*/
|
||||
static std::string mapPath(const std::string& wowPath);
|
||||
|
||||
private:
|
||||
// Helpers for prefix matching (case-insensitive)
|
||||
static bool startsWithCI(const std::string& str, const std::string& prefix);
|
||||
static std::string toLower(const std::string& str);
|
||||
static std::string toForwardSlash(const std::string& str);
|
||||
static std::string extractAfterPrefix(const std::string& path, size_t prefixLen);
|
||||
};
|
||||
|
||||
} // namespace tools
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue