2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-05 08:17:25 +00:00

refactor: streamline IW4 asset loading

This commit is contained in:
Jan Laupetin
2025-08-05 01:13:58 +02:00
parent 81a67151b5
commit 6806337f46
49 changed files with 398 additions and 397 deletions

View File

@@ -8,6 +8,7 @@
#include <iostream>
using namespace IW4;
using namespace ::material;
namespace
{
@@ -22,7 +23,7 @@ namespace
AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override
{
const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName));
const auto file = m_search_path.Open(GetFileNameForAssetName(assetName));
if (!file.IsOpen())
return AssetCreationResult::NoAction();
@@ -45,10 +46,10 @@ namespace
};
} // namespace
namespace IW4
namespace IW4::material
{
std::unique_ptr<AssetCreator<AssetMaterial>> CreateMaterialLoader(MemoryManager& memory, ISearchPath& searchPath)
std::unique_ptr<AssetCreator<AssetMaterial>> CreateLoader(MemoryManager& memory, ISearchPath& searchPath)
{
return std::make_unique<MaterialLoader>(memory, searchPath);
}
} // namespace IW4
} // namespace IW4::material