2026-02-12 20:32:14 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace tools {
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-04 14:34:23 -03:00
|
|
|
* Maps WoW virtual paths to organized filesystem categories.
|
2026-02-12 20:32:14 -08:00
|
|
|
*
|
|
|
|
|
* Input: WoW virtual path (e.g., "Creature\\Bear\\BearSkin.blp")
|
|
|
|
|
* Output: Category-based relative path (e.g., "creature/bear/BearSkin.blp")
|
|
|
|
|
*/
|
|
|
|
|
class PathMapper {
|
|
|
|
|
public:
|
|
|
|
|
/**
|
2026-04-04 14:34:23 -03:00
|
|
|
* Map a WoW virtual path to a organized filesystem path.
|
2026-02-12 20:32:14 -08:00
|
|
|
* @param wowPath Original WoW virtual path (backslash-separated)
|
2026-04-04 14:34:23 -03:00
|
|
|
* @return Organized relative path (forward-slash separated, fully lowercased)
|
2026-02-12 20:32:14 -08:00
|
|
|
*/
|
|
|
|
|
static std::string mapPath(const std::string& wowPath);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static std::string toLower(const std::string& str);
|
|
|
|
|
static std::string toForwardSlash(const std::string& str);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace tools
|
|
|
|
|
} // namespace wowee
|