mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-01 14:37:25 +00:00
refactor: do not nest asset namespaces in game namespaces
* Duplicated namespace names are kind of annoying
This commit is contained in:
@@ -26,13 +26,13 @@ namespace
|
||||
m_creators(m_zone),
|
||||
m_ignored_assets(),
|
||||
m_context(m_zone, &m_creators, &m_ignored_assets),
|
||||
m_kvp_creator(m_zone_states.GetZoneAssetCreationState<::key_value_pairs::Creator>())
|
||||
m_kvp_creator(m_zone_states.GetZoneAssetCreationState<key_value_pairs::Creator>())
|
||||
{
|
||||
}
|
||||
|
||||
std::unique_ptr<IAssetCreator> CreateSut()
|
||||
{
|
||||
return T6::key_value_pairs::CreateCompiler(m_memory, m_zone, m_zone_definition, m_zone_states);
|
||||
return key_value_pairs::CreateCompilerT6(m_memory, m_zone, m_zone_definition, m_zone_states);
|
||||
}
|
||||
|
||||
TestMemoryManager m_memory;
|
||||
|
@@ -286,7 +286,7 @@ namespace
|
||||
GivenImage("ch_plasterwall_long_col", context, memory);
|
||||
GivenTechset("wc_l_sm_r0c0n0s0", context, memory);
|
||||
|
||||
auto loader = material::CreateLoader(memory, searchPath);
|
||||
auto loader = material::CreateLoaderIW3(memory, searchPath);
|
||||
auto result = loader->CreateAsset("wc/ch_plasterwall_long", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -27,7 +27,7 @@ namespace
|
||||
IgnoredAssetLookup ignoredAssetLookup;
|
||||
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
|
||||
|
||||
auto loader = string_table::CreateLoader(memory, searchPath);
|
||||
auto loader = string_table::CreateLoaderIW3(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mp/cooltable.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -27,7 +27,7 @@ namespace
|
||||
IgnoredAssetLookup ignoredAssetLookup;
|
||||
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
|
||||
|
||||
auto loader = string_table::CreateLoader(memory, searchPath);
|
||||
auto loader = string_table::CreateLoaderIW4(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mp/cooltable.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -289,7 +289,7 @@ namespace
|
||||
GivenImage("ch_rubble01_col", context, memory);
|
||||
GivenTechset("mc_l_sm_r0c0n0s0", context, memory);
|
||||
|
||||
auto loader = material::CreateLoader(memory, searchPath);
|
||||
auto loader = material::CreateLoaderIW4(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mc/ch_rubble01", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace ::menu;
|
||||
using namespace IW4;
|
||||
using namespace std::literals;
|
||||
using namespace Catch::Matchers;
|
||||
@@ -36,7 +35,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 = IW4::menu::CreateMenuListLoader(m_zone.Memory(), m_search_path);
|
||||
m_asset_creator = ::menu::CreateMenuListLoaderIW4(m_zone.Memory(), m_search_path);
|
||||
}
|
||||
|
||||
void AddFile(std::string fileName, std::string data)
|
||||
|
@@ -26,7 +26,7 @@ namespace
|
||||
IgnoredAssetLookup ignoredAssetLookup;
|
||||
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
|
||||
|
||||
auto loader = string_table::CreateLoader(memory, searchPath);
|
||||
auto loader = string_table::CreateLoaderIW5(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mp/cooltable.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -313,7 +313,7 @@ namespace
|
||||
GivenImage("me_metal_rusty02_col", context, memory);
|
||||
GivenTechset("wc_l_sm_r0c0n0s0", context, memory);
|
||||
|
||||
auto loader = material::CreateLoader(memory, searchPath);
|
||||
auto loader = material::CreateLoaderIW5(memory, searchPath);
|
||||
auto result = loader->CreateAsset("wc/me_metal_rust_02", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -26,7 +26,7 @@ namespace
|
||||
IgnoredAssetLookup ignoredAssetLookup;
|
||||
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
|
||||
|
||||
auto loader = string_table::CreateLoader(memory, searchPath);
|
||||
auto loader = string_table::CreateLoaderT5(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mp/cooltable.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -370,7 +370,7 @@ namespace
|
||||
GivenImage("~-gjun_art_brick_foundation_c", context, memory);
|
||||
GivenTechset("mc_l_sm_r0c0n0s0", context, memory);
|
||||
|
||||
auto loader = material::CreateLoader(memory, searchPath);
|
||||
auto loader = material::CreateLoaderT5(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mc/jun_art_brick_foundation", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -26,7 +26,7 @@ namespace
|
||||
IgnoredAssetLookup ignoredAssetLookup;
|
||||
AssetCreationContext context(zone, &creatorCollection, &ignoredAssetLookup);
|
||||
|
||||
auto loader = string_table::CreateLoader(memory, searchPath);
|
||||
auto loader = string_table::CreateLoaderT6(memory, searchPath);
|
||||
auto result = loader->CreateAsset("mp/cooltable.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -90,7 +90,7 @@ namespace
|
||||
GivenMaterial("ui_button_xenon_lstick_anim_d", context, memory);
|
||||
GivenMaterial("xenonbutton_ls", context, memory);
|
||||
|
||||
auto loader = font_icon::CreateJsonLoader(memory, searchPath);
|
||||
auto loader = font_icon::CreateJsonLoaderT6(memory, searchPath);
|
||||
auto result = loader->CreateAsset("fonticon/test.csv", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -253,7 +253,7 @@ namespace
|
||||
GivenImage("~-gmetal_ac_duct_c", context, memory);
|
||||
GivenTechset("wpc_lit_sm_r0c0n0s0_1zzj1138", context, memory);
|
||||
|
||||
auto loader = material::CreateLoader(memory, searchPath);
|
||||
auto loader = material::CreateLoaderT6(memory, searchPath);
|
||||
auto result = loader->CreateAsset("wpc/metal_ac_duct", context);
|
||||
REQUIRE(result.HasBeenSuccessful());
|
||||
|
||||
|
@@ -562,7 +562,7 @@ namespace
|
||||
|
||||
GivenMaterial("wc/ch_plasterwall_long", materialPool, memory);
|
||||
|
||||
material::JsonDumper dumper;
|
||||
material::JsonDumperIW3 dumper;
|
||||
dumper.DumpPool(context, &materialPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("materials/wc/ch_plasterwall_long.json");
|
@@ -543,7 +543,7 @@ namespace
|
||||
|
||||
GivenMaterial("mc/ch_rubble01", materialPool, memory);
|
||||
|
||||
material::JsonDumper dumper;
|
||||
material::JsonDumperIW4 dumper;
|
||||
dumper.DumpPool(context, &materialPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("materials/mc/ch_rubble01.json");
|
@@ -596,7 +596,7 @@ namespace
|
||||
|
||||
GivenMaterial("wc/me_metal_rust_02", materialPool, memory);
|
||||
|
||||
material::JsonDumper dumper;
|
||||
material::JsonDumperIW5 dumper;
|
||||
dumper.DumpPool(context, &materialPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("materials/wc/me_metal_rust_02.json");
|
@@ -625,7 +625,7 @@ namespace
|
||||
|
||||
GivenMaterial("mc/ch_rubble01", materialPool, memory);
|
||||
|
||||
material::JsonDumper dumper;
|
||||
material::JsonDumperT5 dumper;
|
||||
dumper.DumpPool(context, &materialPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("materials/mc/ch_rubble01.json");
|
@@ -151,7 +151,7 @@ namespace
|
||||
AssetPoolDynamic<FontIcon> fontIconPool(0);
|
||||
GivenFontIcon("fonticon/test.csv", fontIconPool, memory);
|
||||
|
||||
font_icon::JsonDumper dumper;
|
||||
font_icon::JsonDumperT6 dumper;
|
||||
dumper.DumpPool(context, &fontIconPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("fonticon/test.json");
|
||||
|
@@ -472,7 +472,7 @@ namespace
|
||||
AssetPoolDynamic<Material> materialPool(0);
|
||||
GivenMaterial("wpc/metal_ac_duct", materialPool, memory);
|
||||
|
||||
material::JsonDumper dumper;
|
||||
material::JsonDumperT6 dumper;
|
||||
dumper.DumpPool(context, &materialPool);
|
||||
|
||||
const auto* file = mockOutput.GetMockedFile("materials/wpc/metal_ac_duct.json");
|
||||
|
Reference in New Issue
Block a user