mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
refactor: image and obj data loading
This commit is contained in:
@ -78,7 +78,7 @@ std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext&
|
||||
context.m_ignored_assets.m_entries.emplace_back(assetEntry.m_asset_type, assetEntry.m_asset_name, assetEntry.m_is_reference);
|
||||
}
|
||||
|
||||
const auto assetLoadingContext = std::make_unique<AssetLoadingContext>(zone.get(), context.m_asset_search_path, CreateGdtList(context));
|
||||
const auto assetLoadingContext = std::make_unique<AssetLoadingContext>(*zone, *context.m_asset_search_path, CreateGdtList(context));
|
||||
if (!CreateIgnoredAssetMap(context, assetLoadingContext->m_ignored_asset_map))
|
||||
return nullptr;
|
||||
|
||||
@ -91,11 +91,11 @@ std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext&
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!ObjLoading::LoadAssetForZone(assetLoadingContext.get(), foundAssetTypeEntry->second, assetEntry.m_asset_name))
|
||||
if (!ObjLoading::LoadAssetForZone(*assetLoadingContext, foundAssetTypeEntry->second, assetEntry.m_asset_name))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ObjLoading::FinalizeAssetsForZone(assetLoadingContext.get());
|
||||
ObjLoading::FinalizeAssetsForZone(*assetLoadingContext);
|
||||
|
||||
return zone;
|
||||
}
|
||||
|
Reference in New Issue
Block a user