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:
Kelsi 2026-02-15 04:18:34 -08:00
parent 1bc7b12b20
commit d7e2b26af7
13 changed files with 31 additions and 658 deletions

View file

@ -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;