ZoneCommon: List zone content in the order it was loaded

This commit is contained in:
Jan
2020-02-19 14:10:50 +01:00
parent a7b59ea3d7
commit f0b66f0a35
11 changed files with 123 additions and 116 deletions

View File

@ -29,9 +29,10 @@ class AssetPoolStatic final : public AssetPool<T>
asset_type_t m_type;
public:
AssetPoolStatic(const size_t capacity, const int priority, asset_type_t type)
AssetPoolStatic(const size_t capacity, const int priority, const asset_type_t type)
{
m_capacity = capacity;
m_type = type;
if (m_capacity > 0)
{

View File

@ -2,18 +2,23 @@
#include "XAssetInfo.h"
#include "Zone/ZoneTypes.h"
#include "Zone/ZoneContent.h"
#include <vector>
#include <string>
class IZoneAssetPools
{
public:
using iterator = std::vector<XAssetInfoGeneric*>::const_iterator;
virtual ~IZoneAssetPools() = default;
virtual XAssetInfoGeneric* AddAsset(asset_type_t type, std::string name, void* asset, std::vector<std::string>& scriptStrings, std::vector<XAssetInfoGeneric*>& dependencies) = 0;
virtual XAssetInfoGeneric* GetAsset(asset_type_t type, std::string name) = 0;
virtual XAssetInfoGeneric* GetAsset(asset_type_t type, std::string name) const = 0;
virtual const std::string& GetAssetTypeName(asset_type_t assetType) const = 0;
virtual void InitPoolStatic(asset_type_t type, size_t capacity) = 0;
virtual void InitPoolDynamic(asset_type_t type) = 0;
virtual ZoneContent GetContent() const = 0;
virtual iterator begin() const = 0;
virtual iterator end() const = 0;
};