mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
chore: load asset refs from assets taken from global asset pools
This commit is contained in:
parent
fef815e708
commit
37fad556c6
@ -109,6 +109,7 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
|
|||||||
if (existingAsset)
|
if (existingAsset)
|
||||||
{
|
{
|
||||||
std::vector<XAssetInfoGeneric*> dependencies;
|
std::vector<XAssetInfoGeneric*> dependencies;
|
||||||
|
std::vector<IndirectAssetReference> indirectAssetReferences;
|
||||||
for (const auto* dependency : existingAsset->m_dependencies)
|
for (const auto* dependency : existingAsset->m_dependencies)
|
||||||
{
|
{
|
||||||
auto* newDependency = LoadDependency(dependency->m_type, dependency->m_name);
|
auto* newDependency = LoadDependency(dependency->m_type, dependency->m_name);
|
||||||
@ -118,6 +119,10 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indirectAssetReferences.reserve(existingAsset->m_indirect_asset_references.size());
|
||||||
|
for (const auto& indirectAssetReference : existingAsset->m_indirect_asset_references)
|
||||||
|
indirectAssetReferences.emplace_back(LoadIndirectAssetReference(indirectAssetReference.m_type, indirectAssetReference.m_name));
|
||||||
|
|
||||||
// Make sure any used script string is available in the created zone
|
// Make sure any used script string is available in the created zone
|
||||||
// The replacement of the scr_string_t values will be done upon writing
|
// The replacement of the scr_string_t values will be done upon writing
|
||||||
for (const auto scrString : existingAsset->m_used_script_strings)
|
for (const auto scrString : existingAsset->m_used_script_strings)
|
||||||
@ -128,7 +133,7 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
|
|||||||
existingAsset->m_ptr,
|
existingAsset->m_ptr,
|
||||||
std::move(dependencies),
|
std::move(dependencies),
|
||||||
existingAsset->m_used_script_strings,
|
existingAsset->m_used_script_strings,
|
||||||
existingAsset->m_indirect_asset_references,
|
std::move(indirectAssetReferences),
|
||||||
existingAsset->m_zone));
|
existingAsset->m_zone));
|
||||||
|
|
||||||
auto* lastDependency = m_last_dependency_loaded;
|
auto* lastDependency = m_last_dependency_loaded;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user