From bbb282a206fbb13527788a3e7f4ce29d91e6ee44 Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Fri, 23 Jan 2026 21:55:27 +0000 Subject: [PATCH] chore: deactivate IW4 material and techset compilation for now --- .../Game/IW4/Material/CompilerMaterialIW4.cpp | 10 +++++---- .../Game/IW4/Techset/CompilerTechsetIW4.cpp | 21 +++++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp index 0f3fdecd..d2e20bc0 100644 --- a/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp +++ b/src/ObjCompiling/Game/IW4/Material/CompilerMaterialIW4.cpp @@ -9,11 +9,8 @@ #include "Gdt/AbstractGdtEntryReader.h" #include "Gdt/IGdtQueryable.h" #include "Pool/GlobalAssetPool.h" -#include "Techset/CommonTechsetCache.h" -#include "Techset/StateMap/StateMapFromTechniqueExtractor.h" #include "Techset/StateMap/StateMapHandler.h" -#include "Techset/TechniqueFileReader.h" -#include "Techset/TechniqueStateMapCache.h" +#include "Techset/StateMap/TechniqueStateMapCache.h" #include "Techset/TechsetCommon.h" #include "Utils/Logging/Log.h" @@ -28,6 +25,7 @@ using namespace IW4; namespace { + /* class SkipMaterialException final : public std::exception { }; @@ -1328,6 +1326,7 @@ namespace std::unique_ptr m_techset_creator; }; + */ class MaterialLoader final : public AssetCreator { @@ -1341,6 +1340,8 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { + return AssetCreationResult::NoAction(); + /* const auto* entry = m_gdt.GetGdtEntryByGdfAndName(ObjConstants::GDF_FILENAME_MATERIAL, assetName); if (!entry) return AssetCreationResult::NoAction(); @@ -1367,6 +1368,7 @@ namespace } return AssetCreationResult::Failure(); + */ } private: diff --git a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp index 158b9984..161fa2e9 100644 --- a/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp +++ b/src/ObjCompiling/Game/IW4/Techset/CompilerTechsetIW4.cpp @@ -6,11 +6,9 @@ #include "Game/IW4/Techset/TechsetConstantsIW4.h" #include "Shader/D3D9ShaderAnalyser.h" #include "Shader/ShaderCommon.h" -#include "Techset/CommonTechsetCache.h" #include "Techset/CommonTechsetLoader.h" #include "Techset/StateMap/StateMapReader.h" -#include "Techset/TechniqueFileReader.h" -#include "Techset/TechniqueStateMapCache.h" +#include "Techset/StateMap/TechniqueStateMapCache.h" #include "Techset/TechsetCommon.h" #include "Utils/Alignment.h" #include "Utils/Logging/Log.h" @@ -32,6 +30,7 @@ using namespace std::string_literals; namespace { + /* class LoadedTechnique { public: @@ -407,7 +406,7 @@ namespace if (arg1.m_arg.type == MTL_ARG_MATERIAL_VERTEX_CONST || arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_CONST || arg1.m_arg.type == MTL_ARG_MATERIAL_PIXEL_SAMPLER) - return arg1.m_arg.u.codeSampler < arg2.m_arg.u.codeSampler; + return arg1.m_arg.u.nameHash < arg2.m_arg.u.nameHash; return arg1.m_arg.dest < arg2.m_arg.dest; }); @@ -1263,7 +1262,7 @@ namespace TechniqueZoneLoadingState& m_zone_state; techset::ICreatorIW4* m_techset_creator; }; - + */ class TechsetLoader final : public techset::ICreatorIW4 { public: @@ -1275,15 +1274,18 @@ namespace AssetCreationResult CreateAsset(const std::string& assetName, AssetCreationContext& context) override { + return AssetCreationResult::NoAction(); + /* bool failure = false; const auto* techsetDefinition = LoadTechsetDefinition(assetName, context, failure); if (!techsetDefinition) return failure ? AssetCreationResult::Failure() : AssetCreationResult::NoAction(); return CreateTechsetFromDefinition(assetName, *techsetDefinition, context); + */ } - private: + /* AssetCreationResult CreateTechsetFromDefinition(const std::string& assetName, const CommonTechset& definition, AssetCreationContext& context) { auto* techset = m_memory.Alloc(); @@ -1311,9 +1313,11 @@ namespace return AssetCreationResult::Success(context.AddAsset(std::move(registration))); } + */ CommonTechset* LoadTechsetDefinition(const std::string& assetName, AssetCreationContext& context, bool& failure) override { + /* failure = false; auto& definitionCache = context.GetZoneAssetCreationState(); auto* cachedTechsetDefinition = definitionCache.GetCachedTechsetDefinition(assetName); @@ -1334,10 +1338,13 @@ namespace definitionCache.AddCommonTechsetToCache(assetName, std::move(techsetDefinition)); return techsetDefinitionPtr; + */ + return nullptr; } const state_map::StateMapDefinition* LoadStateMapDefinition(const std::string& stateMapName, AssetCreationContext& context) override { + /* auto& stateMapCache = context.GetZoneAssetCreationState(); auto* cachedStateMap = stateMapCache.GetCachedStateMap(stateMapName); if (cachedStateMap) @@ -1358,6 +1365,8 @@ namespace stateMapCache.AddStateMapToCache(std::move(stateMapDefinition)); return stateMapDefinitionPtr; + */ + return nullptr; } private: