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:
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user