2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-01 14:37: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

@@ -27,7 +27,7 @@ namespace
IgnoredAssetLookup ignoredAssetLookup;
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
auto loader = CreateStringTableLoader(memory, searchPath);
auto loader = string_table::CreateLoader(memory, searchPath);
auto result = loader->CreateAsset("mp/cooltable.csv", context);
REQUIRE(result.HasBeenSuccessful());

View File

@@ -289,7 +289,7 @@ namespace
GivenImage("ch_rubble01_col", context, memory);
GivenTechset("mc_l_sm_r0c0n0s0", context, memory);
auto loader = CreateMaterialLoader(memory, searchPath);
auto loader = material::CreateLoader(memory, searchPath);
auto result = loader->CreateAsset("mc/ch_rubble01", context);
REQUIRE(result.HasBeenSuccessful());

View File

@@ -11,7 +11,7 @@
#include <iostream>
#include <string>
using namespace menu;
using namespace ::menu;
using namespace IW4;
using namespace std::literals;
using namespace Catch::Matchers;
@@ -36,7 +36,7 @@ namespace test::game::iw4::menu::parsing::it
m_ignored_asset_lookup(),
m_context(m_zone, &m_creator_collection, &m_ignored_asset_lookup)
{
m_asset_creator = CreateMenuListLoader(m_zone.Memory(), m_search_path);
m_asset_creator = IW4::menu::CreateMenuListLoader(m_zone.Memory(), m_search_path);
}
void AddFile(std::string fileName, std::string data)