mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-17 02:07:58 -05:00
Save scriptstrings per zone and not per asset since that solves all problems with multiple assets of the same zone referencing the same struct in memory that has scriptstring indices
This commit is contained in:
27
src/ZoneCommon/Pool/ZoneAssetPools.cpp
Normal file
27
src/ZoneCommon/Pool/ZoneAssetPools.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include "ZoneAssetPools.h"
|
||||
|
||||
ZoneAssetPools::ZoneAssetPools(Zone* zone)
|
||||
: m_zone(zone)
|
||||
{
|
||||
}
|
||||
|
||||
XAssetInfoGeneric* ZoneAssetPools::AddAsset(const asset_type_t type, std::string name, void* asset, std::vector<XAssetInfoGeneric*>& dependencies)
|
||||
{
|
||||
auto* assetInfo = AddAssetToPool(type, std::move(name), asset, dependencies);
|
||||
if(assetInfo)
|
||||
{
|
||||
m_assets_in_order.push_back(assetInfo);
|
||||
}
|
||||
|
||||
return assetInfo;
|
||||
}
|
||||
|
||||
ZoneAssetPools::iterator ZoneAssetPools::begin() const
|
||||
{
|
||||
return m_assets_in_order.begin();
|
||||
}
|
||||
|
||||
ZoneAssetPools::iterator ZoneAssetPools::end() const
|
||||
{
|
||||
return m_assets_in_order.end();
|
||||
}
|
Reference in New Issue
Block a user