mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Unify asset system: one asset set, always high-res
Remove HDPackManager, expansion overlay manifests, and BLP size-comparison logic. Assets now resolve through a single manifest with a simple override directory (Data/override/) for future HD upgrades.
This commit is contained in:
parent
1bc7b12b20
commit
d7e2b26af7
13 changed files with 31 additions and 658 deletions
|
|
@ -17,8 +17,8 @@ namespace pipeline {
|
|||
* AssetManager - Unified interface for loading WoW assets
|
||||
*
|
||||
* Reads pre-extracted loose files indexed by manifest.json.
|
||||
* Supports layered manifests: overlay manifests (HD packs, mods)
|
||||
* are checked before the base manifest, with higher priority first.
|
||||
* Supports an override directory (Data/override/) checked before the manifest
|
||||
* for HD textures, custom content, or mod overrides.
|
||||
* Use the asset_extract tool to extract MPQ archives first.
|
||||
* All reads are fully parallel (no serialization mutex needed).
|
||||
*/
|
||||
|
|
@ -44,26 +44,6 @@ public:
|
|||
*/
|
||||
bool isInitialized() const { return initialized; }
|
||||
|
||||
/**
|
||||
* Add an overlay manifest (HD packs, mods) checked before the base manifest.
|
||||
* Higher priority overlays are checked first.
|
||||
* @param manifestPath Full path to the overlay's manifest.json
|
||||
* @param priority Priority level (higher = checked first)
|
||||
* @param id Unique identifier for this overlay (e.g. "hd_character")
|
||||
* @return true if overlay loaded successfully
|
||||
*/
|
||||
bool addOverlayManifest(const std::string& manifestPath, int priority, const std::string& id);
|
||||
|
||||
/**
|
||||
* Remove a previously added overlay manifest by id.
|
||||
*/
|
||||
void removeOverlay(const std::string& id);
|
||||
|
||||
/**
|
||||
* Get list of active overlay IDs.
|
||||
*/
|
||||
std::vector<std::string> getOverlayIds() const;
|
||||
|
||||
/**
|
||||
* Load a BLP texture
|
||||
* @param path Virtual path to BLP file (e.g., "Textures\\Minimap\\Background.blp")
|
||||
|
|
@ -140,24 +120,17 @@ private:
|
|||
bool initialized = false;
|
||||
std::string dataPath;
|
||||
std::string expansionDataPath_; // e.g. "Data/expansions/wotlk"
|
||||
std::string overridePath_; // e.g. "Data/override"
|
||||
|
||||
// Base manifest (loaded from dataPath/manifest.json)
|
||||
AssetManifest manifest_;
|
||||
LooseFileReader looseReader_;
|
||||
|
||||
// Overlay manifests (HD packs, mods) - sorted by priority descending
|
||||
struct ManifestLayer {
|
||||
AssetManifest manifest;
|
||||
int priority;
|
||||
std::string id;
|
||||
};
|
||||
std::vector<ManifestLayer> overlayLayers_; // Sorted by priority desc
|
||||
|
||||
/**
|
||||
* Resolve filesystem path checking overlays first, then base manifest.
|
||||
* Returns empty string if not found in any layer.
|
||||
* Resolve filesystem path: check override dir first, then base manifest.
|
||||
* Returns empty string if not found.
|
||||
*/
|
||||
std::string resolveLayeredPath(const std::string& normalizedPath) const;
|
||||
std::string resolveFile(const std::string& normalizedPath) const;
|
||||
|
||||
mutable std::mutex cacheMutex;
|
||||
std::map<std::string, std::shared_ptr<DBCFile>> dbcCache;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue