2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-06-29 15:51:57 +00:00

refactor: image and obj data loading

This commit is contained in:
Jan
2024-09-24 12:01:42 +01:00
parent 5fee875495
commit 5cc52c42cd
97 changed files with 1784 additions and 1878 deletions

View File

@ -820,10 +820,10 @@ namespace IW4
m_material->techniqueSet = techset->Asset();
auto* loadingContext = m_manager->GetAssetLoadingContext();
auto* searchPath = loadingContext->m_raw_search_path;
auto& searchPath = loadingContext->m_raw_search_path;
auto* definitionCache = loadingContext->GetZoneAssetLoaderState<techset::TechsetDefinitionCache>();
const auto* techsetDefinition = AssetLoaderTechniqueSet::LoadTechsetDefinition(techsetName, searchPath, definitionCache);
const auto* techsetDefinition = AssetLoaderTechniqueSet::LoadTechsetDefinition(techsetName, &searchPath, definitionCache);
if (techsetDefinition == nullptr)
{
std::ostringstream ss;
@ -1375,7 +1375,7 @@ bool AssetLoaderMaterial::LoadFromGdt(
if (!entry)
return false;
MaterialGdtLoader loader(*entry, memory, manager->GetAssetLoadingContext()->m_raw_search_path, manager);
MaterialGdtLoader loader(*entry, memory, &manager->GetAssetLoadingContext()->m_raw_search_path, manager);
try
{

View File

@ -227,7 +227,7 @@ bool AssetLoaderMenuList::LoadFromRaw(
return true;
}
void AssetLoaderMenuList::FinalizeAssetsForZone(AssetLoadingContext* context) const
void AssetLoaderMenuList::FinalizeAssetsForZone(AssetLoadingContext& context) const
{
context->GetZoneAssetLoaderState<MenuConversionZoneState>()->FinalizeSupportingData();
context.GetZoneAssetLoaderState<MenuConversionZoneState>()->FinalizeSupportingData();
}

View File

@ -14,6 +14,6 @@ namespace IW4
_NODISCARD bool CanLoadFromRaw() const override;
bool
LoadFromRaw(const std::string& assetName, ISearchPath* searchPath, MemoryManager* memory, IAssetLoadingManager* manager, Zone* zone) const override;
void FinalizeAssetsForZone(AssetLoadingContext* context) const override;
void FinalizeAssetsForZone(AssetLoadingContext& context) const override;
};
} // namespace IW4