diff --git a/src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.cpp b/src/ObjCommon/FontIcon/FontIconCommon.cpp similarity index 85% rename from src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.cpp rename to src/ObjCommon/FontIcon/FontIconCommon.cpp index 5ae57d48..af9cbfb1 100644 --- a/src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.cpp +++ b/src/ObjCommon/FontIcon/FontIconCommon.cpp @@ -1,11 +1,11 @@ -#include "FontIconCommonT6.h" +#include "FontIconCommon.h" #include "Utils/StringUtils.h" #include namespace fs = std::filesystem; -namespace T6::font_icon +namespace font_icon { std::string GetJsonFileNameForAssetName(const std::string& assetName) { @@ -20,4 +20,4 @@ namespace T6::font_icon return assetName; } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.h b/src/ObjCommon/FontIcon/FontIconCommon.h similarity index 82% rename from src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.h rename to src/ObjCommon/FontIcon/FontIconCommon.h index bcce4518..e4c887bd 100644 --- a/src/ObjCommon/Game/T6/FontIcon/FontIconCommonT6.h +++ b/src/ObjCommon/FontIcon/FontIconCommon.h @@ -2,7 +2,7 @@ #include -namespace T6::font_icon +namespace font_icon { std::string GetJsonFileNameForAssetName(const std::string& assetName); } diff --git a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp index 0fc61324..82d6ceb5 100644 --- a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp +++ b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp @@ -48,7 +48,7 @@ namespace m_registration(registration), m_state_map_cache(context.GetZoneAssetCreationState<::techset::TechniqueStateMapCache>()), m_base_state_bits{}, - m_techset_creator(IW4::techset::CreateLoader(memory, searchPath)) + m_techset_creator(techset::CreateLoaderIW4(memory, searchPath)) { } @@ -1325,7 +1325,7 @@ namespace std::vector m_textures; std::vector m_constants; - std::unique_ptr<::IW4::techset::ICreator> m_techset_creator; + std::unique_ptr m_techset_creator; }; class MaterialLoader final : public AssetCreator @@ -1375,10 +1375,10 @@ namespace }; } // namespace -namespace IW4::material +namespace material { - std::unique_ptr> CreateCompiler(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt) + std::unique_ptr> CreateCompilerIW4(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt) { return std::make_unique(memory, searchPath, gdt); } -} // namespace IW4::material +} // namespace material diff --git a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h index 3258e1b5..7d3e216a 100644 --- a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h +++ b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.h @@ -6,7 +6,7 @@ #include "SearchPath/ISearchPath.h" #include "Utils/MemoryManager.h" -namespace IW4::material +namespace material { - std::unique_ptr> CreateCompiler(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt); -} // namespace IW4::material + std::unique_ptr> CreateCompilerIW4(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt); +} // namespace material diff --git a/src/ObjCompiling/Game/IW4/ObjCompilerIW4.cpp b/src/ObjCompiling/Game/IW4/ObjCompilerIW4.cpp index 8ad32e9d..3930a746 100644 --- a/src/ObjCompiling/Game/IW4/ObjCompilerIW4.cpp +++ b/src/ObjCompiling/Game/IW4/ObjCompilerIW4.cpp @@ -17,10 +17,10 @@ namespace auto& memory = zone.Memory(); #ifdef EXPERIMENTAL_MATERIAL_COMPILATION - collection.AddAssetCreator(material::CreateCompiler(memory, searchPath, gdt)); - collection.AddAssetCreator(IW4::techset::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(material::CreateCompilerIW4(memory, searchPath, gdt)); + collection.AddAssetCreator(techset::CreateLoaderIW4(memory, searchPath)); #endif - collection.AddAssetCreator(vertex_decl::CreateLoader(memory)); + collection.AddAssetCreator(vertex_decl::CreateLoaderIW4(memory)); } void ConfigurePostProcessors(AssetCreatorCollection& collection, diff --git a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp index dd336d7e..50fe5b4e 100644 --- a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp +++ b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp @@ -203,7 +203,7 @@ namespace ISearchPath& searchPath, MemoryManager& memory, AssetCreationContext& context, - IW4::techset::ICreator* techsetCreator) + techset::ICreatorIW4* techsetCreator) : m_technique_name(techniqueName), m_search_path(searchPath), m_memory(memory), @@ -1026,13 +1026,13 @@ namespace TechniqueZoneLoadingState& m_zone_state; TechniqueStateMapCache& m_state_map_cache; ShaderInfoFromFileSystemCacheState& m_shader_info_cache; - IW4::techset::ICreator* m_techset_creator; + techset::ICreatorIW4* m_techset_creator; }; class TechniqueLoader { public: - TechniqueLoader(ISearchPath& searchPath, MemoryManager& memory, AssetCreationContext& context, IW4::techset::ICreator* techsetCreator) + TechniqueLoader(ISearchPath& searchPath, MemoryManager& memory, AssetCreationContext& context, techset::ICreatorIW4* techsetCreator) : m_search_path(searchPath), m_memory(memory), m_context(context), @@ -1260,10 +1260,10 @@ namespace MemoryManager& m_memory; AssetCreationContext& m_context; TechniqueZoneLoadingState& m_zone_state; - IW4::techset::ICreator* m_techset_creator; + techset::ICreatorIW4* m_techset_creator; }; - class TechsetLoader final : public IW4::techset::ICreator + class TechsetLoader final : public techset::ICreatorIW4 { public: TechsetLoader(MemoryManager& memory, ISearchPath& searchPath) @@ -1369,10 +1369,10 @@ namespace }; } // namespace -namespace IW4::techset +namespace techset { - std::unique_ptr CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::techset +} // namespace techset diff --git a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.h b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.h index 0187b329..09fd1375 100644 --- a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.h +++ b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.h @@ -10,17 +10,17 @@ #include #include -namespace IW4::techset +namespace techset { - class ICreator : public AssetCreator + class ICreatorIW4 : public AssetCreator { public: - ICreator() = default; - virtual ~ICreator() = default; + ICreatorIW4() = default; + virtual ~ICreatorIW4() = default; - virtual ::techset::TechsetDefinition* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) = 0; + virtual TechsetDefinition* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) = 0; virtual const state_map::StateMapDefinition* LoadStateMapDefinition(const std::string& stateMapName, AssetCreationContext& context) = 0; }; - std::unique_ptr CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::techset + std::unique_ptr CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace techset diff --git a/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.cpp b/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.cpp index feaa64bf..9ce59278 100644 --- a/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.cpp +++ b/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.cpp @@ -92,10 +92,10 @@ namespace }; } // namespace -namespace IW4::vertex_decl +namespace vertex_decl { - std::unique_ptr> CreateLoader(MemoryManager& memory) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory) { return std::make_unique(memory); } -} // namespace IW4::vertex_decl +} // namespace vertex_decl diff --git a/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.h b/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.h index 3153e5a0..4713a652 100644 --- a/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.h +++ b/src/ObjCompiling/Game/IW4/Techset/CompilerVertexDeclIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::vertex_decl +namespace vertex_decl { - std::unique_ptr> CreateLoader(MemoryManager& memory); -} // namespace IW4::vertex_decl + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory); +} // namespace vertex_decl diff --git a/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.cpp b/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.cpp index 92d3cd0d..92be6c06 100644 --- a/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.cpp +++ b/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.cpp @@ -71,11 +71,11 @@ namespace }; } // namespace -namespace T6::key_value_pairs +namespace key_value_pairs { std::unique_ptr - CreateCompiler(MemoryManager& memory, const Zone& zone, const ZoneDefinition& zoneDefinition, ZoneAssetCreationStateContainer& zoneStates) + CreateCompilerT6(MemoryManager& memory, const Zone& zone, const ZoneDefinition& zoneDefinition, ZoneAssetCreationStateContainer& zoneStates) { return std::make_unique(memory, zone, zoneDefinition, zoneStates); } -} // namespace T6::key_value_pairs +} // namespace key_value_pairs diff --git a/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.h b/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.h index a3dadb8c..f5ce8b37 100644 --- a/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.h +++ b/src/ObjCompiling/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6.h @@ -9,8 +9,8 @@ #include -namespace T6::key_value_pairs +namespace key_value_pairs { std::unique_ptr - CreateCompiler(MemoryManager& memory, const Zone& zone, const ZoneDefinition& zoneDefinition, ZoneAssetCreationStateContainer& zoneStates); -} // namespace T6::key_value_pairs + CreateCompilerT6(MemoryManager& memory, const Zone& zone, const ZoneDefinition& zoneDefinition, ZoneAssetCreationStateContainer& zoneStates); +} // namespace key_value_pairs diff --git a/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp b/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp index d25f2dee..8228234d 100644 --- a/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp +++ b/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp @@ -19,7 +19,7 @@ namespace { auto& memory = zone.Memory(); - collection.AddAssetCreator(T6::key_value_pairs::CreateCompiler(memory, zone, zoneDefinition.m_zone_definition, zoneStates)); + collection.AddAssetCreator(key_value_pairs::CreateCompilerT6(memory, zone, zoneDefinition.m_zone_definition, zoneStates)); } void ConfigurePostProcessors(AssetCreatorCollection& collection, diff --git a/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.cpp b/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.cpp index 8518ffaf..b7f03a20 100644 --- a/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.cpp +++ b/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.cpp @@ -122,10 +122,10 @@ namespace }; } // namespace -namespace IW3::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW3::image +} // namespace image diff --git a/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.h b/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.h index 37bc8cb4..b8d60124 100644 --- a/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.h +++ b/src/ObjLoading/Game/IW3/Image/AssetLoaderImageIW3.h @@ -7,7 +7,7 @@ #include -namespace IW3::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW3::image + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath); +} // namespace image diff --git a/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.cpp b/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.cpp index e56a904c..0afa5b6c 100644 --- a/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.cpp +++ b/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.cpp @@ -36,10 +36,10 @@ namespace }; } // namespace -namespace IW3::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW3::localize +} // namespace localize diff --git a/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.h b/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.h index 447a6a90..7d1c30ed 100644 --- a/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.h +++ b/src/ObjLoading/Game/IW3/Localize/AssetLoaderLocalizeIW3.h @@ -8,7 +8,7 @@ #include -namespace IW3::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW3::localize + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace localize diff --git a/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.cpp b/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.cpp index 769e6b71..5172498a 100644 --- a/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.cpp +++ b/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.cpp @@ -8,7 +8,6 @@ #include using namespace IW3; -using namespace ::material; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -46,10 +45,10 @@ namespace }; } // namespace -namespace IW3::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW3::material +} // namespace material diff --git a/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.h b/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.h index 2bfa9db1..fd51d2c4 100644 --- a/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.h +++ b/src/ObjLoading/Game/IW3/Material/LoaderMaterialIW3.h @@ -6,7 +6,7 @@ #include "SearchPath/ISearchPath.h" #include "Utils/MemoryManager.h" -namespace IW3::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW3::material + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath); +} // namespace material diff --git a/src/ObjLoading/Game/IW3/ObjLoaderIW3.cpp b/src/ObjLoading/Game/IW3/ObjLoaderIW3.cpp index 12583d1a..fb2c1627 100644 --- a/src/ObjLoading/Game/IW3/ObjLoaderIW3.cpp +++ b/src/ObjLoading/Game/IW3/ObjLoaderIW3.cpp @@ -91,10 +91,10 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(xmodel::CreateXModelLoader(memory, searchPath, zone)); - collection.AddAssetCreator(material::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(xmodel::CreateLoaderIW3(memory, searchPath, zone)); + collection.AddAssetCreator(material::CreateLoaderIW3(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(image::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(image::CreateLoaderIW3(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); @@ -108,13 +108,13 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(localize::CreateLoader(memory, searchPath, zone)); + collection.AddAssetCreator(localize::CreateLoaderIW3(memory, searchPath, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(raw_file::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(string_table::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(raw_file::CreateLoaderIW3(memory, searchPath)); + collection.AddAssetCreator(string_table::CreateLoaderIW3(memory, searchPath)); } } // namespace diff --git a/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.cpp b/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.cpp index 6229ac79..ffeaef61 100644 --- a/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.cpp +++ b/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.cpp @@ -44,10 +44,10 @@ namespace }; } // namespace -namespace IW3::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW3::raw_file +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.h b/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.h index d3c74f6d..914c0529 100644 --- a/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.h +++ b/src/ObjLoading/Game/IW3/RawFile/AssetLoaderRawFileIW3.h @@ -7,7 +7,7 @@ #include -namespace IW3::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW3::raw_file + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath); +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.cpp b/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.cpp index bcb640ec..e8146808 100644 --- a/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.cpp +++ b/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.cpp @@ -6,7 +6,6 @@ #include using namespace IW3; -using namespace ::string_table; namespace { @@ -25,7 +24,7 @@ namespace if (!file.IsOpen()) return AssetCreationResult::NoAction(); - StringTableLoaderV1 loader; + string_table::StringTableLoaderV1 loader; auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream); if (!stringTable) return AssetCreationResult::Failure(); @@ -39,10 +38,10 @@ namespace }; } // namespace -namespace IW3::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW3::string_table +} // namespace string_table diff --git a/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.h b/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.h index 497617e3..5b5a1ded 100644 --- a/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.h +++ b/src/ObjLoading/Game/IW3/StringTable/AssetLoaderStringTableIW3.h @@ -7,7 +7,7 @@ #include -namespace IW3::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW3::string_table + std::unique_ptr> CreateLoaderIW3(MemoryManager& memory, ISearchPath& searchPath); +} // namespace string_table diff --git a/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.cpp b/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.cpp index 3a8b7b12..b0acadf4 100644 --- a/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.cpp +++ b/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.cpp @@ -11,7 +11,6 @@ using namespace nlohmann; using namespace IW4; -using namespace ::leaderboard; namespace { @@ -116,7 +115,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetJsonFileNameForAsset(assetName)); + const auto file = m_search_path.Open(leaderboard::GetJsonFileNameForAsset(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -139,10 +138,10 @@ namespace }; } // namespace -namespace IW4::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::leaderboard +} // namespace leaderboard diff --git a/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.h b/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.h index 832d6b94..931a8fca 100644 --- a/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.h +++ b/src/ObjLoading/Game/IW4/Leaderboard/LoaderLeaderboardIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::leaderboard + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace leaderboard diff --git a/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.cpp b/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.cpp index dacdf3d1..1485c361 100644 --- a/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.cpp +++ b/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.cpp @@ -8,7 +8,6 @@ #include using namespace IW4; -using namespace ::light_def; namespace { @@ -25,7 +24,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto filename = GetFileNameForAsset(assetName); + const auto filename = light_def::GetFileNameForAsset(assetName); const auto file = m_search_path.Open(filename); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -68,10 +67,10 @@ namespace }; } // namespace -namespace IW4::light_def +namespace light_def { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::light_def +} // namespace light_def diff --git a/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.h b/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.h index 96d93357..7ac2880c 100644 --- a/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.h +++ b/src/ObjLoading/Game/IW4/LightDef/LightDefLoaderIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::light_def +namespace light_def { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::light_def + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace light_def diff --git a/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.cpp b/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.cpp index a7dc2c42..64ce403f 100644 --- a/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.cpp +++ b/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.cpp @@ -35,10 +35,10 @@ namespace }; } // namespace -namespace IW4::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW4::localize +} // namespace localize diff --git a/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.h b/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.h index 032e02d6..e6abda46 100644 --- a/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.h +++ b/src/ObjLoading/Game/IW4/Localize/LoaderLocalizeIW4.h @@ -8,7 +8,7 @@ #include -namespace IW4::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW4::localize + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace localize diff --git a/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.cpp b/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.cpp index 5a37af7d..b6367630 100644 --- a/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.cpp +++ b/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.cpp @@ -8,7 +8,6 @@ #include using namespace IW4; -using namespace ::material; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -46,10 +45,10 @@ namespace }; } // namespace -namespace IW4::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::material +} // namespace material diff --git a/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.h b/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.h index 8f634c0c..6016cc17 100644 --- a/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.h +++ b/src/ObjLoading/Game/IW4/Material/LoaderMaterialIW4.h @@ -6,7 +6,7 @@ #include "SearchPath/ISearchPath.h" #include "Utils/MemoryManager.h" -namespace IW4::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::material + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace material diff --git a/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.cpp b/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.cpp index e6e8843f..91fb70a0 100644 --- a/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.cpp +++ b/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.cpp @@ -11,7 +11,6 @@ #include using namespace IW4; -using namespace ::menu; namespace { @@ -29,7 +28,7 @@ namespace std::vector menus; AssetRegistration registration(assetName); - auto& zoneState = context.GetZoneAssetCreationState(); + auto& zoneState = context.GetZoneAssetCreationState(); auto& conversionState = context.GetZoneAssetCreationState(); std::deque menuLoadQueue; @@ -81,7 +80,7 @@ namespace private: bool LoadMenuFileFromQueue(const std::string& menuFilePath, AssetCreationContext& context, - MenuAssetZoneState& zoneState, + menu::MenuAssetZoneState& zoneState, MenuConversionZoneState& conversionState, std::vector& menus, AssetRegistration& registration) const @@ -122,8 +121,8 @@ namespace bool ProcessParsedResults(const std::string& fileName, AssetCreationContext& context, - ParsingResult& parsingResult, - MenuAssetZoneState& zoneState, + menu::ParsingResult& parsingResult, + menu::MenuAssetZoneState& zoneState, MenuConversionZoneState& conversionState, std::vector& menus, AssetRegistration& registration) const @@ -197,9 +196,10 @@ namespace menuList.menus = nullptr; } - std::unique_ptr ParseMenuFile(std::istream& stream, const std::string& menuFileName, const MenuAssetZoneState& zoneState) const + std::unique_ptr + ParseMenuFile(std::istream& stream, const std::string& menuFileName, const menu::MenuAssetZoneState& zoneState) const { - MenuFileReader reader(stream, menuFileName, FeatureLevel::IW4, m_search_path); + menu::MenuFileReader reader(stream, menuFileName, menu::FeatureLevel::IW4, m_search_path); reader.IncludeZoneState(zoneState); reader.SetPermissiveMode(ObjLoading::Configuration.MenuPermissiveParsing); @@ -212,10 +212,10 @@ namespace }; } // namespace -namespace IW4::menu +namespace menu { - std::unique_ptr> CreateMenuListLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateMenuListLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.h b/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.h index 2cb21bb3..a22d7b2c 100644 --- a/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.h +++ b/src/ObjLoading/Game/IW4/Menu/LoaderMenuListIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::menu +namespace menu { - std::unique_ptr> CreateMenuListLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::menu + std::unique_ptr> CreateMenuListLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace menu diff --git a/src/ObjLoading/Game/IW4/Menu/MenuConverterIW4.h b/src/ObjLoading/Game/IW4/Menu/MenuConverterIW4.h index 8b32e98b..234cedb5 100644 --- a/src/ObjLoading/Game/IW4/Menu/MenuConverterIW4.h +++ b/src/ObjLoading/Game/IW4/Menu/MenuConverterIW4.h @@ -14,7 +14,7 @@ namespace IW4 IMenuConverter() = default; virtual ~IMenuConverter() = default; - virtual void ConvertMenu(const ::menu::CommonMenuDef& commonMenu, menuDef_t& menu, AssetRegistration& registration) = 0; + virtual void ConvertMenu(const menu::CommonMenuDef& commonMenu, menuDef_t& menu, AssetRegistration& registration) = 0; static std::unique_ptr Create(bool disableOptimizations, ISearchPath& searchPath, MemoryManager& memory, AssetCreationContext& context); }; diff --git a/src/ObjLoading/Game/IW4/ObjLoaderIW4.cpp b/src/ObjLoading/Game/IW4/ObjLoaderIW4.cpp index 7e0811f6..ad5b83c4 100644 --- a/src/ObjLoading/Game/IW4/ObjLoaderIW4.cpp +++ b/src/ObjLoading/Game/IW4/ObjLoaderIW4.cpp @@ -119,19 +119,19 @@ namespace { auto& memory = zone.Memory(); - collection.AddAssetCreator(phys_preset::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(phys_preset::CreateGdtLoader(memory, gdt, zone)); + collection.AddAssetCreator(phys_preset::CreateRawLoaderIW4(memory, searchPath, zone)); + collection.AddAssetCreator(phys_preset::CreateGdtLoaderIW4(memory, gdt, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(xmodel::CreateXModelLoader(memory, searchPath, zone)); - collection.AddAssetCreator(material::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(shader::CreatePixelShaderLoader(memory, searchPath)); - collection.AddAssetCreator(shader::CreateVertexShaderLoader(memory, searchPath)); + collection.AddAssetCreator(xmodel::CreateLoaderIW4(memory, searchPath, zone)); + collection.AddAssetCreator(material::CreateLoaderIW4(memory, searchPath)); + collection.AddAssetCreator(shader::CreatePixelShaderLoaderIW4(memory, searchPath)); + collection.AddAssetCreator(shader::CreateVertexShaderLoaderIW4(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(sound_curve::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(sound_curve::CreateLoaderIW4(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); @@ -140,19 +140,19 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(light_def::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(light_def::CreateLoaderIW4(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(menu::CreateMenuListLoader(memory, searchPath)); + collection.AddAssetCreator(menu::CreateMenuListLoaderIW4(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(localize::CreateLoader(memory, searchPath, zone)); - collection.AddAssetCreator(weapon::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(weapon::CreateGdtLoader(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(localize::CreateLoaderIW4(memory, searchPath, zone)); + collection.AddAssetCreator(weapon::CreateRawLoaderIW4(memory, searchPath, zone)); + collection.AddAssetCreator(weapon::CreateGdtLoaderIW4(memory, searchPath, gdt, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(raw_file::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(string_table::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(leaderboard::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(structured_data_def::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(raw_file::CreateLoaderIW4(memory, searchPath)); + collection.AddAssetCreator(string_table::CreateLoaderIW4(memory, searchPath)); + collection.AddAssetCreator(leaderboard::CreateLoaderIW4(memory, searchPath)); + collection.AddAssetCreator(structured_data_def::CreateLoaderIW4(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); diff --git a/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.cpp b/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.cpp index 4532e91e..26634fd7 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.cpp +++ b/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.cpp @@ -39,14 +39,14 @@ namespace private: IGdtQueryable& m_gdt; - IW4::phys_preset::InfoStringLoader m_info_string_loader; + phys_preset::InfoStringLoaderIW4 m_info_string_loader; }; } // namespace -namespace IW4::phys_preset +namespace phys_preset { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderIW4(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, gdt, zone); } -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.h b/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.h index c51f29db..c5e474f6 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.h +++ b/src/ObjLoading/Game/IW4/PhysPreset/GdtLoaderPhysPresetIW4.h @@ -8,7 +8,7 @@ #include -namespace IW4::phys_preset +namespace phys_preset { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone); -} // namespace IW4::phys_preset + std::unique_ptr> CreateGdtLoaderIW4(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone); +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.cpp b/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.cpp index dc83cca1..e8b69203 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.cpp +++ b/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.cpp @@ -58,15 +58,15 @@ namespace } } // namespace -namespace IW4::phys_preset +namespace phys_preset { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, Zone& zone) + InfoStringLoaderIW4::InfoStringLoaderIW4(MemoryManager& memory, Zone& zone) : m_memory(memory), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderIW4::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { PhysPresetInfo presetInfo; std::memset(&presetInfo, 0, sizeof(presetInfo)); @@ -87,4 +87,4 @@ namespace IW4::phys_preset return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.h b/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.h index c864ca3e..1618bd80 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.h +++ b/src/ObjLoading/Game/IW4/PhysPreset/InfoStringLoaderPhysPresetIW4.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace IW4::phys_preset +namespace phys_preset { - class InfoStringLoader + class InfoStringLoaderIW4 { public: - InfoStringLoader(MemoryManager& memory, Zone& zone); + InfoStringLoaderIW4(MemoryManager& memory, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -17,4 +17,4 @@ namespace IW4::phys_preset MemoryManager& m_memory; Zone& m_zone; }; -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.cpp b/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.cpp index aa9b88a5..5d05a588 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.cpp +++ b/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.cpp @@ -10,7 +10,6 @@ #include using namespace IW4; -using namespace ::phys_preset; namespace { @@ -25,7 +24,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = phys_preset::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -42,14 +41,14 @@ namespace private: ISearchPath& m_search_path; - IW4::phys_preset::InfoStringLoader m_info_string_loader; + phys_preset::InfoStringLoaderIW4 m_info_string_loader; }; } // namespace -namespace IW4::phys_preset +namespace phys_preset { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.h b/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.h index a711c13c..ab78361b 100644 --- a/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.h +++ b/src/ObjLoading/Game/IW4/PhysPreset/RawLoaderPhysPresetIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::phys_preset +namespace phys_preset { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW4::phys_preset + std::unique_ptr> CreateRawLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace phys_preset diff --git a/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.cpp b/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.cpp index 381d7b16..2b25158a 100644 --- a/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.cpp +++ b/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.cpp @@ -82,10 +82,10 @@ namespace }; } // namespace -namespace IW4::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::raw_file +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.h b/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.h index 1d483736..624b5b69 100644 --- a/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.h +++ b/src/ObjLoading/Game/IW4/RawFile/LoaderRawFileIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::raw_file + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.cpp b/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.cpp index 6e13a9e0..1d6ad597 100644 --- a/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.cpp +++ b/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.cpp @@ -8,7 +8,6 @@ #include using namespace IW4; -using namespace ::shader; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForPixelShaderAssetName(assetName); + const auto fileName = shader::GetFileNameForPixelShaderAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -55,10 +54,10 @@ namespace }; } // namespace -namespace IW4::shader +namespace shader { - std::unique_ptr> CreatePixelShaderLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreatePixelShaderLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.h b/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.h index 3ea15f98..0bc212a5 100644 --- a/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.h +++ b/src/ObjLoading/Game/IW4/Shader/LoaderPixelShaderIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::shader +namespace shader { - std::unique_ptr> CreatePixelShaderLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::shader + std::unique_ptr> CreatePixelShaderLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace shader diff --git a/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.cpp b/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.cpp index b47069f0..99bea4dd 100644 --- a/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.cpp +++ b/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.cpp @@ -8,7 +8,6 @@ #include using namespace IW4; -using namespace ::shader; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForVertexShaderAssetName(assetName); + const auto fileName = shader::GetFileNameForVertexShaderAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -55,10 +54,10 @@ namespace }; } // namespace -namespace IW4::shader +namespace shader { - std::unique_ptr> CreateVertexShaderLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateVertexShaderLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.h b/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.h index 7cc7e600..28076aaf 100644 --- a/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.h +++ b/src/ObjLoading/Game/IW4/Shader/LoaderVertexShaderIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::shader +namespace shader { - std::unique_ptr> CreateVertexShaderLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::shader + std::unique_ptr> CreateVertexShaderLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace shader diff --git a/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.cpp b/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.cpp index 84a88655..765b4bfb 100644 --- a/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.cpp +++ b/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.cpp @@ -12,7 +12,6 @@ #include using namespace IW4; -using namespace ::sound_curve; namespace { @@ -27,7 +26,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = sound_curve::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -71,10 +70,10 @@ namespace }; } // namespace -namespace IW4::sound_curve +namespace sound_curve { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::sound_curve +} // namespace sound_curve diff --git a/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.h b/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.h index 808cc0e1..b8b12cd3 100644 --- a/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.h +++ b/src/ObjLoading/Game/IW4/Sound/LoaderSoundCurveIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::sound_curve +namespace sound_curve { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::sound_curve + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace sound_curve diff --git a/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.cpp b/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.cpp index d19d32d1..11483031 100644 --- a/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.cpp +++ b/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.cpp @@ -6,7 +6,6 @@ #include "StringTable/StringTableLoader.h" using namespace IW4; -using namespace ::string_table; namespace { @@ -25,7 +24,7 @@ namespace if (!file.IsOpen()) return AssetCreationResult::NoAction(); - StringTableLoaderV2 loader; + string_table::StringTableLoaderV2 loader; auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream); if (!stringTable) return AssetCreationResult::Failure(); @@ -39,10 +38,10 @@ namespace }; } // namespace -namespace IW4::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::string_table +} // namespace string_table diff --git a/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.h b/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.h index 5bba65f4..89c53c50 100644 --- a/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.h +++ b/src/ObjLoading/Game/IW4/StringTable/LoaderStringTableIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::string_table + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace string_table diff --git a/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.cpp b/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.cpp index 8dad6ce2..673d715d 100644 --- a/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.cpp +++ b/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.cpp @@ -207,10 +207,10 @@ namespace }; } // namespace -namespace IW4::structured_data_def +namespace structured_data_def { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW4::structured_data_def +} // namespace structured_data_def diff --git a/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.h b/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.h index c3670e25..527a9389 100644 --- a/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.h +++ b/src/ObjLoading/Game/IW4/StructuredDataDef/LoaderStructuredDataDefIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::structured_data_def +namespace structured_data_def { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW4::structured_data_def + std::unique_ptr> CreateLoaderIW4(MemoryManager& memory, ISearchPath& searchPath); +} // namespace structured_data_def diff --git a/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.cpp b/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.cpp index ecd7f59a..ef632e47 100644 --- a/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.cpp +++ b/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - IW4::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderIW4 m_info_string_loader; }; } // namespace -namespace IW4::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.h b/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.h index ce66f584..6fcac0a4 100644 --- a/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.h +++ b/src/ObjLoading/Game/IW4/Weapon/GdtLoaderWeaponIW4.h @@ -8,7 +8,7 @@ #include -namespace IW4::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace IW4::weapon + std::unique_ptr> CreateGdtLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.cpp b/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.cpp index bd38e04a..be8ac8d6 100644 --- a/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.cpp +++ b/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.cpp @@ -426,16 +426,16 @@ namespace } } // namespace -namespace IW4::weapon +namespace weapon { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderIW4::InfoStringLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderIW4::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* weaponFullDef = m_memory.Alloc(); @@ -458,4 +458,4 @@ namespace IW4::weapon return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.h b/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.h index d1ba5d80..1f82539b 100644 --- a/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.h +++ b/src/ObjLoading/Game/IW4/Weapon/InfoStringLoaderWeaponIW4.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace IW4::weapon +namespace weapon { - class InfoStringLoader + class InfoStringLoaderIW4 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace IW4::weapon ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.cpp b/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.cpp index 2b4b4283..ae6de026 100644 --- a/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.cpp +++ b/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.cpp @@ -11,7 +11,6 @@ #include using namespace IW4; -using namespace ::weapon; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = weapon::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - IW4::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderIW4 m_info_string_loader; }; } // namespace -namespace IW4::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.h b/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.h index e8995ac3..208fc440 100644 --- a/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.h +++ b/src/ObjLoading/Game/IW4/Weapon/RawLoaderWeaponIW4.h @@ -7,7 +7,7 @@ #include -namespace IW4::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW4::weapon + std::unique_ptr> CreateRawLoaderIW4(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.cpp b/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.cpp index 09bb4046..0f812f80 100644 --- a/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.cpp +++ b/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.cpp @@ -10,7 +10,6 @@ #include using namespace IW5; -using namespace ::image; namespace { @@ -27,7 +26,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAsset(assetName, ".iwi"); + const auto fileName = image::GetFileNameForAsset(assetName, ".iwi"); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -62,10 +61,10 @@ namespace }; } // namespace -namespace IW5::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::image +} // namespace image diff --git a/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.h b/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.h index 120897b0..b95a8f23 100644 --- a/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.h +++ b/src/ObjLoading/Game/IW5/Image/LoaderImageIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::image + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace image diff --git a/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.cpp b/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.cpp index 4ec9f420..aa25767a 100644 --- a/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.cpp +++ b/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.cpp @@ -11,7 +11,6 @@ using namespace nlohmann; using namespace IW5; -using namespace ::leaderboard; namespace { @@ -133,7 +132,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetJsonFileNameForAsset(assetName)); + const auto file = m_search_path.Open(leaderboard::GetJsonFileNameForAsset(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -156,10 +155,10 @@ namespace }; } // namespace -namespace IW5::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::leaderboard +} // namespace leaderboard diff --git a/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.h b/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.h index d074b9b3..d2841638 100644 --- a/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.h +++ b/src/ObjLoading/Game/IW5/Leaderboard/LoaderLeaderboardIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::leaderboard + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace leaderboard diff --git a/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.cpp b/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.cpp index 218e9aab..a7512a26 100644 --- a/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.cpp +++ b/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.cpp @@ -35,10 +35,10 @@ namespace }; } // namespace -namespace IW5::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW5::localize +} // namespace localize diff --git a/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.h b/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.h index 9588b800..f161e6c6 100644 --- a/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.h +++ b/src/ObjLoading/Game/IW5/Localize/LoaderLocalizeIW5.h @@ -8,7 +8,7 @@ #include -namespace IW5::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW5::localize + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace localize diff --git a/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.cpp b/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.cpp index 9ed987d1..3a72f0bb 100644 --- a/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.cpp +++ b/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.cpp @@ -8,7 +8,6 @@ #include using namespace IW5; -using namespace ::material; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -46,10 +45,10 @@ namespace }; } // namespace -namespace IW5::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::material +} // namespace material diff --git a/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.h b/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.h index 1f0d7690..ebfaf88d 100644 --- a/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.h +++ b/src/ObjLoading/Game/IW5/Material/LoaderMaterialIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::material + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace material diff --git a/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.cpp b/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.cpp index f68b8dd4..ca7414df 100644 --- a/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.cpp +++ b/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.cpp @@ -11,7 +11,6 @@ #include using namespace IW5; -using namespace ::menu; namespace { @@ -29,7 +28,7 @@ namespace std::vector menus; AssetRegistration registration(assetName); - auto& zoneState = context.GetZoneAssetCreationState(); + auto& zoneState = context.GetZoneAssetCreationState(); auto& conversionState = context.GetZoneAssetCreationState(); std::deque menuLoadQueue; @@ -81,7 +80,7 @@ namespace private: bool LoadMenuFileFromQueue(const std::string& menuFilePath, AssetCreationContext& context, - MenuAssetZoneState& zoneState, + menu::MenuAssetZoneState& zoneState, MenuConversionZoneState& conversionState, std::vector& menus, AssetRegistration& registration) const @@ -122,8 +121,8 @@ namespace bool ProcessParsedResults(const std::string& fileName, AssetCreationContext& context, - ParsingResult& parsingResult, - MenuAssetZoneState& zoneState, + menu::ParsingResult& parsingResult, + menu::MenuAssetZoneState& zoneState, MenuConversionZoneState& conversionState, std::vector& menus, AssetRegistration& registration) const @@ -197,9 +196,10 @@ namespace menuList.menus = nullptr; } - std::unique_ptr ParseMenuFile(std::istream& stream, const std::string& menuFileName, const MenuAssetZoneState& zoneState) const + std::unique_ptr + ParseMenuFile(std::istream& stream, const std::string& menuFileName, const menu::MenuAssetZoneState& zoneState) const { - MenuFileReader reader(stream, menuFileName, FeatureLevel::IW5, m_search_path); + menu::MenuFileReader reader(stream, menuFileName, menu::FeatureLevel::IW5, m_search_path); reader.IncludeZoneState(zoneState); reader.SetPermissiveMode(ObjLoading::Configuration.MenuPermissiveParsing); @@ -212,10 +212,10 @@ namespace }; } // namespace -namespace IW5::menu +namespace menu { - std::unique_ptr> CreateMenuListLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateMenuListLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.h b/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.h index a323e807..4a8f1c4b 100644 --- a/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.h +++ b/src/ObjLoading/Game/IW5/Menu/LoaderMenuListIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::menu +namespace menu { - std::unique_ptr> CreateMenuListLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::menu + std::unique_ptr> CreateMenuListLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace menu diff --git a/src/ObjLoading/Game/IW5/ObjLoaderIW5.cpp b/src/ObjLoading/Game/IW5/ObjLoaderIW5.cpp index b331a795..cb3d96cd 100644 --- a/src/ObjLoading/Game/IW5/ObjLoaderIW5.cpp +++ b/src/ObjLoading/Game/IW5/ObjLoaderIW5.cpp @@ -125,13 +125,13 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(xmodel::CreateXModelLoader(memory, searchPath, zone)); - collection.AddAssetCreator(material::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(xmodel::CreateLoaderIW5(memory, searchPath, zone)); + collection.AddAssetCreator(material::CreateLoaderIW5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(image::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(image::CreateLoaderIW5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); @@ -145,19 +145,19 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(menu::CreateMenuListLoader(memory, searchPath)); + collection.AddAssetCreator(menu::CreateMenuListLoaderIW5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(localize::CreateLoader(memory, searchPath, zone)); - collection.AddAssetCreator(attachment::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(weapon::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(weapon::CreateGdtLoader(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(localize::CreateLoaderIW5(memory, searchPath, zone)); + collection.AddAssetCreator(attachment::CreateLoaderIW5(memory, searchPath)); + collection.AddAssetCreator(weapon::CreateRawLoaderIW5(memory, searchPath, zone)); + collection.AddAssetCreator(weapon::CreateGdtLoaderIW5(memory, searchPath, gdt, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(raw_file::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(script::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(string_table::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(leaderboard::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(raw_file::CreateLoaderIW5(memory, searchPath)); + collection.AddAssetCreator(script::CreateLoaderIW5(memory, searchPath)); + collection.AddAssetCreator(string_table::CreateLoaderIW5(memory, searchPath)); + collection.AddAssetCreator(leaderboard::CreateLoaderIW5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); diff --git a/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.cpp b/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.cpp index 9692a6f9..fe67715a 100644 --- a/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.cpp +++ b/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.cpp @@ -81,10 +81,10 @@ namespace }; } // namespace -namespace IW5::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::raw_file +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.h b/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.h index e8c96461..a8b2ad97 100644 --- a/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.h +++ b/src/ObjLoading/Game/IW5/RawFile/LoaderRawFileIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::raw_file + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace raw_file diff --git a/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.cpp b/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.cpp index cfbf8125..5e64f0a3 100644 --- a/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.cpp +++ b/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.cpp @@ -79,10 +79,10 @@ namespace }; } // namespace -namespace IW5::script +namespace script { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::script +} // namespace script diff --git a/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.h b/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.h index 1380a837..5d960798 100644 --- a/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.h +++ b/src/ObjLoading/Game/IW5/Script/LoaderScriptFileIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::script +namespace script { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::script + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace script diff --git a/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.cpp b/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.cpp index 4f56de03..ba499cd1 100644 --- a/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.cpp +++ b/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.cpp @@ -10,7 +10,6 @@ #include using namespace IW5; -using namespace ::string_table; namespace { @@ -29,7 +28,7 @@ namespace if (!file.IsOpen()) return AssetCreationResult::NoAction(); - StringTableLoaderV2 loader; + string_table::StringTableLoaderV2 loader; auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream); return AssetCreationResult::Success(context.AddAsset(assetName, stringTable)); @@ -41,10 +40,10 @@ namespace }; } // namespace -namespace IW5::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::string_table +} // namespace string_table diff --git a/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.h b/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.h index 804b8444..52d88396 100644 --- a/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.h +++ b/src/ObjLoading/Game/IW5/StringTable/LoaderStringTableIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::string_table + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace string_table diff --git a/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.cpp b/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.cpp index 02d8d733..19f5d7c7 100644 --- a/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.cpp +++ b/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - IW5::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderIW5 m_info_string_loader; }; } // namespace -namespace IW5::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.h b/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.h index 2bccdb9c..f4b729c1 100644 --- a/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.h +++ b/src/ObjLoading/Game/IW5/Weapon/GdtLoaderWeaponIW5.h @@ -8,7 +8,7 @@ #include -namespace IW5::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace IW5::weapon + std::unique_ptr> CreateGdtLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.cpp b/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.cpp index cc9f1f3e..aaaa6c27 100644 --- a/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.cpp +++ b/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.cpp @@ -856,16 +856,16 @@ namespace } } // namespace -namespace IW5::weapon +namespace weapon { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderIW5::InfoStringLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) const + AssetCreationResult InfoStringLoaderIW5::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) const { auto* weaponFullDef = m_memory.Alloc(); @@ -888,4 +888,4 @@ namespace IW5::weapon return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.h b/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.h index e34dbde8..d8935b8c 100644 --- a/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.h +++ b/src/ObjLoading/Game/IW5/Weapon/InfoStringLoaderWeaponIW5.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace IW5::weapon +namespace weapon { - class InfoStringLoader + class InfoStringLoaderIW5 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) const; @@ -18,4 +18,4 @@ namespace IW5::weapon ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.cpp b/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.cpp index 9d261f8e..492baea4 100644 --- a/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.cpp +++ b/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.cpp @@ -11,7 +11,6 @@ using namespace nlohmann; using namespace IW5; -using namespace ::attachment; namespace { @@ -643,7 +642,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetJsonFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(attachment::GetJsonFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -667,10 +666,10 @@ namespace }; } // namespace -namespace IW5::attachment +namespace attachment { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace IW5::attachment +} // namespace attachment diff --git a/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.h b/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.h index cf793afa..5ba1c07e 100644 --- a/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.h +++ b/src/ObjLoading/Game/IW5/Weapon/LoaderAttachmentIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::attachment +namespace attachment { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace IW5::attachment + std::unique_ptr> CreateLoaderIW5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace attachment diff --git a/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.cpp b/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.cpp index 2d487ae8..8d30bf2a 100644 --- a/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.cpp +++ b/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.cpp @@ -43,14 +43,14 @@ namespace private: ISearchPath& m_search_path; - IW5::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderIW5 m_info_string_loader; }; } // namespace -namespace IW5::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.h b/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.h index ceba2d77..88b8053a 100644 --- a/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.h +++ b/src/ObjLoading/Game/IW5/Weapon/RawLoaderWeaponIW5.h @@ -7,7 +7,7 @@ #include -namespace IW5::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace IW5::weapon + std::unique_ptr> CreateRawLoaderIW5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.cpp b/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.cpp index fefc44d3..c66a7f93 100644 --- a/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.cpp +++ b/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.cpp @@ -35,10 +35,10 @@ namespace }; } // namespace -namespace T5::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T5::localize +} // namespace localize diff --git a/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.h b/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.h index c4d2a787..a6d14d5e 100644 --- a/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.h +++ b/src/ObjLoading/Game/T5/Localize/LoaderLocalizeT5.h @@ -8,7 +8,7 @@ #include -namespace T5::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T5::localize + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace localize diff --git a/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.cpp b/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.cpp index f0218e1b..093f5e04 100644 --- a/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.cpp +++ b/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.cpp @@ -8,7 +8,6 @@ #include using namespace T5; -using namespace ::material; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -46,10 +45,10 @@ namespace }; } // namespace -namespace T5::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T5::material +} // namespace material diff --git a/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.h b/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.h index 1dfee2d2..8b11165a 100644 --- a/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.h +++ b/src/ObjLoading/Game/T5/Material/LoaderMaterialT5.h @@ -6,7 +6,7 @@ #include "SearchPath/ISearchPath.h" #include "Utils/MemoryManager.h" -namespace T5::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T5::material + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace material diff --git a/src/ObjLoading/Game/T5/ObjLoaderT5.cpp b/src/ObjLoading/Game/T5/ObjLoaderT5.cpp index 67cbccc6..cc67cc5a 100644 --- a/src/ObjLoading/Game/T5/ObjLoaderT5.cpp +++ b/src/ObjLoading/Game/T5/ObjLoaderT5.cpp @@ -104,8 +104,8 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(xmodel::CreateXModelLoader(memory, searchPath, zone)); - collection.AddAssetCreator(material::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(xmodel::CreateLoaderT5(memory, searchPath, zone)); + collection.AddAssetCreator(material::CreateLoaderT5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); @@ -120,13 +120,13 @@ namespace // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(localize::CreateLoader(memory, searchPath, zone)); + collection.AddAssetCreator(localize::CreateLoaderT5(memory, searchPath, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(raw_file::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(string_table::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(raw_file::CreateLoaderT5(memory, searchPath)); + collection.AddAssetCreator(string_table::CreateLoaderT5(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); diff --git a/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.cpp b/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.cpp index 9b3eb7e8..f261f06f 100644 --- a/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.cpp +++ b/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.cpp @@ -114,10 +114,10 @@ namespace }; } // namespace -namespace T5::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T5::raw_file +} // namespace raw_file diff --git a/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.h b/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.h index d0308037..ba06bd12 100644 --- a/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.h +++ b/src/ObjLoading/Game/T5/RawFile/LoaderRawFileT5.h @@ -7,7 +7,7 @@ #include -namespace T5::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T5::raw_file + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace raw_file diff --git a/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.cpp b/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.cpp index 4408fa37..b1085572 100644 --- a/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.cpp +++ b/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.cpp @@ -7,7 +7,6 @@ #include using namespace T5; -using namespace ::string_table; namespace { @@ -26,7 +25,7 @@ namespace if (!file.IsOpen()) return AssetCreationResult::NoAction(); - StringTableLoaderV3 loader; + string_table::StringTableLoaderV3 loader; auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream); return AssetCreationResult::Success(context.AddAsset(assetName, stringTable)); @@ -38,10 +37,10 @@ namespace }; } // namespace -namespace T5::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T5::string_table +} // namespace string_table diff --git a/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.h b/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.h index 3c661793..81146e31 100644 --- a/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.h +++ b/src/ObjLoading/Game/T5/StringTable/LoaderStringTableT5.h @@ -7,7 +7,7 @@ #include -namespace T5::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T5::string_table + std::unique_ptr> CreateLoaderT5(MemoryManager& memory, ISearchPath& searchPath); +} // namespace string_table diff --git a/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.cpp b/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.cpp index 047b1c39..4d135cf3 100644 --- a/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.cpp +++ b/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.cpp @@ -282,10 +282,10 @@ namespace }; } // namespace -namespace T6::font_icon +namespace font_icon { - std::unique_ptr> CreateCsvLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateCsvLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.h b/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.h index 76e623ea..ea6d60a2 100644 --- a/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.h +++ b/src/ObjLoading/Game/T6/FontIcon/CsvLoaderFontIconT6.h @@ -7,7 +7,7 @@ #include -namespace T6::font_icon +namespace font_icon { - std::unique_ptr> CreateCsvLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::font_icon + std::unique_ptr> CreateCsvLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace font_icon diff --git a/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.cpp b/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.cpp index 5ff32a18..fe909307 100644 --- a/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.cpp +++ b/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.cpp @@ -1,7 +1,7 @@ #include "JsonLoaderFontIconT6.h" +#include "FontIcon/FontIconCommon.h" #include "Game/T6/CommonT6.h" -#include "Game/T6/FontIcon/FontIconCommonT6.h" #include "Game/T6/FontIcon/JsonFontIconT6.h" #include "Game/T6/T6.h" @@ -141,10 +141,10 @@ namespace }; } // namespace -namespace T6::font_icon +namespace font_icon { - std::unique_ptr> CreateJsonLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateJsonLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.h b/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.h index e770f0d4..262354df 100644 --- a/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.h +++ b/src/ObjLoading/Game/T6/FontIcon/JsonLoaderFontIconT6.h @@ -7,7 +7,7 @@ #include -namespace T6::font_icon +namespace font_icon { - std::unique_ptr> CreateJsonLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::font_icon + std::unique_ptr> CreateJsonLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace font_icon diff --git a/src/ObjLoading/Game/T6/Image/LoaderImageT6.cpp b/src/ObjLoading/Game/T6/Image/LoaderImageT6.cpp index 1b41701a..0c618792 100644 --- a/src/ObjLoading/Game/T6/Image/LoaderImageT6.cpp +++ b/src/ObjLoading/Game/T6/Image/LoaderImageT6.cpp @@ -12,7 +12,6 @@ #include using namespace T6; -using namespace ::image; namespace { @@ -27,7 +26,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAsset(assetName, ".iwi"); + const auto fileName = image::GetFileNameForAsset(assetName, ".iwi"); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -70,10 +69,10 @@ namespace }; } // namespace -namespace T6::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::image +} // namespace image diff --git a/src/ObjLoading/Game/T6/Image/LoaderImageT6.h b/src/ObjLoading/Game/T6/Image/LoaderImageT6.h index e77f4591..610af102 100644 --- a/src/ObjLoading/Game/T6/Image/LoaderImageT6.h +++ b/src/ObjLoading/Game/T6/Image/LoaderImageT6.h @@ -7,7 +7,7 @@ #include -namespace T6::image +namespace image { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::image + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace image diff --git a/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.cpp b/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.cpp index ffbb5e0b..3a8415ec 100644 --- a/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.cpp +++ b/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.cpp @@ -12,7 +12,6 @@ using namespace nlohmann; using namespace T6; -using namespace ::leaderboard; namespace { @@ -140,7 +139,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetJsonFileNameForAsset(assetName)); + const auto file = m_search_path.Open(leaderboard::GetJsonFileNameForAsset(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -163,10 +162,10 @@ namespace }; } // namespace -namespace T6::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::leaderboard +} // namespace leaderboard diff --git a/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.h b/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.h index 24865730..cbe7c604 100644 --- a/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.h +++ b/src/ObjLoading/Game/T6/Leaderboard/JsonLoaderLeaderboardT6.h @@ -7,7 +7,7 @@ #include -namespace T6::leaderboard +namespace leaderboard { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::leaderboard + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace leaderboard diff --git a/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.cpp b/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.cpp index f28fa7d0..a51abb2f 100644 --- a/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.cpp @@ -35,10 +35,10 @@ namespace }; } // namespace -namespace T6::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::localize +} // namespace localize diff --git a/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.h b/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.h index 0aecaa98..dc7f49eb 100644 --- a/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.h +++ b/src/ObjLoading/Game/T6/Localize/LocalizeLoaderT6.h @@ -8,7 +8,7 @@ #include -namespace T6::localize +namespace localize { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::localize + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace localize diff --git a/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.cpp b/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.cpp index eeb7b7fa..82e3649b 100644 --- a/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.cpp +++ b/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.cpp @@ -8,7 +8,6 @@ #include using namespace T6; -using namespace ::material; namespace { @@ -23,7 +22,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(material::GetFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -46,10 +45,10 @@ namespace }; } // namespace -namespace T6::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::material +} // namespace material diff --git a/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.h b/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.h index d0dcc461..af1a1f92 100644 --- a/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.h +++ b/src/ObjLoading/Game/T6/Material/LoaderMaterialT6.h @@ -7,7 +7,7 @@ #include -namespace T6::material +namespace material { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::material + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace material diff --git a/src/ObjLoading/Game/T6/ObjLoaderT6.cpp b/src/ObjLoading/Game/T6/ObjLoaderT6.cpp index 3e02b7f6..9281a38b 100644 --- a/src/ObjLoading/Game/T6/ObjLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/ObjLoaderT6.cpp @@ -393,17 +393,17 @@ namespace T6 { auto& memory = zone.Memory(); - collection.AddAssetCreator(phys_preset::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(phys_preset::CreateGdtLoader(memory, gdt, zone)); - collection.AddAssetCreator(phys_constraints::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(phys_constraints::CreateGdtLoader(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(phys_preset::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(phys_preset::CreateGdtLoaderT6(memory, gdt, zone)); + collection.AddAssetCreator(phys_constraints::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(phys_constraints::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(xmodel::CreateXModelLoader(memory, searchPath, zone)); - collection.AddAssetCreator(material::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(xmodel::CreateLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(material::CreateLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(image::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(sound::CreateSoundBankLoader(memory, searchPath)); + collection.AddAssetCreator(image::CreateLoaderT6(memory, searchPath)); + collection.AddAssetCreator(sound::CreateSoundBankLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); @@ -413,41 +413,41 @@ namespace T6 // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(font_icon::CreateCsvLoader(memory, searchPath)); - collection.AddAssetCreator(font_icon::CreateJsonLoader(memory, searchPath)); + collection.AddAssetCreator(font_icon::CreateCsvLoaderT6(memory, searchPath)); + collection.AddAssetCreator(font_icon::CreateJsonLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(localize::CreateLoader(memory, searchPath, zone)); - collection.AddAssetCreator(weapon::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(weapon::CreateGdtLoader(memory, searchPath, gdt, zone)); - collection.AddAssetCreator(attachment::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(attachment::CreateGdtLoader(memory, searchPath, gdt, zone)); - collection.AddAssetCreator(attachment_unique::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(attachment_unique::CreateGdtLoader(memory, searchPath, gdt, zone)); - collection.AddAssetCreator(camo::CreateJsonLoader(memory, searchPath)); + collection.AddAssetCreator(localize::CreateLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(weapon::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(weapon::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(attachment::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(attachment::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(attachment_unique::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(attachment_unique::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(camo::CreateJsonLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(raw_file::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(string_table::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(leaderboard::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(raw_file::CreateLoaderT6(memory, searchPath)); + collection.AddAssetCreator(string_table::CreateLoaderT6(memory, searchPath)); + collection.AddAssetCreator(leaderboard::CreateLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(script::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(vehicle::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(vehicle::CreateGdtLoader(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(script::CreateLoaderT6(memory, searchPath)); + collection.AddAssetCreator(vehicle::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(vehicle::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(qdb::CreateLoader(memory, searchPath)); - collection.AddAssetCreator(slug::CreateLoader(memory, searchPath)); + collection.AddAssetCreator(qdb::CreateLoaderT6(memory, searchPath)); + collection.AddAssetCreator(slug::CreateLoaderT6(memory, searchPath)); // collection.AddAssetCreator(std::make_unique(memory)); // collection.AddAssetCreator(std::make_unique(memory)); - collection.AddAssetCreator(z_barrier::CreateRawLoader(memory, searchPath, zone)); - collection.AddAssetCreator(z_barrier::CreateGdtLoader(memory, searchPath, gdt, zone)); + collection.AddAssetCreator(z_barrier::CreateRawLoaderT6(memory, searchPath, zone)); + collection.AddAssetCreator(z_barrier::CreateGdtLoaderT6(memory, searchPath, gdt, zone)); } } // namespace diff --git a/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.cpp b/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.cpp index fae17b92..3b033248 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.cpp +++ b/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::phys_constraints::InfoStringLoader m_info_string_loader; + phys_constraints::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::phys_constraints +namespace phys_constraints { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.h b/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.h index c55f8e1a..c35e49bd 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.h +++ b/src/ObjLoading/Game/T6/PhysConstraints/GdtLoaderPhysConstraintsT6.h @@ -8,7 +8,7 @@ #include -namespace T6::phys_constraints +namespace phys_constraints { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::phys_constraints + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.cpp b/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.cpp index 1242dfe0..525d9771 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.cpp +++ b/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.cpp @@ -76,16 +76,16 @@ namespace } } // namespace -namespace T6::phys_constraints +namespace phys_constraints { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* physConstraints = m_memory.Alloc(); physConstraints->name = m_memory.Dup(assetName.c_str()); @@ -110,4 +110,4 @@ namespace T6::phys_constraints return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.h b/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.h index 14bf7512..134b3500 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.h +++ b/src/ObjLoading/Game/T6/PhysConstraints/InfoStringLoaderPhysConstraintsT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::phys_constraints +namespace phys_constraints { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::phys_constraints ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.cpp b/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.cpp index 8a85fe93..a4edbb53 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.cpp +++ b/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::phys_constraints; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = phys_constraints::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::phys_constraints::InfoStringLoader m_info_string_loader; + phys_constraints::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::phys_constraints +namespace phys_constraints { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.h b/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.h index e347be28..33342687 100644 --- a/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.h +++ b/src/ObjLoading/Game/T6/PhysConstraints/RawLoaderPhysConstraintsT6.h @@ -7,7 +7,7 @@ #include -namespace T6::phys_constraints +namespace phys_constraints { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::phys_constraints + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace phys_constraints diff --git a/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.cpp b/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.cpp index ed681d4f..36679dab 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.cpp +++ b/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::phys_preset::InfoStringLoader m_info_string_loader; + phys_preset::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::phys_preset +namespace phys_preset { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, gdt, zone); } -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.h b/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.h index c832e2a7..bc167205 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.h +++ b/src/ObjLoading/Game/T6/PhysPreset/GdtLoaderPhysPresetT6.h @@ -8,7 +8,7 @@ #include -namespace T6::phys_preset +namespace phys_preset { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::phys_preset + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, IGdtQueryable& gdt, Zone& zone); +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.cpp b/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.cpp index 88e86f90..6e996ad1 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.cpp +++ b/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.cpp @@ -60,15 +60,15 @@ namespace } } // namespace -namespace T6::phys_preset +namespace phys_preset { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, Zone& zone) : m_memory(memory), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* physPreset = m_memory.Alloc(); physPreset->name = m_memory.Dup(assetName.c_str()); @@ -95,4 +95,4 @@ namespace T6::phys_preset return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.h b/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.h index 99d0d1f5..06e10b2f 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.h +++ b/src/ObjLoading/Game/T6/PhysPreset/InfoStringLoaderPhysPresetT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::phys_preset +namespace phys_preset { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -17,4 +17,4 @@ namespace T6::phys_preset MemoryManager& m_memory; Zone& m_zone; }; -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.cpp b/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.cpp index 034f11a7..46430470 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.cpp +++ b/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::phys_preset; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = phys_preset::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::phys_preset::InfoStringLoader m_info_string_loader; + phys_preset::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::phys_preset +namespace phys_preset { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.h b/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.h index ecc7fa40..f319a936 100644 --- a/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.h +++ b/src/ObjLoading/Game/T6/PhysPreset/RawLoaderPhysPresetT6.h @@ -7,7 +7,7 @@ #include -namespace T6::phys_preset +namespace phys_preset { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::phys_preset + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace phys_preset diff --git a/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.cpp b/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.cpp index 7c2bed1b..e1327edc 100644 --- a/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.cpp +++ b/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.cpp @@ -44,10 +44,10 @@ namespace }; } // namespace -namespace T6::qdb +namespace qdb { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::qdb +} // namespace qdb diff --git a/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.h b/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.h index f769cc85..17a44611 100644 --- a/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.h +++ b/src/ObjLoading/Game/T6/Qdb/LoaderQdbT6.h @@ -7,7 +7,7 @@ #include -namespace T6::qdb +namespace qdb { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::qdb + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace qdb diff --git a/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.cpp b/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.cpp index f4644e8c..8782da60 100644 --- a/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.cpp +++ b/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.cpp @@ -114,10 +114,10 @@ namespace }; } // namespace -namespace T6::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::raw_file +} // namespace raw_file diff --git a/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.h b/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.h index 1af4421b..1ef99df6 100644 --- a/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.h +++ b/src/ObjLoading/Game/T6/RawFile/LoaderRawFileT6.h @@ -7,7 +7,7 @@ #include -namespace T6::raw_file +namespace raw_file { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::raw_file + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace raw_file diff --git a/src/ObjLoading/Game/T6/Script/LoaderScriptT6.cpp b/src/ObjLoading/Game/T6/Script/LoaderScriptT6.cpp index e1b98e8e..a7284bc7 100644 --- a/src/ObjLoading/Game/T6/Script/LoaderScriptT6.cpp +++ b/src/ObjLoading/Game/T6/Script/LoaderScriptT6.cpp @@ -44,10 +44,10 @@ namespace }; } // namespace -namespace T6::script +namespace script { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::script +} // namespace script diff --git a/src/ObjLoading/Game/T6/Script/LoaderScriptT6.h b/src/ObjLoading/Game/T6/Script/LoaderScriptT6.h index 88c90948..ebaab5da 100644 --- a/src/ObjLoading/Game/T6/Script/LoaderScriptT6.h +++ b/src/ObjLoading/Game/T6/Script/LoaderScriptT6.h @@ -7,7 +7,7 @@ #include -namespace T6::script +namespace script { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::script + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace script diff --git a/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.cpp b/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.cpp index 407d0fb7..cce61264 100644 --- a/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.cpp +++ b/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.cpp @@ -44,10 +44,10 @@ namespace }; } // namespace -namespace T6::slug +namespace slug { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::slug +} // namespace slug diff --git a/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.h b/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.h index bcf50625..fefc89c1 100644 --- a/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.h +++ b/src/ObjLoading/Game/T6/Slug/LoaderSlugT6.h @@ -7,7 +7,7 @@ #include -namespace T6::slug +namespace slug { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::slug + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace slug diff --git a/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.cpp b/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.cpp index 2d772c67..9b9b3781 100644 --- a/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.cpp +++ b/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.cpp @@ -1079,10 +1079,10 @@ namespace }; } // namespace -namespace T6::sound +namespace sound { - std::unique_ptr> CreateSoundBankLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateSoundBankLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::sound +} // namespace sound diff --git a/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.h b/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.h index c4d1af75..358b7710 100644 --- a/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.h +++ b/src/ObjLoading/Game/T6/Sound/LoaderSoundBankT6.h @@ -7,7 +7,7 @@ #include -namespace T6::sound +namespace sound { - std::unique_ptr> CreateSoundBankLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::sound + std::unique_ptr> CreateSoundBankLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace sound diff --git a/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.cpp b/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.cpp index a07301e6..d5e092d6 100644 --- a/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.cpp +++ b/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.cpp @@ -8,7 +8,6 @@ #include using namespace T6; -using namespace ::string_table; namespace { @@ -27,7 +26,7 @@ namespace if (!file.IsOpen()) return AssetCreationResult::NoAction(); - StringTableLoaderV3 loader; + string_table::StringTableLoaderV3 loader; auto* stringTable = loader.LoadFromStream(assetName, m_memory, *file.m_stream); return AssetCreationResult::Success(context.AddAsset(assetName, stringTable)); @@ -39,10 +38,10 @@ namespace }; } // namespace -namespace T6::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::string_table +} // namespace string_table diff --git a/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.h b/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.h index 448c15b8..bebd85b2 100644 --- a/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.h +++ b/src/ObjLoading/Game/T6/StringTable/LoaderStringTableT6.h @@ -7,7 +7,7 @@ #include -namespace T6::string_table +namespace string_table { - std::unique_ptr> CreateLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::string_table + std::unique_ptr> CreateLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace string_table diff --git a/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.cpp b/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.cpp index 84a2dc3b..7cad238c 100644 --- a/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.cpp +++ b/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::tracer::InfoStringLoader m_info_string_loader; + tracer::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::tracer +namespace tracer { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.h b/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.h index 57108194..e48dd81b 100644 --- a/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.h +++ b/src/ObjLoading/Game/T6/Tracer/GdtLoaderTracerT6.h @@ -8,7 +8,7 @@ #include -namespace T6::tracer +namespace tracer { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::tracer + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.cpp b/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.cpp index 03f3a29c..e7bc4377 100644 --- a/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.cpp +++ b/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.cpp @@ -12,7 +12,6 @@ #include using namespace T6; -using namespace ::tracer; namespace { @@ -48,16 +47,16 @@ namespace }; } // namespace -namespace T6::tracer +namespace tracer { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* tracer = m_memory.Alloc(); tracer->name = m_memory.Dup(assetName.c_str()); @@ -75,4 +74,4 @@ namespace T6::tracer return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.h b/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.h index 2f3c029d..d5ace0a6 100644 --- a/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.h +++ b/src/ObjLoading/Game/T6/Tracer/InfoStringLoaderTracerT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::tracer +namespace tracer { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::tracer ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.cpp b/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.cpp index 162253b2..ff3fdc42 100644 --- a/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.cpp +++ b/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::tracer; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = tracer::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::tracer::InfoStringLoader m_info_string_loader; + tracer::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::tracer +namespace tracer { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.h b/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.h index 500c992d..3667c410 100644 --- a/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.h +++ b/src/ObjLoading/Game/T6/Tracer/RawLoaderTracerT6.h @@ -7,7 +7,7 @@ #include -namespace T6::tracer +namespace tracer { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::tracer + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace tracer diff --git a/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.cpp b/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.cpp index 932bc544..e0267246 100644 --- a/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.cpp +++ b/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::vehicle::InfoStringLoader m_info_string_loader; + vehicle::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::vehicle +namespace vehicle { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.h b/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.h index b24400df..4bc647fe 100644 --- a/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.h +++ b/src/ObjLoading/Game/T6/Vehicle/GdtLoaderVehicleT6.h @@ -8,7 +8,7 @@ #include -namespace T6::vehicle +namespace vehicle { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::vehicle + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.cpp b/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.cpp index b0a6150b..76f4c2ce 100644 --- a/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.cpp +++ b/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.cpp @@ -107,16 +107,16 @@ namespace }; } // namespace -namespace T6::vehicle +namespace vehicle { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* vehicleDef = m_memory.Alloc(); vehicleDef->name = m_memory.Dup(assetName.c_str()); @@ -133,4 +133,4 @@ namespace T6::vehicle return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.h b/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.h index f8cacd00..15995e94 100644 --- a/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.h +++ b/src/ObjLoading/Game/T6/Vehicle/InfoStringLoaderVehicleT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::vehicle +namespace vehicle { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::vehicle ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.cpp b/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.cpp index 5e829b85..a7b5368b 100644 --- a/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.cpp +++ b/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::vehicle; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = vehicle::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::vehicle::InfoStringLoader m_info_string_loader; + vehicle::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::vehicle +namespace vehicle { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.h b/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.h index 37a709d6..59759b0a 100644 --- a/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.h +++ b/src/ObjLoading/Game/T6/Vehicle/RawLoaderVehicleT6.h @@ -7,7 +7,7 @@ #include -namespace T6::vehicle +namespace vehicle { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::vehicle + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace vehicle diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.cpp index 0357b7d8..66a3b1d9 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::attachment::InfoStringLoader m_info_string_loader; + attachment::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::attachment +namespace attachment { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.h index 799507bf..f2ca06ac 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentGdtLoaderT6.h @@ -8,7 +8,7 @@ #include -namespace T6::attachment +namespace attachment { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::attachment + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.cpp index 721a4b81..dd296d58 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.cpp @@ -93,16 +93,16 @@ namespace } } // namespace -namespace T6::attachment +namespace attachment { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* attachment = m_memory.Alloc(); attachment->szInternalName = m_memory.Dup(assetName.c_str()); @@ -121,4 +121,4 @@ namespace T6::attachment return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.h index c9dd12d7..b4782772 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentInfoStringLoaderT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::attachment +namespace attachment { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::attachment ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.cpp index c2158ba2..815694d4 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.cpp @@ -43,14 +43,14 @@ namespace private: ISearchPath& m_search_path; - T6::attachment::InfoStringLoader m_info_string_loader; + attachment::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::attachment +namespace attachment { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.h index 5726e166..43748226 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentRawLoaderT6.h @@ -7,7 +7,7 @@ #include -namespace T6::attachment +namespace attachment { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::attachment + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace attachment diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.cpp index b79492ff..01a9a006 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::attachment_unique::InfoStringLoader m_info_string_loader; + attachment_unique::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::attachment_unique +namespace attachment_unique { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.h index b7065166..1b1ad408 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueGdtLoaderT6.h @@ -8,7 +8,7 @@ #include -namespace T6::attachment_unique +namespace attachment_unique { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::attachment_unique + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.cpp index 02429b3f..059091a1 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.cpp @@ -141,7 +141,7 @@ namespace { // combinedAttachmentTypeMask std::vector attachmentsFromName; - if (!T6::attachment_unique::ExtractAttachmentsFromAssetName(assetName, attachmentsFromName)) + if (!attachment_unique::ExtractAttachmentsFromAssetNameT6(assetName, attachmentsFromName)) { std::cerr << std::format("Failed to determine attachments from attachment unique name \"{}\"\n", assetName); return false; @@ -159,9 +159,9 @@ namespace } } // namespace -namespace T6::attachment_unique +namespace attachment_unique { - bool ExtractAttachmentsFromAssetName(const std::string& assetName, std::vector& attachmentList) + bool ExtractAttachmentsFromAssetNameT6(const std::string& assetName, std::vector& attachmentList) { std::vector parts; @@ -210,14 +210,14 @@ namespace T6::attachment_unique return true; } - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* attachmentUniqueFull = m_memory.Alloc(); attachmentUniqueFull->attachment.szInternalName = m_memory.Dup(assetName.c_str()); @@ -244,4 +244,4 @@ namespace T6::attachment_unique return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.h index 5c50650b..265b294f 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueInfoStringLoaderT6.h @@ -7,14 +7,14 @@ #include -namespace T6::attachment_unique +namespace attachment_unique { - bool ExtractAttachmentsFromAssetName(const std::string& assetName, std::vector& attachmentList); + bool ExtractAttachmentsFromAssetNameT6(const std::string& assetName, std::vector& attachmentList); - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -23,4 +23,4 @@ namespace T6::attachment_unique ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.cpp index 4023168f..a8a11dd0 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::attachment_unique; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = attachment_unique::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::attachment_unique::InfoStringLoader m_info_string_loader; + attachment_unique::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::attachment_unique +namespace attachment_unique { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.h index afdf3584..b6c83a64 100644 --- a/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/AttachmentUniqueRawLoaderT6.h @@ -7,7 +7,7 @@ #include -namespace T6::attachment_unique +namespace attachment_unique { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::attachment_unique + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace attachment_unique diff --git a/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.cpp index 65a57723..c1a2fdbb 100644 --- a/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.cpp @@ -12,7 +12,6 @@ using namespace nlohmann; using namespace T6; -using namespace ::camo; namespace { @@ -253,7 +252,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto file = m_search_path.Open(GetJsonFileNameForAssetName(assetName)); + const auto file = m_search_path.Open(camo::GetJsonFileNameForAssetName(assetName)); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -277,10 +276,10 @@ namespace }; } // namespace -namespace T6::camo +namespace camo { - std::unique_ptr> CreateJsonLoader(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr> CreateJsonLoaderT6(MemoryManager& memory, ISearchPath& searchPath) { return std::make_unique(memory, searchPath); } -} // namespace T6::camo +} // namespace camo diff --git a/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.h index 3b5f7f7f..cd6da51d 100644 --- a/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/CamoJsonLoaderT6.h @@ -7,7 +7,7 @@ #include -namespace T6::camo +namespace camo { - std::unique_ptr> CreateJsonLoader(MemoryManager& memory, ISearchPath& searchPath); -} // namespace T6::camo + std::unique_ptr> CreateJsonLoaderT6(MemoryManager& memory, ISearchPath& searchPath); +} // namespace camo diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.cpp index 9caabce5..02f77115 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.h index 34670907..ef2b6914 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/WeaponGdtLoaderT6.h @@ -8,7 +8,7 @@ #include -namespace T6::weapon +namespace weapon { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::weapon + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.cpp index d5cefc6f..ccaf394e 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.cpp @@ -568,7 +568,7 @@ namespace && weapon.attachmentUniques[attachmentUniqueIndex]->attachmentType != attachmentUnique.attachmentType) { std::vector attachments; - if (T6::attachment_unique::ExtractAttachmentsFromAssetName(weapon.attachmentUniques[attachmentUniqueIndex]->szInternalName, attachments) + if (attachment_unique::ExtractAttachmentsFromAssetNameT6(weapon.attachmentUniques[attachmentUniqueIndex]->szInternalName, attachments) && attachments.front() == attachmentUnique.attachmentType) { if (lastSibling == nullptr) @@ -599,16 +599,16 @@ namespace } } // namespace -namespace T6::weapon +namespace weapon { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* weaponFullDef = m_memory.Alloc(); weaponFullDef->weapVariantDef.szInternalName = m_memory.Dup(assetName.c_str()); @@ -632,4 +632,4 @@ namespace T6::weapon return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.h index 7ba8a410..a4d146cb 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/WeaponInfoStringLoaderT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::weapon +namespace weapon { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::weapon ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.cpp b/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.cpp index 09304559..97f37dec 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.cpp +++ b/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::weapon; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = weapon::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::weapon::InfoStringLoader m_info_string_loader; + weapon::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.h b/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.h index e02ce562..f026b99b 100644 --- a/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.h +++ b/src/ObjLoading/Game/T6/Weapon/WeaponRawLoaderT6.h @@ -7,7 +7,7 @@ #include -namespace T6::weapon +namespace weapon { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::weapon + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace weapon diff --git a/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.cpp b/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.cpp index 0f8d5d22..09dbb255 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.cpp +++ b/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.cpp @@ -40,14 +40,14 @@ namespace private: IGdtQueryable& m_gdt; - T6::z_barrier::InfoStringLoader m_info_string_loader; + z_barrier::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::z_barrier +namespace z_barrier { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone) { return std::make_unique(memory, searchPath, gdt, zone); } -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.h b/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.h index 7631005e..abf79682 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.h +++ b/src/ObjLoading/Game/T6/ZBarrier/GdtLoaderZBarrierT6.h @@ -8,7 +8,7 @@ #include -namespace T6::z_barrier +namespace z_barrier { - std::unique_ptr> CreateGdtLoader(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); -} // namespace T6::z_barrier + std::unique_ptr> CreateGdtLoaderT6(MemoryManager& memory, ISearchPath& searchPath, IGdtQueryable& gdt, Zone& zone); +} // namespace z_barrier diff --git a/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.cpp b/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.cpp index 43d93ab3..3952a969 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.cpp +++ b/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.cpp @@ -55,16 +55,16 @@ namespace } } // namespace -namespace T6::z_barrier +namespace z_barrier { - InfoStringLoader::InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + InfoStringLoaderT6::InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) : m_memory(memory), m_search_path(searchPath), m_zone(zone) { } - AssetCreationResult InfoStringLoader::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) + AssetCreationResult InfoStringLoaderT6::CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context) { auto* zbarrier = m_memory.Alloc(); zbarrier->name = m_memory.Dup(assetName.c_str()); @@ -83,4 +83,4 @@ namespace T6::z_barrier return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.h b/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.h index efba4096..403fec2e 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.h +++ b/src/ObjLoading/Game/T6/ZBarrier/InfoStringLoaderZBarrierT6.h @@ -4,12 +4,12 @@ #include "Asset/AssetCreationResult.h" #include "InfoString/InfoString.h" -namespace T6::z_barrier +namespace z_barrier { - class InfoStringLoader + class InfoStringLoaderT6 { public: - InfoStringLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + InfoStringLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); AssetCreationResult CreateAsset(const std::string& assetName, const InfoString& infoString, AssetCreationContext& context); @@ -18,4 +18,4 @@ namespace T6::z_barrier ISearchPath& m_search_path; Zone& m_zone; }; -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.cpp b/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.cpp index 9f0b3349..9b169786 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.cpp +++ b/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::z_barrier; namespace { @@ -26,7 +25,7 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { - const auto fileName = GetFileNameForAssetName(assetName); + const auto fileName = z_barrier::GetFileNameForAssetName(assetName); const auto file = m_search_path.Open(fileName); if (!file.IsOpen()) return AssetCreationResult::NoAction(); @@ -43,14 +42,14 @@ namespace private: ISearchPath& m_search_path; - T6::z_barrier::InfoStringLoader m_info_string_loader; + z_barrier::InfoStringLoaderT6 m_info_string_loader; }; } // namespace -namespace T6::z_barrier +namespace z_barrier { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone); } -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.h b/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.h index 0ae04d30..87ed18db 100644 --- a/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.h +++ b/src/ObjLoading/Game/T6/ZBarrier/RawLoaderZBarrierT6.h @@ -7,7 +7,7 @@ #include -namespace T6::z_barrier +namespace z_barrier { - std::unique_ptr> CreateRawLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); -} // namespace T6::z_barrier + std::unique_ptr> CreateRawLoaderT6(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); +} // namespace z_barrier diff --git a/src/ObjLoading/XModel/LoaderXModel.cpp.template b/src/ObjLoading/XModel/LoaderXModel.cpp.template index 08243114..c47b260e 100644 --- a/src/ObjLoading/XModel/LoaderXModel.cpp.template +++ b/src/ObjLoading/XModel/LoaderXModel.cpp.template @@ -1082,9 +1082,11 @@ namespace }; } // namespace -namespace GAME::xmodel +#set CREATE_LOADER_METHOD "CreateLoader" + GAME + +namespace xmodel { - std::unique_ptr> CreateXModelLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone) + std::unique_ptr> CREATE_LOADER_METHOD (MemoryManager& memory, ISearchPath& searchPath, Zone& zone) { return std::make_unique(memory, searchPath, zone.m_script_strings); } diff --git a/src/ObjLoading/XModel/LoaderXModel.h.template b/src/ObjLoading/XModel/LoaderXModel.h.template index 20590a8b..f6668ca2 100644 --- a/src/ObjLoading/XModel/LoaderXModel.h.template +++ b/src/ObjLoading/XModel/LoaderXModel.h.template @@ -13,7 +13,9 @@ #include -namespace GAME::xmodel +#set CREATE_LOADER_METHOD "CreateLoader" + GAME + +namespace xmodel { - std::unique_ptr> CreateXModelLoader(MemoryManager& memory, ISearchPath& searchPath, Zone& zone); + std::unique_ptr> CREATE_LOADER_METHOD (MemoryManager& memory, ISearchPath& searchPath, Zone& zone); } // namespace GAME diff --git a/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.cpp b/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.cpp index 5459adcf..245e5790 100644 --- a/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.cpp @@ -15,7 +15,6 @@ #include using namespace IW3; -using namespace ::image; namespace { @@ -40,7 +39,7 @@ namespace std::unique_ptr LoadImageFromIwi(const GfxImage& image, ISearchPath& searchPath) { - const auto imageFileName = std::format("images/{}.iwi", image.name); + const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi"); const auto filePathImage = searchPath.Open(imageFileName); if (!filePathImage.IsOpen()) { @@ -60,9 +59,9 @@ namespace } } // namespace -namespace IW3::image +namespace image { - Dumper::Dumper() + DumperIW3::DumperIW3() { switch (ObjWriting::Configuration.ImageOutputFormat) { @@ -79,12 +78,12 @@ namespace IW3::image } } - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW3::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW3::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* image = asset->Asset(); const auto texture = LoadImageData(context.m_obj_search_path, *image); @@ -99,4 +98,4 @@ namespace IW3::image auto& stream = *assetFile; m_writer->DumpImage(stream, texture.get()); } -} // namespace IW3::image +} // namespace image diff --git a/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.h b/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.h index 24a22efa..7a1b181c 100644 --- a/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.h +++ b/src/ObjWriting/Game/IW3/Image/ImageDumperIW3.h @@ -6,18 +6,18 @@ #include -namespace IW3::image +namespace image { - class Dumper final : public AbstractAssetDumper + class DumperIW3 final : public AbstractAssetDumper { public: - Dumper(); + DumperIW3(); protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; private: std::unique_ptr m_writer; }; -} // namespace IW3::image +} // namespace image diff --git a/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.cpp b/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.cpp index e01f32d7..9cb481db 100644 --- a/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.cpp @@ -8,9 +8,9 @@ using namespace IW3; -namespace IW3::localize +namespace localize { - void Dumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void DumperIW3::DumpPool(AssetDumpingContext& context, AssetPool* pool) { if (pool->m_asset_lookup.empty()) return; @@ -41,4 +41,4 @@ namespace IW3::localize std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name); } } -} // namespace IW3::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.h b/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.h index aebdd9aa..4cebd7c8 100644 --- a/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.h +++ b/src/ObjWriting/Game/IW3/Localize/LocalizeDumperIW3.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW3/IW3.h" -namespace IW3::localize +namespace localize { - class Dumper final : public IAssetDumper + class DumperIW3 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace IW3::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.cpp b/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.cpp index abe0e937..759623e4 100644 --- a/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.cpp @@ -2,14 +2,14 @@ using namespace IW3; -namespace IW3::map_ents +namespace map_ents { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW3::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW3::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* mapEnts = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name + ".ents"); @@ -20,4 +20,4 @@ namespace IW3::map_ents auto& stream = *assetFile; stream.write(mapEnts->entityString, mapEnts->numEntityChars); } -} // namespace IW3::map_ents +} // namespace map_ents diff --git a/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.h b/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.h index 55518202..cd41ccc8 100644 --- a/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.h +++ b/src/ObjWriting/Game/IW3/Maps/MapEntsDumperIW3.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW3/IW3.h" -namespace IW3::map_ents +namespace map_ents { - class Dumper final : public AbstractAssetDumper + class DumperIW3 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW3::map_ents +} // namespace map_ents diff --git a/src/ObjWriting/Game/IW3/ObjWriterIW3.cpp b/src/ObjWriting/Game/IW3/ObjWriterIW3.cpp index 59cd7a00..418e3156 100644 --- a/src/ObjWriting/Game/IW3/ObjWriterIW3.cpp +++ b/src/ObjWriting/Game/IW3/ObjWriterIW3.cpp @@ -26,30 +26,30 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET) // DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS) - DUMP_ASSET_POOL(xmodel::Dumper, m_xmodel, ASSET_TYPE_XMODEL) - DUMP_ASSET_POOL(material::JsonDumper, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(xmodel::DumperIW3, m_xmodel, ASSET_TYPE_XMODEL) + DUMP_ASSET_POOL(material::JsonDumperIW3, m_material, ASSET_TYPE_MATERIAL) // DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) - DUMP_ASSET_POOL(image::Dumper, m_image, ASSET_TYPE_IMAGE) + DUMP_ASSET_POOL(image::DumperIW3, m_image, ASSET_TYPE_IMAGE) // DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND) // DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve, ASSET_TYPE_SOUND_CURVE) - DUMP_ASSET_POOL(sound::LoadedSoundDumper, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) + DUMP_ASSET_POOL(sound::LoadedSoundDumperIW3, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) // DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP_PVS) // DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD) // DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP) // DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP) - DUMP_ASSET_POOL(map_ents::Dumper, m_map_ents, ASSET_TYPE_MAP_ENTS) + DUMP_ASSET_POOL(map_ents::DumperIW3, m_map_ents, ASSET_TYPE_MAP_ENTS) // DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD) // DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF) // DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT) // DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST) // DUMP_ASSET_POOL(AssetDumpermenuDef_t, m_menu_def, ASSET_TYPE_MENU) - DUMP_ASSET_POOL(localize::Dumper, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) + DUMP_ASSET_POOL(localize::DumperIW3, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) // DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON) // DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS) // DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX) // DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX) - DUMP_ASSET_POOL(raw_file::Dumper, m_raw_file, ASSET_TYPE_RAWFILE) - DUMP_ASSET_POOL(string_table::Dumper, m_string_table, ASSET_TYPE_STRINGTABLE) + DUMP_ASSET_POOL(raw_file::DumperIW3, m_raw_file, ASSET_TYPE_RAWFILE) + DUMP_ASSET_POOL(string_table::DumperIW3, m_string_table, ASSET_TYPE_STRINGTABLE) return true; diff --git a/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.cpp b/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.cpp index 22af389d..4b2eb11b 100644 --- a/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.cpp @@ -2,14 +2,14 @@ using namespace IW3; -namespace IW3::raw_file +namespace raw_file { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW3::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW3::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* rawFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -20,4 +20,4 @@ namespace IW3::raw_file auto& stream = *assetFile; stream.write(rawFile->buffer, rawFile->len); } -} // namespace IW3::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.h b/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.h index 3ea995c8..250bea7c 100644 --- a/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.h +++ b/src/ObjWriting/Game/IW3/RawFile/RawFileDumperIW3.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW3/IW3.h" -namespace IW3::raw_file +namespace raw_file { - class Dumper final : public AbstractAssetDumper + class DumperIW3 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW3::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.cpp b/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.cpp index 4e3ab817..ccf79977 100644 --- a/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.cpp @@ -22,14 +22,14 @@ namespace } } // namespace -namespace IW3::sound +namespace sound { - bool LoadedSoundDumper::ShouldDump(XAssetInfo* asset) + bool LoadedSoundDumperIW3::ShouldDump(XAssetInfo* asset) { return true; } - void LoadedSoundDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void LoadedSoundDumperIW3::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* loadedSound = asset->Asset(); const auto assetFile = context.OpenAssetFile(std::format("sound/{}", asset->m_name)); @@ -49,4 +49,4 @@ namespace IW3::sound break; } } -} // namespace IW3::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.h b/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.h index cfe8b811..458af961 100644 --- a/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.h +++ b/src/ObjWriting/Game/IW3/Sound/LoadedSoundDumperIW3.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW3/IW3.h" -namespace IW3::sound +namespace sound { - class LoadedSoundDumper final : public AbstractAssetDumper + class LoadedSoundDumperIW3 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW3::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.cpp b/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.cpp index 381660a7..b7188a34 100644 --- a/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.cpp +++ b/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.cpp @@ -4,14 +4,14 @@ using namespace IW3; -namespace IW3::string_table +namespace string_table { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW3::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW3::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* stringTable = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -31,4 +31,4 @@ namespace IW3::string_table csv.NextRow(); } } -} // namespace IW3::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.h b/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.h index c010dd89..21ef05d5 100644 --- a/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.h +++ b/src/ObjWriting/Game/IW3/StringTable/StringTableDumperIW3.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW3/IW3.h" -namespace IW3::string_table +namespace string_table { - class Dumper final : public AbstractAssetDumper + class DumperIW3 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW3::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.cpp b/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.cpp index ad2bf5c9..57fd3cf3 100644 --- a/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.cpp @@ -12,7 +12,6 @@ #include using namespace IW4; -using namespace ::image; namespace { @@ -37,7 +36,7 @@ namespace std::unique_ptr LoadImageFromIwi(const GfxImage& image, ISearchPath& searchPath) { - const auto imageFileName = std::format("images/{}.iwi", image.name); + const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi"); const auto filePathImage = searchPath.Open(imageFileName); if (!filePathImage.IsOpen()) { @@ -57,9 +56,9 @@ namespace } } // namespace -namespace IW4::image +namespace image { - Dumper::Dumper() + DumperIW4::DumperIW4() { switch (ObjWriting::Configuration.ImageOutputFormat) { @@ -76,12 +75,12 @@ namespace IW4::image } } - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* image = asset->Asset(); const auto texture = LoadImageData(context.m_obj_search_path, *image); @@ -96,4 +95,4 @@ namespace IW4::image auto& stream = *assetFile; m_writer->DumpImage(stream, texture.get()); } -} // namespace IW4::image +} // namespace image diff --git a/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.h b/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.h index ee9910f4..5d268ccc 100644 --- a/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Image/ImageDumperIW4.h @@ -6,18 +6,18 @@ #include -namespace IW4::image +namespace image { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { public: - Dumper(); + DumperIW4(); protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; private: std::unique_ptr m_writer; }; -} // namespace IW4::image +} // namespace image diff --git a/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.cpp b/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.cpp index 363335bd..80ed3625 100644 --- a/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.cpp @@ -9,7 +9,6 @@ using namespace nlohmann; using namespace IW4; -using namespace ::leaderboard; namespace { @@ -76,14 +75,14 @@ namespace }; } // namespace -namespace IW4::leaderboard +namespace leaderboard { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAsset(asset->m_name)); @@ -93,4 +92,4 @@ namespace IW4::leaderboard Dumper dumper(*assetFile); dumper.Dump(*asset->Asset()); } -} // namespace IW4::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.h b/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.h index eb7f7183..a56e5127 100644 --- a/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Leaderboard/LeaderboardJsonDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::leaderboard +namespace leaderboard { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperIW4 final : public AbstractAssetDumper { protected: - [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.cpp b/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.cpp index 549da3d1..205df266 100644 --- a/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.cpp @@ -5,16 +5,15 @@ #include using namespace IW4; -using namespace ::light_def; -namespace IW4::light_def +namespace light_def { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* lightDef = asset->Asset(); const auto assetFile = context.OpenAssetFile(GetFileNameForAsset(asset->m_name)); @@ -30,4 +29,4 @@ namespace IW4::light_def stream << lightDef->attenuation.samplerState << imageName << static_cast(lightDef->lmapLookupStart); } -} // namespace IW4::light_def +} // namespace light_def diff --git a/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.h b/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.h index f80236df..29531abb 100644 --- a/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.h +++ b/src/ObjWriting/Game/IW4/LightDef/LightDefDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::light_def +namespace light_def { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::light_def +} // namespace light_def diff --git a/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.cpp b/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.cpp index 3efb30ea..77b4b44e 100644 --- a/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.cpp @@ -8,9 +8,9 @@ using namespace IW4; -namespace IW4::localize +namespace localize { - void Dumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void DumperIW4::DumpPool(AssetDumpingContext& context, AssetPool* pool) { if (pool->m_asset_lookup.empty()) return; @@ -41,4 +41,4 @@ namespace IW4::localize std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name); } } -} // namespace IW4::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.h b/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.h index f7435a5b..fd88c200 100644 --- a/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Localize/LocalizeDumperIW4.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::localize +namespace localize { - class Dumper final : public IAssetDumper + class DumperIW4 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace IW4::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.cpp b/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.cpp index 7f708cc0..37b45249 100644 --- a/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.cpp @@ -5,14 +5,14 @@ using namespace IW4; -namespace IW4::addon_map_ents +namespace addon_map_ents { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* addonMapEnts = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -24,4 +24,4 @@ namespace IW4::addon_map_ents stream.write(addonMapEnts->entityString, std::max(addonMapEnts->numEntityChars - 1, 0)); } -} // namespace IW4::addon_map_ents +} // namespace addon_map_ents diff --git a/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.h b/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.h index a4691a78..4f1ef6c8 100644 --- a/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Maps/AddonMapEntsDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::addon_map_ents +namespace addon_map_ents { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::addon_map_ents +} // namespace addon_map_ents diff --git a/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.cpp b/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.cpp index 21ca149e..a61c012a 100644 --- a/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.cpp @@ -1108,14 +1108,14 @@ namespace }; } // namespace -namespace IW4::material +namespace material { - bool DecompilingGdtDumper::ShouldDump(XAssetInfo* asset) + bool DecompilingGdtDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void DecompilingGdtDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DecompilingGdtDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { if (!context.m_gdt) return; @@ -1123,4 +1123,4 @@ namespace IW4::material MaterialGdtDumper dumper(*asset->Asset()); context.m_gdt->WriteEntry(dumper.CreateGdtEntry()); } -} // namespace IW4::material +} // namespace material diff --git a/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.h b/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.h index dd192116..e6b73e35 100644 --- a/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Material/MaterialDecompilingDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::material +namespace material { - class DecompilingGdtDumper final : public AbstractAssetDumper + class DecompilingGdtDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::material +} // namespace material diff --git a/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.cpp b/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.cpp index 995f1cf2..d3828080 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.cpp @@ -10,11 +10,10 @@ #include using namespace IW4; -using namespace ::menu; namespace { - std::string GetPathForMenu(MenuDumpingZoneState* zoneState, XAssetInfo* asset) + std::string GetPathForMenu(menu::MenuDumpingZoneState* zoneState, XAssetInfo* asset) { const auto menuDumpingState = zoneState->m_menu_dumping_state_map.find(asset->Asset()); @@ -25,14 +24,14 @@ namespace } } // namespace -namespace IW4::menu +namespace menu { - bool MenuDumper::ShouldDump(XAssetInfo* asset) + bool MenuDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void MenuDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void MenuDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* menu = asset->Asset(); auto* zoneState = context.GetZoneAssetDumperState(); @@ -42,7 +41,7 @@ namespace IW4::menu // Make sure menu paths based on menu lists are created const auto* gameAssetPool = dynamic_cast(asset->m_zone->m_pools.get()); for (auto* menuListAsset : *gameAssetPool->m_menu_list) - CreateDumpingStateForMenuList(zoneState, menuListAsset->Asset()); + CreateDumpingStateForMenuListIW4(zoneState, menuListAsset->Asset()); } const auto menuFilePath = GetPathForMenu(zoneState, asset); @@ -51,10 +50,10 @@ namespace IW4::menu if (!assetFile) return; - auto menuWriter = CreateMenuWriter(*assetFile); + auto menuWriter = CreateMenuWriterIW4(*assetFile); menuWriter->Start(); menuWriter->WriteMenu(*menu); menuWriter->End(); } -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.h b/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.h index 5567b3f6..43317e26 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Menu/MenuDumperIW4.h @@ -4,12 +4,12 @@ #include "Game/IW4/IW4.h" #include "Menu/MenuDumpingZoneState.h" -namespace IW4::menu +namespace menu { - class MenuDumper final : public AbstractAssetDumper + class MenuDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.cpp b/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.cpp index 2d2614af..7946dfe9 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.cpp @@ -13,7 +13,6 @@ namespace fs = std::filesystem; using namespace IW4; -using namespace ::menu; namespace { @@ -45,7 +44,7 @@ namespace return result; } - void DumpFunctions(IW4::menu::IWriterIW4& menuDumper, const MenuList* menuList) + void DumpFunctions(menu::IWriterIW4& menuDumper, const MenuList* menuList) { const auto allSupportingData = GetAllUniqueExpressionSupportingData(menuList); auto functionIndex = 0u; @@ -73,7 +72,7 @@ namespace } } - void DumpMenus(IW4::menu::IWriterIW4& menuDumper, ::menu::MenuDumpingZoneState* zoneState, const MenuList* menuList) + void DumpMenus(menu::IWriterIW4& menuDumper, menu::MenuDumpingZoneState* zoneState, const MenuList* menuList) { for (auto menuNum = 0; menuNum < menuList->menuCount; menuNum++) { @@ -108,9 +107,9 @@ namespace } } // namespace -namespace IW4::menu +namespace menu { - void CreateDumpingStateForMenuList(::menu::MenuDumpingZoneState* zoneState, const MenuList* menuList) + void CreateDumpingStateForMenuListIW4(MenuDumpingZoneState* zoneState, const MenuList* menuList) { if (menuList->menuCount <= 0 || menuList->menus == nullptr || menuList->name == nullptr) return; @@ -148,12 +147,12 @@ namespace IW4::menu } } - bool MenuListDumper::ShouldDump(XAssetInfo* asset) + bool MenuListDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void MenuListDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void MenuListDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* menuList = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -163,7 +162,7 @@ namespace IW4::menu auto* zoneState = context.GetZoneAssetDumperState(); - auto menuWriter = CreateMenuWriter(*assetFile); + auto menuWriter = CreateMenuWriterIW4(*assetFile); menuWriter->Start(); @@ -175,13 +174,13 @@ namespace IW4::menu menuWriter->End(); } - void MenuListDumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void MenuListDumperIW4::DumpPool(AssetDumpingContext& context, AssetPool* pool) { auto* zoneState = context.GetZoneAssetDumperState(); for (auto* asset : *pool) - CreateDumpingStateForMenuList(zoneState, asset->Asset()); + CreateDumpingStateForMenuListIW4(zoneState, asset->Asset()); AbstractAssetDumper::DumpPool(context, pool); } -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.h b/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.h index 891ba458..b9329966 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Menu/MenuListDumperIW4.h @@ -5,17 +5,17 @@ #include "Game/IW4/Menu/MenuDumperIW4.h" #include "Menu/MenuDumpingZoneState.h" -namespace IW4::menu +namespace menu { - void CreateDumpingStateForMenuList(::menu::MenuDumpingZoneState* zoneState, const MenuList* menuList); + void CreateDumpingStateForMenuListIW4(MenuDumpingZoneState* zoneState, const IW4::MenuList* menuList); - class MenuListDumper final : public AbstractAssetDumper + class MenuListDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.cpp b/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.cpp index ad19833b..b20cec15 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.cpp +++ b/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.cpp @@ -54,7 +54,7 @@ namespace return statementEnd; } - class MenuWriter final : public ::menu::AbstractBaseWriter, public IW4::menu::IWriterIW4 + class MenuWriter final : public ::menu::AbstractBaseWriter, public menu::IWriterIW4 { public: explicit MenuWriter(std::ostream& stream) @@ -948,10 +948,10 @@ namespace }; } // namespace -namespace IW4::menu +namespace menu { - std::unique_ptr CreateMenuWriter(std::ostream& stream) + std::unique_ptr CreateMenuWriterIW4(std::ostream& stream) { return std::make_unique(stream); } -} // namespace IW4::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.h b/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.h index 5c198f80..3988bbb3 100644 --- a/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.h +++ b/src/ObjWriting/Game/IW4/Menu/MenuWriterIW4.h @@ -6,14 +6,14 @@ #include #include -namespace IW4::menu +namespace menu { - class IWriterIW4 : public ::menu::IWriter + class IWriterIW4 : public IWriter { public: - virtual void WriteFunctionDef(const std::string& functionName, const Statement_s* statement) = 0; - virtual void WriteMenu(const menuDef_t& menu) = 0; + virtual void WriteFunctionDef(const std::string& functionName, const IW4::Statement_s* statement) = 0; + virtual void WriteMenu(const IW4::menuDef_t& menu) = 0; }; - std::unique_ptr CreateMenuWriter(std::ostream& stream); -} // namespace IW4::menu + std::unique_ptr CreateMenuWriterIW4(std::ostream& stream); +} // namespace menu diff --git a/src/ObjWriting/Game/IW4/ObjWriterIW4.cpp b/src/ObjWriting/Game/IW4/ObjWriterIW4.cpp index 0a39cf0e..b749a985 100644 --- a/src/ObjWriting/Game/IW4/ObjWriterIW4.cpp +++ b/src/ObjWriting/Game/IW4/ObjWriterIW4.cpp @@ -39,21 +39,21 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const const auto* assetPools = dynamic_cast(context.m_zone.m_pools.get()); - DUMP_ASSET_POOL(phys_preset::InfoStringDumper, m_phys_preset, ASSET_TYPE_PHYSPRESET) - DUMP_ASSET_POOL(phys_collmap::Dumper, m_phys_collmap, ASSET_TYPE_PHYSCOLLMAP) + DUMP_ASSET_POOL(phys_preset::InfoStringDumperIW4, m_phys_preset, ASSET_TYPE_PHYSPRESET) + DUMP_ASSET_POOL(phys_collmap::DumperIW4, m_phys_collmap, ASSET_TYPE_PHYSCOLLMAP) // DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS) - DUMP_ASSET_POOL(xmodel::Dumper, m_xmodel, ASSET_TYPE_XMODEL) - DUMP_ASSET_POOL(material::JsonDumper, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(xmodel::DumperIW4, m_xmodel, ASSET_TYPE_XMODEL) + DUMP_ASSET_POOL(material::JsonDumperIW4, m_material, ASSET_TYPE_MATERIAL) #ifdef EXPERIMENTAL_MATERIAL_COMPILATION - DUMP_ASSET_POOL(material::DecompilingGdtDumper, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(material::DecompilingGdtDumperIW4, m_material, ASSET_TYPE_MATERIAL) #endif - DUMP_ASSET_POOL(shader::PixelShaderDumper, m_material_pixel_shader, ASSET_TYPE_PIXELSHADER) - DUMP_ASSET_POOL(shader::VertexShaderDumper, m_material_vertex_shader, ASSET_TYPE_VERTEXSHADER) - DUMP_ASSET_POOL(techset::Dumper, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) - DUMP_ASSET_POOL(image::Dumper, m_image, ASSET_TYPE_IMAGE) + DUMP_ASSET_POOL(shader::PixelShaderDumperIW4, m_material_pixel_shader, ASSET_TYPE_PIXELSHADER) + DUMP_ASSET_POOL(shader::VertexShaderDumperIW4, m_material_vertex_shader, ASSET_TYPE_VERTEXSHADER) + DUMP_ASSET_POOL(techset::DumperIW4, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) + DUMP_ASSET_POOL(image::DumperIW4, m_image, ASSET_TYPE_IMAGE) // DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND) - DUMP_ASSET_POOL(sound_curve::Dumper, m_sound_curve, ASSET_TYPE_SOUND_CURVE) - DUMP_ASSET_POOL(sound::LoadedSoundDumper, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) + DUMP_ASSET_POOL(sound_curve::DumperIW4, m_sound_curve, ASSET_TYPE_SOUND_CURVE) + DUMP_ASSET_POOL(sound::LoadedSoundDumperIW4, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) // DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP_MP) // DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD) // DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP) @@ -61,22 +61,22 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS) // DUMP_ASSET_POOL(AssetDumperFxWorld, m_fx_world, ASSET_TYPE_FXWORLD) // DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD) - DUMP_ASSET_POOL(light_def::Dumper, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF) + DUMP_ASSET_POOL(light_def::DumperIW4, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF) // DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT) - DUMP_ASSET_POOL(menu::MenuListDumper, m_menu_list, ASSET_TYPE_MENULIST) - DUMP_ASSET_POOL(menu::MenuDumper, m_menu_def, ASSET_TYPE_MENU) - DUMP_ASSET_POOL(localize::Dumper, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) - DUMP_ASSET_POOL(weapon::Dumper, m_weapon, ASSET_TYPE_WEAPON) + DUMP_ASSET_POOL(menu::MenuListDumperIW4, m_menu_list, ASSET_TYPE_MENULIST) + DUMP_ASSET_POOL(menu::MenuDumperIW4, m_menu_def, ASSET_TYPE_MENU) + DUMP_ASSET_POOL(localize::DumperIW4, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) + DUMP_ASSET_POOL(weapon::DumperIW4, m_weapon, ASSET_TYPE_WEAPON) // DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS) // DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX) // DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX) - DUMP_ASSET_POOL(raw_file::Dumper, m_raw_file, ASSET_TYPE_RAWFILE) - DUMP_ASSET_POOL(string_table::Dumper, m_string_table, ASSET_TYPE_STRINGTABLE) - DUMP_ASSET_POOL(leaderboard::JsonDumper, m_leaderboard, ASSET_TYPE_LEADERBOARD) - DUMP_ASSET_POOL(structured_data_def::Dumper, m_structed_data_def_set, ASSET_TYPE_STRUCTURED_DATA_DEF) - DUMP_ASSET_POOL(tracer::Dumper, m_tracer, ASSET_TYPE_TRACER) - DUMP_ASSET_POOL(vehicle::Dumper, m_vehicle, ASSET_TYPE_VEHICLE) - DUMP_ASSET_POOL(addon_map_ents::Dumper, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS) + DUMP_ASSET_POOL(raw_file::DumperIW4, m_raw_file, ASSET_TYPE_RAWFILE) + DUMP_ASSET_POOL(string_table::DumperIW4, m_string_table, ASSET_TYPE_STRINGTABLE) + DUMP_ASSET_POOL(leaderboard::JsonDumperIW4, m_leaderboard, ASSET_TYPE_LEADERBOARD) + DUMP_ASSET_POOL(structured_data_def::DumperIW4, m_structed_data_def_set, ASSET_TYPE_STRUCTURED_DATA_DEF) + DUMP_ASSET_POOL(tracer::DumperIW4, m_tracer, ASSET_TYPE_TRACER) + DUMP_ASSET_POOL(vehicle::DumperIW4, m_vehicle, ASSET_TYPE_VEHICLE) + DUMP_ASSET_POOL(addon_map_ents::DumperIW4, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS) return true; diff --git a/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.cpp b/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.cpp index 046a9c5e..523c64c8 100644 --- a/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.cpp @@ -7,19 +7,18 @@ #include using namespace IW4; -using namespace ::phys_collmap; -namespace IW4::phys_collmap +namespace phys_collmap { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* physCollmap = asset->Asset(); - const auto assetFile = context.OpenAssetFile(GetFileNameForAssetName(asset->m_name)); + const auto assetFile = context.OpenAssetFile(phys_collmap::GetFileNameForAssetName(asset->m_name)); if (!assetFile) return; @@ -80,4 +79,4 @@ namespace IW4::phys_collmap mapFileDumper.EndEntity(); } -} // namespace IW4::phys_collmap +} // namespace phys_collmap diff --git a/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.h b/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.h index 2407233e..4dbf68d6 100644 --- a/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.h +++ b/src/ObjWriting/Game/IW4/PhysCollmap/PhysCollmapDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::phys_collmap +namespace phys_collmap { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::phys_collmap +} // namespace phys_collmap diff --git a/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.cpp b/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.cpp index 734bd8d8..41ac1f64 100644 --- a/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.cpp @@ -11,7 +11,6 @@ #include using namespace IW4; -using namespace ::phys_preset; namespace { @@ -79,14 +78,14 @@ namespace } } // namespace -namespace IW4::phys_preset +namespace phys_preset { - bool InfoStringDumper::ShouldDump(XAssetInfo* asset) + bool InfoStringDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void InfoStringDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void InfoStringDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -109,4 +108,4 @@ namespace IW4::phys_preset stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.h b/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.h index 22998751..4651c1e0 100644 --- a/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.h +++ b/src/ObjWriting/Game/IW4/PhysPreset/PhysPresetInfoStringDumperIW4.h @@ -4,12 +4,12 @@ #include "Game/IW4/IW4.h" #include "InfoString/InfoString.h" -namespace IW4::phys_preset +namespace phys_preset { - class InfoStringDumper final : public AbstractAssetDumper + class InfoStringDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::phys_preset +} // namespace phys_preset diff --git a/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.cpp b/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.cpp index ec4224af..9698e608 100644 --- a/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.cpp @@ -6,14 +6,14 @@ using namespace IW4; -namespace IW4::raw_file +namespace raw_file { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* rawFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -67,4 +67,4 @@ namespace IW4::raw_file stream.write(rawFile->data.buffer, rawFile->len); } } -} // namespace IW4::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.h b/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.h index a1657fb5..9b8966ea 100644 --- a/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.h +++ b/src/ObjWriting/Game/IW4/RawFile/RawFileDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::raw_file +namespace raw_file { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.cpp b/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.cpp index bbd382fa..318c9a68 100644 --- a/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.cpp @@ -3,19 +3,18 @@ #include "Shader/ShaderCommon.h" using namespace IW4; -using namespace ::shader; -namespace IW4::shader +namespace shader { - bool PixelShaderDumper::ShouldDump(XAssetInfo* asset) + bool PixelShaderDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void PixelShaderDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void PixelShaderDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* pixelShader = asset->Asset(); - const auto shaderFile = context.OpenAssetFile(GetFileNameForPixelShaderAssetName(asset->m_name)); + const auto shaderFile = context.OpenAssetFile(shader::GetFileNameForPixelShaderAssetName(asset->m_name)); if (!shaderFile) return; @@ -23,4 +22,4 @@ namespace IW4::shader shaderFile->write(reinterpret_cast(pixelShader->prog.loadDef.program), static_cast(pixelShader->prog.loadDef.programSize) * 4u); } -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.h b/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.h index 875576ca..01404d0a 100644 --- a/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Shader/PixelShaderDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::shader +namespace shader { - class PixelShaderDumper final : public AbstractAssetDumper + class PixelShaderDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.cpp b/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.cpp index 3dacbc04..c3954562 100644 --- a/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.cpp @@ -3,19 +3,18 @@ #include "Shader/ShaderCommon.h" using namespace IW4; -using namespace ::shader; -namespace IW4::shader +namespace shader { - bool VertexShaderDumper::ShouldDump(XAssetInfo* asset) + bool VertexShaderDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void VertexShaderDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void VertexShaderDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* vertexShader = asset->Asset(); - const auto shaderFile = context.OpenAssetFile(GetFileNameForVertexShaderAssetName(asset->m_name)); + const auto shaderFile = context.OpenAssetFile(shader::GetFileNameForVertexShaderAssetName(asset->m_name)); if (!shaderFile) return; @@ -23,4 +22,4 @@ namespace IW4::shader shaderFile->write(reinterpret_cast(vertexShader->prog.loadDef.program), static_cast(vertexShader->prog.loadDef.programSize) * 4u); } -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.h b/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.h index 6f24fce7..1b722461 100644 --- a/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Shader/VertexShaderDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::shader +namespace shader { - class VertexShaderDumper final : public AbstractAssetDumper + class VertexShaderDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::shader +} // namespace shader diff --git a/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.cpp b/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.cpp index 8a363418..8a2c6360 100644 --- a/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.cpp @@ -22,14 +22,14 @@ namespace } } // namespace -namespace IW4::sound +namespace sound { - bool LoadedSoundDumper::ShouldDump(XAssetInfo* asset) + bool LoadedSoundDumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void LoadedSoundDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void LoadedSoundDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* loadedSound = asset->Asset(); const auto assetFile = context.OpenAssetFile(std::format("sound/{}", asset->m_name)); @@ -49,4 +49,4 @@ namespace IW4::sound break; } } -} // namespace IW4::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.h b/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.h index 2799152c..7256bc88 100644 --- a/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Sound/LoadedSoundDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::sound +namespace sound { - class LoadedSoundDumper final : public AbstractAssetDumper + class LoadedSoundDumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.cpp b/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.cpp index 69b51223..b7e00629 100644 --- a/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.cpp @@ -6,16 +6,15 @@ #include using namespace IW4; -using namespace ::sound_curve; -namespace IW4::sound_curve +namespace sound_curve { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* sndCurve = asset->Asset(); @@ -32,4 +31,4 @@ namespace IW4::sound_curve for (auto i = 0u; i < knotCount; i++) dumper.WriteKnot(sndCurve->knots[i][0], sndCurve->knots[i][1]); } -} // namespace IW4::sound_curve +} // namespace sound_curve diff --git a/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.h b/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.h index 85ff48a1..241b7a79 100644 --- a/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Sound/SndCurveDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::sound_curve +namespace sound_curve { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::sound_curve +} // namespace sound_curve diff --git a/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.cpp b/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.cpp index 7e86896a..784164e2 100644 --- a/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.cpp @@ -4,14 +4,14 @@ using namespace IW4; -namespace IW4::string_table +namespace string_table { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* stringTable = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -39,4 +39,4 @@ namespace IW4::string_table csv.NextRow(); } } -} // namespace IW4::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.h b/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.h index 2321c6ae..93f1af2b 100644 --- a/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.h +++ b/src/ObjWriting/Game/IW4/StringTable/StringTableDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::string_table +namespace string_table { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.cpp b/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.cpp index 22177b7e..2e5cf317 100644 --- a/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.cpp @@ -183,14 +183,14 @@ namespace } } // namespace -namespace IW4::structured_data_def +namespace structured_data_def { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* set = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -205,4 +205,4 @@ namespace IW4::structured_data_def dumper.DumpDef(*def); } } -} // namespace IW4::structured_data_def +} // namespace structured_data_def diff --git a/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.h b/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.h index da36a645..e03d8c61 100644 --- a/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.h +++ b/src/ObjWriting/Game/IW4/StructuredDataDef/StructuredDataDefDumperIW4.h @@ -6,12 +6,12 @@ #include -namespace IW4::structured_data_def +namespace structured_data_def { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::structured_data_def +} // namespace structured_data_def diff --git a/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.cpp b/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.cpp index 2fa97986..24ae8652 100644 --- a/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.cpp @@ -13,7 +13,6 @@ #include using namespace IW4; -using namespace ::techset; namespace IW4 { @@ -533,14 +532,14 @@ namespace IW4 }; } // namespace IW4 -namespace IW4::techset +namespace techset { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* techset = asset->Asset(); @@ -566,4 +565,4 @@ namespace IW4::techset } } } -} // namespace IW4::techset +} // namespace techset diff --git a/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.h b/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.h index 97535e3e..8115f527 100644 --- a/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Techset/TechsetDumperIW4.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW4/IW4.h" -namespace IW4::techset +namespace techset { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::techset +} // namespace techset diff --git a/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.cpp b/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.cpp index 1cf1eb84..2e3635f8 100644 --- a/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.cpp @@ -11,7 +11,6 @@ #include using namespace IW4; -using namespace ::tracer; namespace { @@ -51,14 +50,14 @@ namespace } } // namespace -namespace IW4::tracer +namespace tracer { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -81,4 +80,4 @@ namespace IW4::tracer stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace IW4::tracer +} // namespace tracer diff --git a/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.h b/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.h index 5beb2809..d13a9f60 100644 --- a/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Tracer/TracerDumperIW4.h @@ -4,12 +4,12 @@ #include "Game/IW4/IW4.h" #include "InfoString/InfoString.h" -namespace IW4::tracer +namespace tracer { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::tracer +} // namespace tracer diff --git a/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.cpp b/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.cpp index 137c30de..9110b559 100644 --- a/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.cpp @@ -12,7 +12,6 @@ #include using namespace IW4; -using namespace ::vehicle; namespace { @@ -92,14 +91,14 @@ namespace } } // namespace -namespace IW4::vehicle +namespace vehicle { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -122,4 +121,4 @@ namespace IW4::vehicle stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace IW4::vehicle +} // namespace vehicle diff --git a/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.h b/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.h index c4c230e2..5afae348 100644 --- a/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Vehicle/VehicleDumperIW4.h @@ -4,12 +4,12 @@ #include "Game/IW4/IW4.h" #include "InfoString/InfoString.h" -namespace IW4::vehicle +namespace vehicle { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::vehicle +} // namespace vehicle diff --git a/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.cpp b/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.cpp index 7fce3396..1ebabfe7 100644 --- a/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.cpp +++ b/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.cpp @@ -14,7 +14,6 @@ #include using namespace IW4; -using namespace ::weapon; namespace { @@ -404,14 +403,14 @@ namespace } } // namespace -namespace IW4::weapon +namespace weapon { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW4::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -436,4 +435,4 @@ namespace IW4::weapon DumpAccuracyGraphs(context, asset); } -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.h b/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.h index 0beff65e..d6935e77 100644 --- a/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.h +++ b/src/ObjWriting/Game/IW4/Weapon/WeaponDumperIW4.h @@ -4,12 +4,12 @@ #include "Game/IW4/IW4.h" #include "InfoString/InfoString.h" -namespace IW4::weapon +namespace weapon { - class Dumper final : public AbstractAssetDumper + class DumperIW4 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW4::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.cpp b/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.cpp index cbb596c1..e25b8227 100644 --- a/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.cpp @@ -12,7 +12,6 @@ #include using namespace IW5; -using namespace ::image; namespace { @@ -38,7 +37,7 @@ namespace std::unique_ptr LoadImageFromIwi(const GfxImage& image, ISearchPath& searchPath) { - const auto imageFileName = std::format("images/{}.iwi", image.name); + const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi"); const auto filePathImage = searchPath.Open(imageFileName); if (!filePathImage.IsOpen()) { @@ -58,9 +57,9 @@ namespace } } // namespace -namespace IW5::image +namespace image { - Dumper::Dumper() + DumperIW5::DumperIW5() { switch (ObjWriting::Configuration.ImageOutputFormat) { @@ -77,12 +76,12 @@ namespace IW5::image } } - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* image = asset->Asset(); const auto texture = LoadImageData(context.m_obj_search_path, *image); @@ -97,4 +96,4 @@ namespace IW5::image auto& stream = *assetFile; m_writer->DumpImage(stream, texture.get()); } -} // namespace IW5::image +} // namespace image diff --git a/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.h b/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.h index ff6edf39..414465aa 100644 --- a/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Image/ImageDumperIW5.h @@ -6,18 +6,18 @@ #include -namespace IW5::image +namespace image { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { public: - Dumper(); + DumperIW5(); protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; private: std::unique_ptr m_writer; }; -} // namespace IW5::image +} // namespace image diff --git a/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.cpp b/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.cpp index ced74ca0..f79ea849 100644 --- a/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.cpp @@ -10,7 +10,6 @@ using namespace nlohmann; using namespace IW5; -using namespace ::leaderboard; namespace { @@ -93,14 +92,14 @@ namespace }; } // namespace -namespace IW5::leaderboard +namespace leaderboard { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAsset(asset->m_name)); @@ -110,4 +109,4 @@ namespace IW5::leaderboard Dumper dumper(*assetFile); dumper.Dump(*asset->Asset()); } -} // namespace IW5::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.h b/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.h index 88b32415..3e6ff7f8 100644 --- a/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Leaderboard/LeaderboardJsonDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::leaderboard +namespace leaderboard { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperIW5 final : public AbstractAssetDumper { protected: - [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.cpp b/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.cpp index f29817a2..c8b7b0d0 100644 --- a/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.cpp @@ -8,9 +8,9 @@ using namespace IW5; -namespace IW5::localize +namespace localize { - void Dumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void DumperIW5::DumpPool(AssetDumpingContext& context, AssetPool* pool) { if (pool->m_asset_lookup.empty()) return; @@ -41,4 +41,4 @@ namespace IW5::localize std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name); } } -} // namespace IW5::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.h b/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.h index 91cfdee3..26373073 100644 --- a/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Localize/LocalizeDumperIW5.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::localize +namespace localize { - class Dumper final : public IAssetDumper + class DumperIW5 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace IW5::localize +} // namespace localize diff --git a/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.cpp b/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.cpp index 5c2cc0c4..3facfa1c 100644 --- a/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.cpp @@ -5,14 +5,14 @@ using namespace IW5; -namespace IW5::addon_map_ents +namespace addon_map_ents { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* addonMapEnts = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -23,4 +23,4 @@ namespace IW5::addon_map_ents auto& stream = *assetFile; stream.write(addonMapEnts->entityString, std::max(addonMapEnts->numEntityChars - 1, 0)); } -} // namespace IW5::addon_map_ents +} // namespace addon_map_ents diff --git a/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.h b/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.h index 928fc8e1..6c251086 100644 --- a/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Maps/AddonMapEntsDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::addon_map_ents +namespace addon_map_ents { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::addon_map_ents +} // namespace addon_map_ents diff --git a/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.cpp b/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.cpp index 713006b4..2abe44a0 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.cpp @@ -49,14 +49,14 @@ namespace } } // namespace -namespace IW5::menu +namespace menu { - bool MenuDumper::ShouldDump(XAssetInfo* asset) + bool MenuDumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void MenuDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void MenuDumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* menu = asset->Asset(); const auto menuFilePath = GetPathForMenu(asset); @@ -74,10 +74,10 @@ namespace IW5::menu if (!assetFile) return; - auto menuWriter = CreateMenuWriter(*assetFile); + auto menuWriter = CreateMenuWriterIW5(*assetFile); menuWriter->Start(); menuWriter->WriteMenu(*menu); menuWriter->End(); } -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.h b/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.h index e5bd12ad..03577fcb 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Menu/MenuDumperIW5.h @@ -4,12 +4,12 @@ #include "Game/IW5/IW5.h" #include "Game/IW5/Menu/MenuDumperIW5.h" -namespace IW5::menu +namespace menu { - class MenuDumper final : public AbstractAssetDumper + class MenuDumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.cpp b/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.cpp index 8806de3b..9a1d674c 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.cpp @@ -45,7 +45,7 @@ namespace return result; } - void DumpFunctions(IW5::menu::IWriterIW5& menuDumper, const MenuList* menuList) + void DumpFunctions(menu::IWriterIW5& menuDumper, const MenuList* menuList) { const auto allSupportingData = GetAllUniqueExpressionSupportingData(menuList); auto functionIndex = 0u; @@ -70,7 +70,7 @@ namespace } } - void DumpMenus(IW5::menu::IWriterIW5& menuDumper, const MenuList* menuList) + void DumpMenus(menu::IWriterIW5& menuDumper, const MenuList* menuList) { const fs::path p(menuList->name); @@ -104,14 +104,14 @@ namespace } } // namespace -namespace IW5::menu +namespace menu { - bool MenuListDumper::ShouldDump(XAssetInfo* asset) + bool MenuListDumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void MenuListDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void MenuListDumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* menuList = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -119,7 +119,7 @@ namespace IW5::menu if (!assetFile) return; - auto menuWriter = CreateMenuWriter(*assetFile); + auto menuWriter = CreateMenuWriterIW5(*assetFile); menuWriter->Start(); @@ -130,4 +130,4 @@ namespace IW5::menu menuWriter->End(); } -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.h b/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.h index 29daedb6..d4da415f 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Menu/MenuListDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::menu +namespace menu { - class MenuListDumper final : public AbstractAssetDumper + class MenuListDumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.cpp b/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.cpp index 1ef3c4cb..72a9307c 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.cpp +++ b/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.cpp @@ -57,7 +57,7 @@ namespace namespace { - class MenuWriter final : public ::menu::AbstractBaseWriter, public IW5::menu::IWriterIW5 + class MenuWriter final : public menu::AbstractBaseWriter, public menu::IWriterIW5 { public: explicit MenuWriter(std::ostream& stream) @@ -948,10 +948,10 @@ namespace }; } // namespace -namespace IW5::menu +namespace menu { - std::unique_ptr CreateMenuWriter(std::ostream& stream) + std::unique_ptr CreateMenuWriterIW5(std::ostream& stream) { return std::make_unique(stream); } -} // namespace IW5::menu +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.h b/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.h index eb9fe690..dbf6428a 100644 --- a/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.h +++ b/src/ObjWriting/Game/IW5/Menu/MenuWriterIW5.h @@ -6,14 +6,14 @@ #include #include -namespace IW5::menu +namespace menu { - class IWriterIW5 : public ::menu::IWriter + class IWriterIW5 : public IWriter { public: - virtual void WriteFunctionDef(const std::string& functionName, const Statement_s* statement) = 0; - virtual void WriteMenu(const menuDef_t& menu) = 0; + virtual void WriteFunctionDef(const std::string& functionName, const IW5::Statement_s* statement) = 0; + virtual void WriteMenu(const IW5::menuDef_t& menu) = 0; }; - std::unique_ptr CreateMenuWriter(std::ostream& stream); -} // namespace IW5::menu + std::unique_ptr CreateMenuWriterIW5(std::ostream& stream); +} // namespace menu diff --git a/src/ObjWriting/Game/IW5/ObjWriterIW5.cpp b/src/ObjWriting/Game/IW5/ObjWriterIW5.cpp index 536f7935..4cbd3f31 100644 --- a/src/ObjWriting/Game/IW5/ObjWriterIW5.cpp +++ b/src/ObjWriting/Game/IW5/ObjWriterIW5.cpp @@ -33,16 +33,16 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap, ASSET_TYPE_PHYSCOLLMAP) // DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS) // DUMP_ASSET_POOL(AssetDumperXModelSurfs, m_xmodel_surfs, ASSET_TYPE_XMODEL_SURFS) - DUMP_ASSET_POOL(xmodel::Dumper, m_xmodel, ASSET_TYPE_XMODEL) - DUMP_ASSET_POOL(material::JsonDumper, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(xmodel::DumperIW5, m_xmodel, ASSET_TYPE_XMODEL) + DUMP_ASSET_POOL(material::JsonDumperIW5, m_material, ASSET_TYPE_MATERIAL) // DUMP_ASSET_POOL(AssetDumperMaterialPixelShader, m_material_pixel_shader, ASSET_TYPE_PIXELSHADER) // DUMP_ASSET_POOL(AssetDumperMaterialVertexShader, m_material_vertex_shader, ASSET_TYPE_VERTEXSHADER) // DUMP_ASSET_POOL(AssetDumperMaterialVertexDeclaration, m_material_vertex_decl, ASSET_TYPE_VERTEXDECL) // DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) - DUMP_ASSET_POOL(image::Dumper, m_image, ASSET_TYPE_IMAGE) + DUMP_ASSET_POOL(image::DumperIW5, m_image, ASSET_TYPE_IMAGE) // DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND) // DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve, ASSET_TYPE_SOUND_CURVE) - DUMP_ASSET_POOL(sound::LoadedSoundDumper, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) + DUMP_ASSET_POOL(sound::LoadedSoundDumperIW5, m_loaded_sound, ASSET_TYPE_LOADED_SOUND) // DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map, ASSET_TYPE_CLIPMAP) // DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD) // DUMP_ASSET_POOL(AssetDumperGlassWorld, m_glass_world, ASSET_TYPE_GLASSWORLD) @@ -53,22 +53,22 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD) // DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF) // DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT) - DUMP_ASSET_POOL(menu::MenuListDumper, m_menu_list, ASSET_TYPE_MENULIST) - DUMP_ASSET_POOL(menu::MenuDumper, m_menu_def, ASSET_TYPE_MENU) - DUMP_ASSET_POOL(localize::Dumper, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) - DUMP_ASSET_POOL(attachment::JsonDumper, m_attachment, ASSET_TYPE_ATTACHMENT) - DUMP_ASSET_POOL(weapon::Dumper, m_weapon, ASSET_TYPE_WEAPON) + DUMP_ASSET_POOL(menu::MenuListDumperIW5, m_menu_list, ASSET_TYPE_MENULIST) + DUMP_ASSET_POOL(menu::MenuDumperIW5, m_menu_def, ASSET_TYPE_MENU) + DUMP_ASSET_POOL(localize::DumperIW5, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) + DUMP_ASSET_POOL(attachment::JsonDumperIW5, m_attachment, ASSET_TYPE_ATTACHMENT) + DUMP_ASSET_POOL(weapon::DumperIW5, m_weapon, ASSET_TYPE_WEAPON) // DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX) // DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX) // DUMP_ASSET_POOL(AssetDumperSurfaceFxTable, m_surface_fx_table, ASSET_TYPE_SURFACE_FX) - DUMP_ASSET_POOL(raw_file::Dumper, m_raw_file, ASSET_TYPE_RAWFILE) - DUMP_ASSET_POOL(script::Dumper, m_script_file, ASSET_TYPE_SCRIPTFILE) - DUMP_ASSET_POOL(string_table::Dumper, m_string_table, ASSET_TYPE_STRINGTABLE) - DUMP_ASSET_POOL(leaderboard::JsonDumper, m_leaderboard, ASSET_TYPE_LEADERBOARD) + DUMP_ASSET_POOL(raw_file::DumperIW5, m_raw_file, ASSET_TYPE_RAWFILE) + DUMP_ASSET_POOL(script::DumperIW5, m_script_file, ASSET_TYPE_SCRIPTFILE) + DUMP_ASSET_POOL(string_table::DumperIW5, m_string_table, ASSET_TYPE_STRINGTABLE) + DUMP_ASSET_POOL(leaderboard::JsonDumperIW5, m_leaderboard, ASSET_TYPE_LEADERBOARD) // DUMP_ASSET_POOL(AssetDumperStructuredDataDefSet, m_structed_data_def_set, ASSET_TYPE_STRUCTURED_DATA_DEF) // DUMP_ASSET_POOL(AssetDumperTracerDef, m_tracer, ASSET_TYPE_TRACER) // DUMP_ASSET_POOL(AssetDumperVehicleDef, m_vehicle, ASSET_TYPE_VEHICLE) - DUMP_ASSET_POOL(addon_map_ents::Dumper, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS) + DUMP_ASSET_POOL(addon_map_ents::DumperIW5, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS) return true; diff --git a/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.cpp b/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.cpp index ba444e30..71ca717b 100644 --- a/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.cpp @@ -6,14 +6,14 @@ using namespace IW5; -namespace IW5::raw_file +namespace raw_file { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* rawFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -62,4 +62,4 @@ namespace IW5::raw_file inflateEnd(&zs); } -} // namespace IW5::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.h b/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.h index b3fff52f..ed2ceb4f 100644 --- a/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.h +++ b/src/ObjWriting/Game/IW5/RawFile/RawFileDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::raw_file +namespace raw_file { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.cpp b/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.cpp index c81ba1d4..d334cb1c 100644 --- a/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.cpp @@ -2,15 +2,15 @@ using namespace IW5; -namespace IW5::script +namespace script { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } // See https://github.com/xensik/gsc-tool#file-format for an in-depth explanation about the .gscbin format - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { auto* scriptFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name + ".gscbin"); @@ -30,4 +30,4 @@ namespace IW5::script stream.write(scriptFile->buffer, scriptFile->compressedLen); stream.write(reinterpret_cast(scriptFile->bytecode), scriptFile->bytecodeLen); } -} // namespace IW5::script +} // namespace script diff --git a/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.h b/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.h index 7a3dce2b..e1220f5f 100644 --- a/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Script/ScriptDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::script +namespace script { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::script +} // namespace script diff --git a/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.cpp b/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.cpp index 8feae9b7..8deec609 100644 --- a/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.cpp @@ -22,14 +22,14 @@ namespace } } // namespace -namespace IW5::sound +namespace sound { - bool LoadedSoundDumper::ShouldDump(XAssetInfo* asset) + bool LoadedSoundDumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void LoadedSoundDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void LoadedSoundDumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* loadedSound = asset->Asset(); const auto assetFile = context.OpenAssetFile(std::format("sound/{}", asset->m_name)); @@ -49,4 +49,4 @@ namespace IW5::sound break; } } -} // namespace IW5::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.h b/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.h index 9758b545..8079f27d 100644 --- a/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Sound/LoadedSoundDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::sound +namespace sound { - class LoadedSoundDumper final : public AbstractAssetDumper + class LoadedSoundDumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::sound +} // namespace sound diff --git a/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.cpp b/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.cpp index 023013c1..2bd7fa00 100644 --- a/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.cpp @@ -4,14 +4,14 @@ using namespace IW5; -namespace IW5::string_table +namespace string_table { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* stringTable = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -39,4 +39,4 @@ namespace IW5::string_table csv.NextRow(); } } -} // namespace IW5::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.h b/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.h index fe6d5e4c..e826dfd0 100644 --- a/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.h +++ b/src/ObjWriting/Game/IW5/StringTable/StringTableDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::string_table +namespace string_table { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.cpp b/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.cpp index 763e96fe..c44f99a2 100644 --- a/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.cpp @@ -9,7 +9,6 @@ using namespace nlohmann; using namespace IW5; -using namespace ::attachment; namespace { @@ -394,14 +393,14 @@ namespace }; } // namespace -namespace IW5::attachment +namespace attachment { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAssetName(asset->m_name)); @@ -411,4 +410,4 @@ namespace IW5::attachment const JsonDumperImpl dumper(context, *assetFile); dumper.Dump(asset->Asset()); } -} // namespace IW5::attachment +} // namespace attachment diff --git a/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.h b/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.h index 26547be9..81088a63 100644 --- a/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Weapon/AttachmentJsonDumperIW5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/IW5/IW5.h" -namespace IW5::attachment +namespace attachment { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::attachment +} // namespace attachment diff --git a/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.cpp b/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.cpp index adc4b899..67ab7628 100644 --- a/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.cpp +++ b/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.cpp @@ -15,7 +15,6 @@ #include using namespace IW5; -using namespace ::weapon; namespace { @@ -732,14 +731,14 @@ namespace } } // namespace -namespace IW5::weapon +namespace weapon { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperIW5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperIW5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // TODO: only dump infostring fields when non-default @@ -766,4 +765,4 @@ namespace IW5::weapon DumpAccuracyGraphs(context, asset); } -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.h b/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.h index 4a33e035..3e80c669 100644 --- a/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.h +++ b/src/ObjWriting/Game/IW5/Weapon/WeaponDumperIW5.h @@ -4,12 +4,12 @@ #include "Game/IW5/IW5.h" #include "InfoString/InfoString.h" -namespace IW5::weapon +namespace weapon { - class Dumper final : public AbstractAssetDumper + class DumperIW5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace IW5::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/T5/Image/ImageDumperT5.cpp b/src/ObjWriting/Game/T5/Image/ImageDumperT5.cpp index a0ba1d0a..d8992797 100644 --- a/src/ObjWriting/Game/T5/Image/ImageDumperT5.cpp +++ b/src/ObjWriting/Game/T5/Image/ImageDumperT5.cpp @@ -12,7 +12,6 @@ #include using namespace T5; -using namespace ::image; namespace { @@ -37,7 +36,7 @@ namespace std::unique_ptr LoadImageFromIwi(const GfxImage& image, ISearchPath& searchPath) { - const auto imageFileName = std::format("images/{}.iwi", image.name); + const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi"); const auto filePathImage = searchPath.Open(imageFileName); if (!filePathImage.IsOpen()) { @@ -57,9 +56,9 @@ namespace } } // namespace -namespace T5::image +namespace image { - Dumper::Dumper() + DumperT5::DumperT5() { switch (ObjWriting::Configuration.ImageOutputFormat) { @@ -76,12 +75,12 @@ namespace T5::image } } - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* image = asset->Asset(); const auto texture = LoadImageData(context.m_obj_search_path, *image); @@ -96,4 +95,4 @@ namespace T5::image auto& stream = *assetFile; m_writer->DumpImage(stream, texture.get()); } -} // namespace T5::image +} // namespace image diff --git a/src/ObjWriting/Game/T5/Image/ImageDumperT5.h b/src/ObjWriting/Game/T5/Image/ImageDumperT5.h index 82581dde..0be6b9bb 100644 --- a/src/ObjWriting/Game/T5/Image/ImageDumperT5.h +++ b/src/ObjWriting/Game/T5/Image/ImageDumperT5.h @@ -6,18 +6,18 @@ #include -namespace T5::image +namespace image { - class Dumper final : public AbstractAssetDumper + class DumperT5 final : public AbstractAssetDumper { public: - Dumper(); + DumperT5(); protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; private: std::unique_ptr m_writer; }; -} // namespace T5::image +} // namespace image diff --git a/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.cpp b/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.cpp index 5da3d791..60f3ca58 100644 --- a/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.cpp +++ b/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.cpp @@ -8,9 +8,9 @@ using namespace T5; -namespace T5::localize +namespace localize { - void Dumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void DumperT5::DumpPool(AssetDumpingContext& context, AssetPool* pool) { if (pool->m_asset_lookup.empty()) return; @@ -41,4 +41,4 @@ namespace T5::localize std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name); } } -} // namespace T5::localize +} // namespace localize diff --git a/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.h b/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.h index e317d37d..321a9aef 100644 --- a/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.h +++ b/src/ObjWriting/Game/T5/Localize/LocalizeDumperT5.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T5/T5.h" -namespace T5::localize +namespace localize { - class Dumper final : public IAssetDumper + class DumperT5 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace T5::localize +} // namespace localize diff --git a/src/ObjWriting/Game/T5/ObjWriterT5.cpp b/src/ObjWriting/Game/T5/ObjWriterT5.cpp index 2c5a3a2e..208f14ba 100644 --- a/src/ObjWriting/Game/T5/ObjWriterT5.cpp +++ b/src/ObjWriting/Game/T5/ObjWriterT5.cpp @@ -26,10 +26,10 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints, ASSET_TYPE_PHYSCONSTRAINTS) // DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def, ASSET_TYPE_DESTRUCTIBLEDEF) // DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS) - DUMP_ASSET_POOL(xmodel::Dumper, m_xmodel, ASSET_TYPE_XMODEL) - DUMP_ASSET_POOL(material::JsonDumper, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(xmodel::DumperT5, m_xmodel, ASSET_TYPE_XMODEL) + DUMP_ASSET_POOL(material::JsonDumperT5, m_material, ASSET_TYPE_MATERIAL) // DUMP_ASSET_POOL(AssetDumperTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) - DUMP_ASSET_POOL(image::Dumper, m_image, ASSET_TYPE_IMAGE) + DUMP_ASSET_POOL(image::DumperT5, m_image, ASSET_TYPE_IMAGE) // DUMP_ASSET_POOL(AssetDumperSndBank, m_sound_bank, ASSET_TYPE_SOUND) // DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch, ASSET_TYPE_SOUND_PATCH) // DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP_PVS) @@ -42,13 +42,13 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const // DUMP_ASSET_POOL(AssetDumperFont, m_font, ASSET_TYPE_FONT) // DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST) // DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def, ASSET_TYPE_MENU) - DUMP_ASSET_POOL(localize::Dumper, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) + DUMP_ASSET_POOL(localize::DumperT5, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) // DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON) // DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS) // DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX) // DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX) - DUMP_ASSET_POOL(raw_file::Dumper, m_raw_file, ASSET_TYPE_RAWFILE) - DUMP_ASSET_POOL(string_table::Dumper, m_string_table, ASSET_TYPE_STRINGTABLE) + DUMP_ASSET_POOL(raw_file::DumperT5, m_raw_file, ASSET_TYPE_RAWFILE) + DUMP_ASSET_POOL(string_table::DumperT5, m_string_table, ASSET_TYPE_STRINGTABLE) // DUMP_ASSET_POOL(AssetDumperPackIndex, m_pack_index, ASSET_TYPE_PACK_INDEX) // DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals, ASSET_TYPE_XGLOBALS) // DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl, ASSET_TYPE_DDL) diff --git a/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.cpp b/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.cpp index 5c57964a..2043098c 100644 --- a/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.cpp +++ b/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.cpp @@ -93,14 +93,14 @@ namespace } } // namespace -namespace T5::raw_file +namespace raw_file { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* rawFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -118,4 +118,4 @@ namespace T5::raw_file else stream.write(rawFile->buffer, rawFile->len); } -} // namespace T5::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.h b/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.h index 2c6f6ba2..056266ae 100644 --- a/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.h +++ b/src/ObjWriting/Game/T5/RawFile/RawFileDumperT5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T5/T5.h" -namespace T5::raw_file +namespace raw_file { - class Dumper final : public AbstractAssetDumper + class DumperT5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T5::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.cpp b/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.cpp index e77ade0b..0acc3587 100644 --- a/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.cpp +++ b/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.cpp @@ -4,14 +4,14 @@ using namespace T5; -namespace T5::string_table +namespace string_table { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT5::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT5::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* stringTable = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -39,4 +39,4 @@ namespace T5::string_table csv.NextRow(); } } -} // namespace T5::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.h b/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.h index c9621b4d..12ee953b 100644 --- a/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.h +++ b/src/ObjWriting/Game/T5/StringTable/StringTableDumperT5.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T5/T5.h" -namespace T5::string_table +namespace string_table { - class Dumper final : public AbstractAssetDumper + class DumperT5 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T5::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.cpp b/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.cpp index c8974ff1..95c6f1cc 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.cpp +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.cpp @@ -131,14 +131,14 @@ namespace }; } // namespace -namespace T6::font_icon +namespace font_icon { - bool CsvDumper::ShouldDump(XAssetInfo* asset) + bool CsvDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void CsvDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void CsvDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -148,4 +148,4 @@ namespace T6::font_icon Dumper dumper(*assetFile); dumper.Dump(*asset->Asset()); } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.h b/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.h index 7483dddf..aeaa8877 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.h +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconCsvDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::font_icon +namespace font_icon { - class CsvDumper final : public AbstractAssetDumper + class CsvDumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.cpp b/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.cpp index a3ec3322..9f41412b 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.cpp +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.cpp @@ -7,14 +7,14 @@ using namespace T6; // #define DUMP_FONT_ICON_AS_CSV 1 -namespace T6::font_icon +namespace font_icon { - std::unique_ptr> CreateDumper() + std::unique_ptr> CreateDumperT6() { #ifdef DUMP_FONT_ICON_AS_CSV - return std::make_unique(); + return std::make_unique(); #else - return std::make_unique(); + return std::make_unique(); #endif } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.h b/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.h index a9e06e13..55d048f9 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.h +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconDumperT6.h @@ -3,7 +3,9 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::font_icon +#include + +namespace font_icon { - std::unique_ptr> CreateDumper(); -} // namespace T6::font_icon + std::unique_ptr> CreateDumperT6(); +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.cpp b/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.cpp index cd3078f5..e82b3b36 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.cpp +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.cpp @@ -1,7 +1,7 @@ #include "FontIconJsonDumperT6.h" +#include "FontIcon/FontIconCommon.h" #include "Game/T6/CommonT6.h" -#include "Game/T6/FontIcon/FontIconCommonT6.h" #include "Game/T6/FontIcon/JsonFontIconT6.h" #include "KnownFontIconAliasesT6.h" @@ -76,20 +76,20 @@ namespace } } // namespace -namespace T6::font_icon +namespace font_icon { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { - const auto assetFile = context.OpenAssetFile(font_icon::GetJsonFileNameForAssetName(asset->m_name)); + const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAssetName(asset->m_name)); if (!assetFile) return; DumpFontIcon(*assetFile, *asset->Asset()); } -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.h b/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.h index ade8bf33..aa1c0017 100644 --- a/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.h +++ b/src/ObjWriting/Game/T6/FontIcon/FontIconJsonDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::font_icon +namespace font_icon { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::font_icon +} // namespace font_icon diff --git a/src/ObjWriting/Game/T6/Image/ImageDumperT6.cpp b/src/ObjWriting/Game/T6/Image/ImageDumperT6.cpp index d492a848..bb3255b2 100644 --- a/src/ObjWriting/Game/T6/Image/ImageDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Image/ImageDumperT6.cpp @@ -13,7 +13,6 @@ #include using namespace T6; -using namespace ::image; namespace { @@ -55,7 +54,7 @@ namespace } } - const auto imageFileName = std::format("images/{}.iwi", image.name); + const auto imageFileName = image::GetFileNameForAsset(image.name, ".iwi"); const auto filePathImage = searchPath.Open(imageFileName); if (!filePathImage.IsOpen()) { @@ -75,9 +74,9 @@ namespace } } // namespace -namespace T6::image +namespace image { - Dumper::Dumper() + DumperT6::DumperT6() { switch (ObjWriting::Configuration.ImageOutputFormat) { @@ -94,12 +93,12 @@ namespace T6::image } } - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* image = asset->Asset(); const auto texture = LoadImageData(context.m_obj_search_path, *image); @@ -114,4 +113,4 @@ namespace T6::image auto& stream = *assetFile; m_writer->DumpImage(stream, texture.get()); } -} // namespace T6::image +} // namespace image diff --git a/src/ObjWriting/Game/T6/Image/ImageDumperT6.h b/src/ObjWriting/Game/T6/Image/ImageDumperT6.h index 4b0c2599..5fac0233 100644 --- a/src/ObjWriting/Game/T6/Image/ImageDumperT6.h +++ b/src/ObjWriting/Game/T6/Image/ImageDumperT6.h @@ -6,18 +6,18 @@ #include -namespace T6::image +namespace image { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { public: - Dumper(); + DumperT6(); protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; private: std::unique_ptr m_writer; }; -} // namespace T6::image +} // namespace image diff --git a/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.cpp b/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.cpp index 9947924d..4a90d7b2 100644 --- a/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.cpp @@ -10,7 +10,6 @@ using namespace nlohmann; using namespace T6; -using namespace ::leaderboard; namespace { @@ -97,14 +96,14 @@ namespace }; } // namespace -namespace T6::leaderboard +namespace leaderboard { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAsset(asset->m_name)); @@ -114,4 +113,4 @@ namespace T6::leaderboard Dumper dumper(*assetFile); dumper.Dump(*asset->Asset()); } -} // namespace T6::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.h b/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.h index 85d18061..ebbe4c9f 100644 --- a/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.h +++ b/src/ObjWriting/Game/T6/Leaderboard/LeaderboardJsonDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::leaderboard +namespace leaderboard { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperT6 final : public AbstractAssetDumper { protected: - [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::leaderboard +} // namespace leaderboard diff --git a/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.cpp b/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.cpp index b989f9e2..550b92d6 100644 --- a/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.cpp @@ -8,9 +8,9 @@ using namespace T6; -namespace T6::localize +namespace localize { - void Dumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void DumperT6::DumpPool(AssetDumpingContext& context, AssetPool* pool) { if (pool->m_asset_lookup.empty()) return; @@ -41,4 +41,4 @@ namespace T6::localize std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name); } } -} // namespace T6::localize +} // namespace localize diff --git a/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.h b/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.h index f0591f38..1a39defe 100644 --- a/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.h +++ b/src/ObjWriting/Game/T6/Localize/LocalizeDumperT6.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::localize +namespace localize { - class Dumper final : public IAssetDumper + class DumperT6 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace T6::localize +} // namespace localize diff --git a/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.cpp b/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.cpp index 7dce7a29..caf8abd5 100644 --- a/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.cpp @@ -4,14 +4,14 @@ using namespace T6; -namespace T6::map_ents +namespace map_ents { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* mapEnts = asset->Asset(); @@ -23,4 +23,4 @@ namespace T6::map_ents auto& stream = *mapEntsFile; stream.write(mapEnts->entityString, mapEnts->numEntityChars - 1); } -} // namespace T6::map_ents +} // namespace map_ents diff --git a/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.h b/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.h index 9fc7a6b8..9dbf36bb 100644 --- a/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.h +++ b/src/ObjWriting/Game/T6/Maps/MapEntsDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::map_ents +namespace map_ents { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::map_ents +} // namespace map_ents diff --git a/src/ObjWriting/Game/T6/ObjWriterT6.cpp b/src/ObjWriting/Game/T6/ObjWriterT6.cpp index 1b28dba0..06c66520 100644 --- a/src/ObjWriting/Game/T6/ObjWriterT6.cpp +++ b/src/ObjWriting/Game/T6/ObjWriterT6.cpp @@ -46,54 +46,54 @@ bool ObjWriter::DumpZone(AssetDumpingContext& context) const const auto* assetPools = dynamic_cast(context.m_zone.m_pools.get()); - DUMP_ASSET_POOL(phys_preset::InfoStringDumper, m_phys_preset, ASSET_TYPE_PHYSPRESET) - DUMP_ASSET_POOL(phys_constraints::InfoStringDumper, m_phys_constraints, ASSET_TYPE_PHYSCONSTRAINTS) + DUMP_ASSET_POOL(phys_preset::InfoStringDumperT6, m_phys_preset, ASSET_TYPE_PHYSPRESET) + DUMP_ASSET_POOL(phys_constraints::InfoStringDumperT6, m_phys_constraints, ASSET_TYPE_PHYSCONSTRAINTS) // DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def, ASSET_TYPE_DESTRUCTIBLEDEF) // DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS) - DUMP_ASSET_POOL(xmodel::Dumper, m_xmodel, ASSET_TYPE_XMODEL) - DUMP_ASSET_POOL(material::JsonDumper, m_material, ASSET_TYPE_MATERIAL) - DUMP_ASSET_POOL(techset::Dumper, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) - DUMP_ASSET_POOL(image::Dumper, m_image, ASSET_TYPE_IMAGE) - DUMP_ASSET_POOL(sound::SndBankDumper, m_sound_bank, ASSET_TYPE_SOUND) + DUMP_ASSET_POOL(xmodel::DumperT6, m_xmodel, ASSET_TYPE_XMODEL) + DUMP_ASSET_POOL(material::JsonDumperT6, m_material, ASSET_TYPE_MATERIAL) + DUMP_ASSET_POOL(techset::DumperT6, m_technique_set, ASSET_TYPE_TECHNIQUE_SET) + DUMP_ASSET_POOL(image::DumperT6, m_image, ASSET_TYPE_IMAGE) + DUMP_ASSET_POOL(sound::SndBankDumperT6, m_sound_bank, ASSET_TYPE_SOUND) // DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch, ASSET_TYPE_SOUND_PATCH) // DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP_PVS) // DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD) // DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP) // DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP) - DUMP_ASSET_POOL(map_ents::Dumper, m_map_ents, ASSET_TYPE_MAP_ENTS) + DUMP_ASSET_POOL(map_ents::DumperT6, m_map_ents, ASSET_TYPE_MAP_ENTS) // DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD) // DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF) // DUMP_ASSET_POOL(AssetDumperFont, m_font, ASSET_TYPE_FONT) - DUMP_ASSET_POOL_WITH_FACTORY(font_icon::CreateDumper(), m_font_icon, ASSET_TYPE_FONTICON) + DUMP_ASSET_POOL_WITH_FACTORY(font_icon::CreateDumperT6(), m_font_icon, ASSET_TYPE_FONTICON) // DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST) // DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def, ASSET_TYPE_MENU) - DUMP_ASSET_POOL(localize::Dumper, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) - DUMP_ASSET_POOL(weapon::Dumper, m_weapon, ASSET_TYPE_WEAPON) - DUMP_ASSET_POOL(attachment::Dumper, m_attachment, ASSET_TYPE_ATTACHMENT) - DUMP_ASSET_POOL(attachment_unique::Dumper, m_attachment_unique, ASSET_TYPE_ATTACHMENT_UNIQUE) - DUMP_ASSET_POOL(camo::JsonDumper, m_camo, ASSET_TYPE_WEAPON_CAMO) - DUMP_ASSET_POOL(sound::SndDriverGlobalsDumper, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS) + DUMP_ASSET_POOL(localize::DumperT6, m_localize, ASSET_TYPE_LOCALIZE_ENTRY) + DUMP_ASSET_POOL(weapon::DumperT6, m_weapon, ASSET_TYPE_WEAPON) + DUMP_ASSET_POOL(attachment::DumperT6, m_attachment, ASSET_TYPE_ATTACHMENT) + DUMP_ASSET_POOL(attachment_unique::DumperT6, m_attachment_unique, ASSET_TYPE_ATTACHMENT_UNIQUE) + DUMP_ASSET_POOL(camo::JsonDumperT6, m_camo, ASSET_TYPE_WEAPON_CAMO) + DUMP_ASSET_POOL(sound::SndDriverGlobalsDumperT6, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS) // DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX) // DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX) - DUMP_ASSET_POOL(raw_file::Dumper, m_raw_file, ASSET_TYPE_RAWFILE) - DUMP_ASSET_POOL(string_table::Dumper, m_string_table, ASSET_TYPE_STRINGTABLE) - DUMP_ASSET_POOL(leaderboard::JsonDumper, m_leaderboard, ASSET_TYPE_LEADERBOARD) + DUMP_ASSET_POOL(raw_file::DumperT6, m_raw_file, ASSET_TYPE_RAWFILE) + DUMP_ASSET_POOL(string_table::DumperT6, m_string_table, ASSET_TYPE_STRINGTABLE) + DUMP_ASSET_POOL(leaderboard::JsonDumperT6, m_leaderboard, ASSET_TYPE_LEADERBOARD) // DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals, ASSET_TYPE_XGLOBALS) // DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl, ASSET_TYPE_DDL) // DUMP_ASSET_POOL(AssetDumperGlasses, m_glasses, ASSET_TYPE_GLASSES) // DUMP_ASSET_POOL(AssetDumperEmblemSet, m_emblem_set, ASSET_TYPE_EMBLEMSET) - DUMP_ASSET_POOL(script::Dumper, m_script, ASSET_TYPE_SCRIPTPARSETREE) + DUMP_ASSET_POOL(script::DumperT6, m_script, ASSET_TYPE_SCRIPTPARSETREE) // DUMP_ASSET_POOL(AssetDumperKeyValuePairs, m_key_value_pairs, ASSET_TYPE_KEYVALUEPAIRS) - DUMP_ASSET_POOL(vehicle::Dumper, m_vehicle, ASSET_TYPE_VEHICLEDEF) + DUMP_ASSET_POOL(vehicle::DumperT6, m_vehicle, ASSET_TYPE_VEHICLEDEF) // DUMP_ASSET_POOL(AssetDumperMemoryBlock, m_memory_block, ASSET_TYPE_MEMORYBLOCK) // DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS) - DUMP_ASSET_POOL(tracer::Dumper, m_tracer, ASSET_TYPE_TRACER) + DUMP_ASSET_POOL(tracer::DumperT6, m_tracer, ASSET_TYPE_TRACER) // DUMP_ASSET_POOL(AssetDumperSkinnedVertsDef, m_skinned_verts, ASSET_TYPE_SKINNEDVERTS) - DUMP_ASSET_POOL(qdb::Dumper, m_qdb, ASSET_TYPE_QDB) - DUMP_ASSET_POOL(slug::Dumper, m_slug, ASSET_TYPE_SLUG) + DUMP_ASSET_POOL(qdb::DumperT6, m_qdb, ASSET_TYPE_QDB) + DUMP_ASSET_POOL(slug::DumperT6, m_slug, ASSET_TYPE_SLUG) // DUMP_ASSET_POOL(AssetDumperFootstepTableDef, m_footstep_table, ASSET_TYPE_FOOTSTEP_TABLE) // DUMP_ASSET_POOL(AssetDumperFootstepFXTableDef, m_footstep_fx_table, ASSET_TYPE_FOOTSTEPFX_TABLE) - DUMP_ASSET_POOL(z_barrier::Dumper, m_zbarrier, ASSET_TYPE_ZBARRIER) + DUMP_ASSET_POOL(z_barrier::DumperT6, m_zbarrier, ASSET_TYPE_ZBARRIER) return true; diff --git a/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.cpp b/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.cpp index e34862e8..c0c2d7ce 100644 --- a/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.cpp +++ b/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.cpp @@ -9,7 +9,6 @@ #include using namespace T6; -using namespace ::phys_constraints; namespace { @@ -60,14 +59,14 @@ namespace } } // namespace -namespace T6::phys_constraints +namespace phys_constraints { - bool InfoStringDumper::ShouldDump(XAssetInfo* asset) + bool InfoStringDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void InfoStringDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void InfoStringDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -90,4 +89,4 @@ namespace T6::phys_constraints stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.h b/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.h index 2af16570..4d1c5e70 100644 --- a/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.h +++ b/src/ObjWriting/Game/T6/PhysConstraints/PhysConstraintsInfoStringDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::phys_constraints +namespace phys_constraints { - class InfoStringDumper final : public AbstractAssetDumper + class InfoStringDumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::phys_constraints +} // namespace phys_constraints diff --git a/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.cpp b/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.cpp index 8941af2d..c4f5dd85 100644 --- a/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.cpp +++ b/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.cpp @@ -11,7 +11,6 @@ #include using namespace T6; -using namespace ::phys_preset; namespace { @@ -81,14 +80,14 @@ namespace } } // namespace -namespace T6::phys_preset +namespace phys_preset { - bool InfoStringDumper::ShouldDump(XAssetInfo* asset) + bool InfoStringDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void InfoStringDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void InfoStringDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -111,4 +110,4 @@ namespace T6::phys_preset stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.h b/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.h index 26ce2296..df52d539 100644 --- a/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.h +++ b/src/ObjWriting/Game/T6/PhysPreset/PhysPresetInfoStringDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::phys_preset +namespace phys_preset { - class InfoStringDumper final : public AbstractAssetDumper + class InfoStringDumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::phys_preset +} // namespace phys_preset diff --git a/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp b/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp index 5d4aa41b..f990de0d 100644 --- a/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp @@ -2,14 +2,14 @@ using namespace T6; -namespace T6::qdb +namespace qdb { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* qdb = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -20,4 +20,4 @@ namespace T6::qdb auto& stream = *assetFile; stream.write(qdb->buffer, qdb->len); } -} // namespace T6::qdb +} // namespace qdb diff --git a/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.h b/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.h index 9f270398..eb452510 100644 --- a/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.h +++ b/src/ObjWriting/Game/T6/Qdb/QdbDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::qdb +namespace qdb { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::qdb +} // namespace qdb diff --git a/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.cpp b/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.cpp index b456eb9c..a7f29926 100644 --- a/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.cpp +++ b/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.cpp @@ -73,14 +73,14 @@ namespace } } // namespace -namespace T6::raw_file +namespace raw_file { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* rawFile = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -101,4 +101,4 @@ namespace T6::raw_file stream.write(rawFile->buffer, rawFile->len); } } -} // namespace T6::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.h b/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.h index 6544e974..c2faa0f9 100644 --- a/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.h +++ b/src/ObjWriting/Game/T6/RawFile/RawFileDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::raw_file +namespace raw_file { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::raw_file +} // namespace raw_file diff --git a/src/ObjWriting/Game/T6/Script/ScriptDumperT6.cpp b/src/ObjWriting/Game/T6/Script/ScriptDumperT6.cpp index 15c4eb6c..2b2be090 100644 --- a/src/ObjWriting/Game/T6/Script/ScriptDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Script/ScriptDumperT6.cpp @@ -2,14 +2,14 @@ using namespace T6; -namespace T6::script +namespace script { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* scriptParseTree = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -20,4 +20,4 @@ namespace T6::script auto& stream = *assetFile; stream.write(scriptParseTree->buffer, scriptParseTree->len); } -} // namespace T6::script +} // namespace script diff --git a/src/ObjWriting/Game/T6/Script/ScriptDumperT6.h b/src/ObjWriting/Game/T6/Script/ScriptDumperT6.h index fb388b36..895b55b4 100644 --- a/src/ObjWriting/Game/T6/Script/ScriptDumperT6.h +++ b/src/ObjWriting/Game/T6/Script/ScriptDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::script +namespace script { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::script +} // namespace script diff --git a/src/ObjWriting/Game/T6/Slug/SlugDumperT6.cpp b/src/ObjWriting/Game/T6/Slug/SlugDumperT6.cpp index 63f07f7a..d02a11d0 100644 --- a/src/ObjWriting/Game/T6/Slug/SlugDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Slug/SlugDumperT6.cpp @@ -2,14 +2,14 @@ using namespace T6; -namespace T6::slug +namespace slug { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* slug = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -20,4 +20,4 @@ namespace T6::slug auto& stream = *assetFile; stream.write(slug->buffer, slug->len); } -} // namespace T6::slug +} // namespace slug diff --git a/src/ObjWriting/Game/T6/Slug/SlugDumperT6.h b/src/ObjWriting/Game/T6/Slug/SlugDumperT6.h index f33960e6..3dd202e5 100644 --- a/src/ObjWriting/Game/T6/Slug/SlugDumperT6.h +++ b/src/ObjWriting/Game/T6/Slug/SlugDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::slug +namespace slug { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::slug +} // namespace slug diff --git a/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.cpp b/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.cpp index f72517a4..55d1b792 100644 --- a/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.cpp @@ -910,9 +910,9 @@ namespace } } // namespace -namespace T6::sound +namespace sound { - void SndBankDumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void SndBankDumperT6::DumpPool(AssetDumpingContext& context, AssetPool* pool) { LoadedSoundBankHashes soundBankHashes; soundBankHashes.Initialize(); @@ -924,4 +924,4 @@ namespace T6::sound DumpSndBank(context, soundBankHashes, *assetInfo); } } -} // namespace T6::sound +} // namespace sound diff --git a/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.h b/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.h index 77141ac3..f5d4f59d 100644 --- a/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.h +++ b/src/ObjWriting/Game/T6/Sound/SndBankDumperT6.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::sound +namespace sound { - class SndBankDumper final : public IAssetDumper + class SndBankDumperT6 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace T6::sound +} // namespace sound diff --git a/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.cpp b/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.cpp index 1b27898e..02e7899e 100644 --- a/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.cpp @@ -382,11 +382,11 @@ namespace }; } // namespace -namespace T6::sound +namespace sound { - void SndDriverGlobalsDumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void SndDriverGlobalsDumperT6::DumpPool(AssetDumpingContext& context, AssetPool* pool) { Internal internal(context); internal.DumpPool(pool); } -} // namespace T6::sound +} // namespace sound diff --git a/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.h b/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.h index b20c4f16..042de43c 100644 --- a/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.h +++ b/src/ObjWriting/Game/T6/Sound/SndDriverGlobalsDumperT6.h @@ -3,11 +3,11 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::sound +namespace sound { - class SndDriverGlobalsDumper final : public IAssetDumper + class SndDriverGlobalsDumperT6 final : public IAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; }; -} // namespace T6::sound +} // namespace sound diff --git a/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.cpp b/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.cpp index 83f0c860..4bd96479 100644 --- a/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.cpp +++ b/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.cpp @@ -4,14 +4,14 @@ using namespace T6; -namespace T6::string_table +namespace string_table { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* stringTable = asset->Asset(); const auto assetFile = context.OpenAssetFile(asset->m_name); @@ -39,4 +39,4 @@ namespace T6::string_table csv.NextRow(); } } -} // namespace T6::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.h b/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.h index 0fbbdb18..b61a4380 100644 --- a/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.h +++ b/src/ObjWriting/Game/T6/StringTable/StringTableDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::string_table +namespace string_table { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::string_table +} // namespace string_table diff --git a/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.cpp b/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.cpp index abbb953a..a2d7273c 100644 --- a/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.cpp @@ -75,14 +75,14 @@ namespace } } // namespace -namespace T6::techset +namespace techset { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto* techniqueSet = asset->Asset(); auto* shaderState = context.GetZoneAssetDumperState(); @@ -104,4 +104,4 @@ namespace T6::techset } } } -} // namespace T6::techset +} // namespace techset diff --git a/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.h b/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.h index 885be6c2..59a48f3f 100644 --- a/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.h +++ b/src/ObjWriting/Game/T6/Techset/TechsetDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::techset +namespace techset { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::techset +} // namespace techset diff --git a/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.cpp b/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.cpp index 6a3b1cab..854a45af 100644 --- a/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.cpp @@ -9,7 +9,6 @@ #include using namespace T6; -using namespace ::tracer; namespace { @@ -59,14 +58,14 @@ namespace } } // namespace -namespace T6::tracer +namespace tracer { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -89,4 +88,4 @@ namespace T6::tracer stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.h b/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.h index b3a54052..0bfb6d75 100644 --- a/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.h +++ b/src/ObjWriting/Game/T6/Tracer/TracerDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::tracer +namespace tracer { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::tracer +} // namespace tracer diff --git a/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.cpp b/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.cpp index 40eb02ad..1178b394 100644 --- a/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.cpp @@ -109,14 +109,14 @@ namespace } } // namespace -namespace T6::vehicle +namespace vehicle { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -139,4 +139,4 @@ namespace T6::vehicle stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.h b/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.h index 61c53ebf..5d328e87 100644 --- a/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.h +++ b/src/ObjWriting/Game/T6/Vehicle/VehicleDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::vehicle +namespace vehicle { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::vehicle +} // namespace vehicle diff --git a/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.cpp b/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.cpp index ff521c15..d7fcc4c7 100644 --- a/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.cpp @@ -10,7 +10,6 @@ #include using namespace T6; -using namespace ::attachment; namespace { @@ -66,14 +65,14 @@ namespace } } // namespace -namespace T6::attachment +namespace attachment { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -96,4 +95,4 @@ namespace T6::attachment stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.h b/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.h index 2f386ccc..0472e2a0 100644 --- a/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.h +++ b/src/ObjWriting/Game/T6/Weapon/AttachmentDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::attachment +namespace attachment { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::attachment +} // namespace attachment diff --git a/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.cpp b/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.cpp index 88e4c054..c10605ac 100644 --- a/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.cpp @@ -12,7 +12,6 @@ #include using namespace T6; -using namespace ::attachment_unique; namespace { @@ -130,14 +129,14 @@ namespace } } // namespace -namespace T6::attachment_unique +namespace attachment_unique { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -160,4 +159,4 @@ namespace T6::attachment_unique stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.h b/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.h index e84fcb74..b3e2ae1a 100644 --- a/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.h +++ b/src/ObjWriting/Game/T6/Weapon/AttachmentUniqueDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::attachment_unique +namespace attachment_unique { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::attachment_unique +} // namespace attachment_unique diff --git a/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.cpp b/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.cpp index 958470c7..4a68492e 100644 --- a/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.cpp @@ -9,7 +9,6 @@ using namespace nlohmann; using namespace T6; -using namespace ::camo; namespace { @@ -103,14 +102,14 @@ namespace }; } // namespace -namespace T6::camo +namespace camo { - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool JsonDumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void JsonDumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto fileName = GetJsonFileNameForAssetName(asset->m_name); const auto assetFile = context.OpenAssetFile(fileName); @@ -121,4 +120,4 @@ namespace T6::camo const JsonDumperImpl dumper(*assetFile); dumper.Dump(asset->Asset()); } -} // namespace T6::camo +} // namespace camo diff --git a/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.h b/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.h index e7c316e0..8bb91f12 100644 --- a/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.h +++ b/src/ObjWriting/Game/T6/Weapon/CamoJsonDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::camo +namespace camo { - class JsonDumper final : public AbstractAssetDumper + class JsonDumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::camo +} // namespace camo diff --git a/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.cpp b/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.cpp index 96ad8700..96c5bcdc 100644 --- a/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.cpp +++ b/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.cpp @@ -14,7 +14,6 @@ #include using namespace T6; -using namespace ::weapon; namespace { @@ -460,14 +459,14 @@ namespace } } // namespace -namespace T6::weapon +namespace weapon { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -492,4 +491,4 @@ namespace T6::weapon DumpAccuracyGraphs(context, asset); } -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.h b/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.h index 15ac83b6..4b3b500f 100644 --- a/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.h +++ b/src/ObjWriting/Game/T6/Weapon/WeaponDumperT6.h @@ -3,12 +3,12 @@ #include "Dumping/AbstractAssetDumper.h" #include "Game/T6/T6.h" -namespace T6::weapon +namespace weapon { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::weapon +} // namespace weapon diff --git a/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.cpp b/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.cpp index 23710e54..1a7edb80 100644 --- a/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.cpp +++ b/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.cpp @@ -9,7 +9,6 @@ #include using namespace T6; -using namespace ::z_barrier; namespace { @@ -49,14 +48,14 @@ namespace } } // namespace -namespace T6::z_barrier +namespace z_barrier { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool DumperT6::ShouldDump(XAssetInfo* asset) { return true; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void DumperT6::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { // Only dump raw when no gdt available if (context.m_gdt) @@ -79,4 +78,4 @@ namespace T6::z_barrier stream.write(stringValue.c_str(), stringValue.size()); } } -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.h b/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.h index efde331b..9e60f414 100644 --- a/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.h +++ b/src/ObjWriting/Game/T6/ZBarrier/ZBarrierDumperT6.h @@ -4,12 +4,12 @@ #include "Game/T6/T6.h" #include "InfoString/InfoString.h" -namespace T6::z_barrier +namespace z_barrier { - class Dumper final : public AbstractAssetDumper + class DumperT6 final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace T6::z_barrier +} // namespace z_barrier diff --git a/src/ObjWriting/Material/MaterialJsonDumper.cpp.template b/src/ObjWriting/Material/MaterialJsonDumper.cpp.template index 817788f0..7eb8ad51 100644 --- a/src/ObjWriting/Material/MaterialJsonDumper.cpp.template +++ b/src/ObjWriting/Material/MaterialJsonDumper.cpp.template @@ -48,7 +48,8 @@ using namespace nlohmann; using namespace GAME; -using namespace ::material; + +#set CLASS_NAME "JsonDumper" + GAME namespace { @@ -358,9 +359,9 @@ namespace }; } // namespace -namespace GAME::material +namespace material { - void JsonDumper::DumpPool(AssetDumpingContext& context, AssetPool* pool) + void CLASS_NAME::DumpPool(AssetDumpingContext& context, AssetPool* pool) { auto* materialConstantState = context.GetZoneAssetDumperState(); materialConstantState->ExtractNamesFromZone(); @@ -368,12 +369,12 @@ namespace GAME::material AbstractAssetDumper::DumpPool(context, pool); } - bool JsonDumper::ShouldDump(XAssetInfo* asset) + bool CLASS_NAME::ShouldDump(XAssetInfo* asset) { return true; } - void JsonDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void CLASS_NAME::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { const auto assetFile = context.OpenAssetFile(GetFileNameForAssetName(asset->m_name)); @@ -393,5 +394,5 @@ namespace GAME::material JsonDumperImpl dumper(context, *assetFile); dumper.Dump(*material); } -} // namespace T6::leaderboard +} // namespace material diff --git a/src/ObjWriting/Material/MaterialJsonDumper.h.template b/src/ObjWriting/Material/MaterialJsonDumper.h.template index a9677b77..f8a41515 100644 --- a/src/ObjWriting/Material/MaterialJsonDumper.h.template +++ b/src/ObjWriting/Material/MaterialJsonDumper.h.template @@ -13,15 +13,17 @@ #set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" #include GAME_HEADER -namespace GAME::material +#set CLASS_NAME "JsonDumper" + GAME + +namespace material { - class JsonDumper final : public AbstractAssetDumper + class CLASS_NAME final : public AbstractAssetDumper { public: - void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; + void DumpPool(AssetDumpingContext& context, AssetPool* pool) override; protected: - [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + [[nodiscard]] bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace GAME::material +} // namespace material diff --git a/src/ObjWriting/XModel/XModelDumper.cpp.template b/src/ObjWriting/XModel/XModelDumper.cpp.template index f4eabbc6..85dce85b 100644 --- a/src/ObjWriting/XModel/XModelDumper.cpp.template +++ b/src/ObjWriting/XModel/XModelDumper.cpp.template @@ -47,7 +47,8 @@ #include using namespace GAME; -using namespace ::xmodel; + +#set CLASS_NAME "Dumper" + GAME namespace { @@ -831,7 +832,7 @@ namespace void DumpXModelJson(AssetDumpingContext& context, XAssetInfo* asset) { - const auto assetFile = context.OpenAssetFile(GetJsonFileNameForAssetName(asset->m_name)); + const auto assetFile = context.OpenAssetFile(xmodel::GetJsonFileNameForAssetName(asset->m_name)); if (!assetFile) return; @@ -840,14 +841,14 @@ namespace } } // namespace -namespace GAME::xmodel +namespace xmodel { - bool Dumper::ShouldDump(XAssetInfo* asset) + bool CLASS_NAME::ShouldDump(XAssetInfo* asset) { return !asset->m_name.empty() && asset->m_name[0] != ','; } - void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) + void CLASS_NAME::DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) { DumpXModelJson(context, asset); DumpXModelSurfs(context, asset); diff --git a/src/ObjWriting/XModel/XModelDumper.h.template b/src/ObjWriting/XModel/XModelDumper.h.template index 81d5a34c..5483e209 100644 --- a/src/ObjWriting/XModel/XModelDumper.h.template +++ b/src/ObjWriting/XModel/XModelDumper.h.template @@ -13,12 +13,14 @@ #include "Dumping/AbstractAssetDumper.h" #include GAME_HEADER -namespace GAME::xmodel +#set CLASS_NAME "Dumper" + GAME + +namespace xmodel { - class Dumper final : public AbstractAssetDumper + class CLASS_NAME final : public AbstractAssetDumper { protected: - bool ShouldDump(XAssetInfo* asset) override; - void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; + bool ShouldDump(XAssetInfo* asset) override; + void DumpAsset(AssetDumpingContext& context, XAssetInfo* asset) override; }; -} // namespace GAME +} // namespace xmodel diff --git a/test/ObjCompilingTests/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6Test.cpp b/test/ObjCompilingTests/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6Test.cpp index dc771218..c80dece3 100644 --- a/test/ObjCompilingTests/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6Test.cpp +++ b/test/ObjCompilingTests/Game/T6/KeyValuePairs/KeyValuePairsCompilerT6Test.cpp @@ -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()) { } std::unique_ptr 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; diff --git a/test/ObjLoadingTests/Game/IW3/Material/LoaderMaterialIW3Test.cpp b/test/ObjLoadingTests/Game/IW3/Material/LoaderMaterialIW3Test.cpp index 76c8c87c..7f36ca46 100644 --- a/test/ObjLoadingTests/Game/IW3/Material/LoaderMaterialIW3Test.cpp +++ b/test/ObjLoadingTests/Game/IW3/Material/LoaderMaterialIW3Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/IW3/StringTable/AssetLoaderStringTableIW3Test.cpp b/test/ObjLoadingTests/Game/IW3/StringTable/AssetLoaderStringTableIW3Test.cpp index 22195105..84894dd3 100644 --- a/test/ObjLoadingTests/Game/IW3/StringTable/AssetLoaderStringTableIW3Test.cpp +++ b/test/ObjLoadingTests/Game/IW3/StringTable/AssetLoaderStringTableIW3Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/IW4/AssetLoaders/LoaderStringTableIW4Test.cpp b/test/ObjLoadingTests/Game/IW4/AssetLoaders/LoaderStringTableIW4Test.cpp index ff4c5c56..d311f141 100644 --- a/test/ObjLoadingTests/Game/IW4/AssetLoaders/LoaderStringTableIW4Test.cpp +++ b/test/ObjLoadingTests/Game/IW4/AssetLoaders/LoaderStringTableIW4Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/IW4/Material/LoaderMaterialIW4Test.cpp b/test/ObjLoadingTests/Game/IW4/Material/LoaderMaterialIW4Test.cpp index 6af6297d..bde4133c 100644 --- a/test/ObjLoadingTests/Game/IW4/Material/LoaderMaterialIW4Test.cpp +++ b/test/ObjLoadingTests/Game/IW4/Material/LoaderMaterialIW4Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/IW4/Menu/LoaderMenuListIW4Test.cpp b/test/ObjLoadingTests/Game/IW4/Menu/LoaderMenuListIW4Test.cpp index d246deb2..f55bf421 100644 --- a/test/ObjLoadingTests/Game/IW4/Menu/LoaderMenuListIW4Test.cpp +++ b/test/ObjLoadingTests/Game/IW4/Menu/LoaderMenuListIW4Test.cpp @@ -11,7 +11,6 @@ #include #include -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) diff --git a/test/ObjLoadingTests/Game/IW5/AssetLoaders/LoaderStringTableIW5Test.cpp b/test/ObjLoadingTests/Game/IW5/AssetLoaders/LoaderStringTableIW5Test.cpp index 08a7b464..32546c9c 100644 --- a/test/ObjLoadingTests/Game/IW5/AssetLoaders/LoaderStringTableIW5Test.cpp +++ b/test/ObjLoadingTests/Game/IW5/AssetLoaders/LoaderStringTableIW5Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/IW5/Material/LoaderMaterialIW5Test.cpp b/test/ObjLoadingTests/Game/IW5/Material/LoaderMaterialIW5Test.cpp index 960f119d..de7b30c1 100644 --- a/test/ObjLoadingTests/Game/IW5/Material/LoaderMaterialIW5Test.cpp +++ b/test/ObjLoadingTests/Game/IW5/Material/LoaderMaterialIW5Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/T5/AssetLoaders/LoaderStringTableT5Test.cpp b/test/ObjLoadingTests/Game/T5/AssetLoaders/LoaderStringTableT5Test.cpp index ca346aa3..43e9c481 100644 --- a/test/ObjLoadingTests/Game/T5/AssetLoaders/LoaderStringTableT5Test.cpp +++ b/test/ObjLoadingTests/Game/T5/AssetLoaders/LoaderStringTableT5Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/T5/Material/LoaderMaterialT5Test.cpp b/test/ObjLoadingTests/Game/T5/Material/LoaderMaterialT5Test.cpp index e2aaedcb..9e183566 100644 --- a/test/ObjLoadingTests/Game/T5/Material/LoaderMaterialT5Test.cpp +++ b/test/ObjLoadingTests/Game/T5/Material/LoaderMaterialT5Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/T6/AssetLoaders/LoaderStringTableT6Test.cpp b/test/ObjLoadingTests/Game/T6/AssetLoaders/LoaderStringTableT6Test.cpp index 163a4575..2e075e9f 100644 --- a/test/ObjLoadingTests/Game/T6/AssetLoaders/LoaderStringTableT6Test.cpp +++ b/test/ObjLoadingTests/Game/T6/AssetLoaders/LoaderStringTableT6Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/T6/FontIcon/JsonLoaderFontIconT6Test.cpp b/test/ObjLoadingTests/Game/T6/FontIcon/JsonLoaderFontIconT6Test.cpp index d61e4096..a92851d6 100644 --- a/test/ObjLoadingTests/Game/T6/FontIcon/JsonLoaderFontIconT6Test.cpp +++ b/test/ObjLoadingTests/Game/T6/FontIcon/JsonLoaderFontIconT6Test.cpp @@ -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()); diff --git a/test/ObjLoadingTests/Game/T6/Material/LoaderMaterialT6Test.cpp b/test/ObjLoadingTests/Game/T6/Material/LoaderMaterialT6Test.cpp index 609c5200..94ee5b62 100644 --- a/test/ObjLoadingTests/Game/T6/Material/LoaderMaterialT6Test.cpp +++ b/test/ObjLoadingTests/Game/T6/Material/LoaderMaterialT6Test.cpp @@ -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()); diff --git a/test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3.cpp b/test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3Test.cpp similarity index 99% rename from test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3.cpp rename to test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3Test.cpp index e09856ba..44980cdc 100644 --- a/test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3.cpp +++ b/test/ObjWritingTests/Game/IW3/Material/MaterialJsonDumperIW3Test.cpp @@ -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"); diff --git a/test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4.cpp b/test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4Test.cpp similarity index 99% rename from test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4.cpp rename to test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4Test.cpp index c2268aff..c16ec19d 100644 --- a/test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4.cpp +++ b/test/ObjWritingTests/Game/IW4/Material/MaterialJsonDumperIW4Test.cpp @@ -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"); diff --git a/test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5.cpp b/test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5Test.cpp similarity index 99% rename from test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5.cpp rename to test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5Test.cpp index a40a1e2e..f70a9daf 100644 --- a/test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5.cpp +++ b/test/ObjWritingTests/Game/IW5/Material/MaterialJsonDumperIW5Test.cpp @@ -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"); diff --git a/test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5.cpp b/test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5Test.cpp similarity index 99% rename from test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5.cpp rename to test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5Test.cpp index aa5d230b..5513c96f 100644 --- a/test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5.cpp +++ b/test/ObjWritingTests/Game/T5/Material/MaterialJsonDumperT5Test.cpp @@ -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"); diff --git a/test/ObjWritingTests/Game/T6/FontIcon/FontIconJsonDumperT6Test.cpp b/test/ObjWritingTests/Game/T6/FontIcon/FontIconJsonDumperT6Test.cpp index 04bf8440..1755ff9d 100644 --- a/test/ObjWritingTests/Game/T6/FontIcon/FontIconJsonDumperT6Test.cpp +++ b/test/ObjWritingTests/Game/T6/FontIcon/FontIconJsonDumperT6Test.cpp @@ -151,7 +151,7 @@ namespace AssetPoolDynamic 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"); diff --git a/test/ObjWritingTests/Game/T6/Material/MaterialJsonDumperT6Test.cpp b/test/ObjWritingTests/Game/T6/Material/MaterialJsonDumperT6Test.cpp index db8dc42a..c75d73be 100644 --- a/test/ObjWritingTests/Game/T6/Material/MaterialJsonDumperT6Test.cpp +++ b/test/ObjWritingTests/Game/T6/Material/MaterialJsonDumperT6Test.cpp @@ -472,7 +472,7 @@ namespace AssetPoolDynamic 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");