ZoneLoading: Properly link assets as dependencies instead of only saving the name of the dependency

This commit is contained in:
Jan
2020-02-18 13:16:39 +01:00
parent 246d74992c
commit 992e9cea30
16 changed files with 159 additions and 61 deletions

View File

@ -1,13 +1,23 @@
#pragma once
#include <vector>
#include "Zone/XAssetDependency.h"
#include <string>
template<typename T>
class XAssetInfo
class XAssetInfoGeneric
{
public:
int m_type = -1;
std::string m_name;
T* m_asset;
std::vector<std::string> m_script_strings;
std::vector<XAssetDependency> m_dependencies;
std::vector<XAssetInfoGeneric*> m_dependencies;
void* m_ptr;
};
template<typename T>
class XAssetInfo : public XAssetInfoGeneric
{
public:
T* Asset()
{
return static_cast<T*>(m_ptr);
}
};