Finalize menu assets after loading all assets

This commit is contained in:
Jan
2021-12-29 00:20:54 +01:00
parent 7188b0946d
commit 5e31be9bac
24 changed files with 92 additions and 18 deletions

View File

@ -68,7 +68,7 @@ void ObjLoading::LoadIWDsInSearchPath(ISearchPath* searchPath)
if (file->is_open())
{
auto iwd = std::make_unique<IWD>(path, std::move(file));
if (iwd->Initialize())
{
IWD::Repository.AddContainer(std::move(iwd), searchPath);
@ -106,3 +106,15 @@ bool ObjLoading::LoadAssetForZone(AssetLoadingContext* context, const asset_type
return false;
}
void ObjLoading::FinalizeAssetsForZone(AssetLoadingContext* context)
{
for (const auto* loader : OBJ_LOADERS)
{
if (loader->SupportsZone(context->m_zone))
{
loader->FinalizeAssetsForZone(context);
return;
}
}
}