2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-24 09:16:39 +00:00

chore: refactor pool allocation and add indirect references

This commit is contained in:
Jan
2024-02-06 23:03:40 +01:00
parent 1e5475e5ce
commit ac0d8a83a0
24 changed files with 1001 additions and 1083 deletions

View File

@@ -11,6 +11,8 @@ class Zone;
template<typename T> class AssetPool
{
public:
using type = T;
std::map<std::string, XAssetInfo<T>*> m_asset_lookup;
class Iterator
@@ -46,8 +48,7 @@ public:
virtual ~AssetPool() = default;
virtual XAssetInfo<T>*
AddAsset(std::string name, T* asset, Zone* zone, std::vector<XAssetInfoGeneric*> dependencies, std::vector<scr_string_t> usedScriptStrings) = 0;
virtual XAssetInfo<T>* AddAsset(std::unique_ptr<XAssetInfo<T>> xAssetInfo) = 0;
XAssetInfo<T>* GetAsset(const std::string& name)
{