From 5272b9060d4601da01028a6ae243fbfff5ba3de4 Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Sat, 7 Mar 2026 09:42:57 +0000 Subject: [PATCH] chore: use templating for t6 techset compilation --- src/ObjCompiling.lua | 3 + src/ObjCompiling/Game/T6/ObjCompilerT6.cpp | 8 +- .../Game/T6/Techset/TechniqueCompilerT6.h | 12 --- .../Game/T6/Techset/TechsetCompilerT6.h | 12 --- .../Game/T6/Techset/VertexDeclCompilerT6.cpp | 57 ----------- .../Game/T6/Techset/VertexDeclCompilerT6.h | 11 --- .../Techset/CommonShaderArgCreator.cpp | 3 +- .../TechniqueCompiler.cpp.template} | 57 ++++++++--- .../Techset/TechniqueCompiler.h.template | 36 +++++++ .../TechsetCompiler.cpp.template} | 46 +++++++-- .../Techset/TechsetCompiler.h.template | 36 +++++++ .../Techset/VertexDeclCompiler.cpp.template | 97 +++++++++++++++++++ .../Techset/VertexDeclCompiler.h.template | 41 ++++++++ test/ObjCompilingTests.lua | 1 + .../Game/T6/Techset/TechsetCompilerT6Test.cpp | 2 +- 15 files changed, 301 insertions(+), 121 deletions(-) delete mode 100644 src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.h delete mode 100644 src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.h delete mode 100644 src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.cpp delete mode 100644 src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.h rename src/ObjCompiling/{Game/T6/Techset/TechniqueCompilerT6.cpp => Techset/TechniqueCompiler.cpp.template} (90%) create mode 100644 src/ObjCompiling/Techset/TechniqueCompiler.h.template rename src/ObjCompiling/{Game/T6/Techset/TechsetCompilerT6.cpp => Techset/TechsetCompiler.cpp.template} (79%) create mode 100644 src/ObjCompiling/Techset/TechsetCompiler.h.template create mode 100644 src/ObjCompiling/Techset/VertexDeclCompiler.cpp.template create mode 100644 src/ObjCompiling/Techset/VertexDeclCompiler.h.template diff --git a/src/ObjCompiling.lua b/src/ObjCompiling.lua index 38691e33..8070274d 100644 --- a/src/ObjCompiling.lua +++ b/src/ObjCompiling.lua @@ -50,6 +50,9 @@ function ObjCompiling:project() path.join(folder, "ObjCompiling") } } + + ObjCommon:use() + useSourceTemplating("ObjCompiling") self:include(includes) minilzo:include(includes) diff --git a/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp b/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp index 34e0cbb1..37ac9529 100644 --- a/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp +++ b/src/ObjCompiling/Game/T6/ObjCompilerT6.cpp @@ -1,12 +1,12 @@ #include "ObjCompilerT6.h" #include "Game/T6/T6.h" +#include "Game/T6/Techset/TechniqueCompilerT6.h" +#include "Game/T6/Techset/TechsetCompilerT6.h" +#include "Game/T6/Techset/VertexDeclCompilerT6.h" #include "Image/ImageIPakPostProcessor.h" #include "Image/ImageIwdPostProcessor.h" #include "KeyValuePairs/KeyValuePairsCompilerT6.h" -#include "Techset/TechniqueCompilerT6.h" -#include "Techset/TechsetCompilerT6.h" -#include "Techset/VertexDeclCompilerT6.h" #include @@ -23,7 +23,7 @@ namespace auto& memory = zone.Memory(); collection.AddAssetCreator(key_value_pairs::CreateCompilerT6(memory, zone, zoneDefinition.m_zone_definition, zoneStates)); - collection.AddAssetCreator(techset::CreateCompilerT6(memory, searchPath)); + collection.AddAssetCreator(techset::CreateTechsetCompilerT6(memory, searchPath)); collection.AddSubAssetCreator(techset::CreateTechniqueCompilerT6(memory, zone, searchPath)); collection.AddSubAssetCreator(techset::CreateVertexDeclCompilerT6(memory)); diff --git a/src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.h b/src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.h deleted file mode 100644 index 869acca8..00000000 --- a/src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "Asset/IAssetCreator.h" -#include "SearchPath/ISearchPath.h" -#include "Utils/MemoryManager.h" - -#include - -namespace techset -{ - std::unique_ptr CreateTechniqueCompilerT6(MemoryManager& memory, Zone& zone, ISearchPath& searchPath); -} diff --git a/src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.h b/src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.h deleted file mode 100644 index 2af583f1..00000000 --- a/src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "Asset/IAssetCreator.h" -#include "SearchPath/ISearchPath.h" -#include "Utils/MemoryManager.h" - -#include - -namespace techset -{ - std::unique_ptr CreateCompilerT6(MemoryManager& memory, ISearchPath& searchPath); -} // namespace techset diff --git a/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.cpp b/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.cpp deleted file mode 100644 index b01f2607..00000000 --- a/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "VertexDeclCompilerT6.h" - -#include "Game/T6/T6.h" -#include "Game/T6/Techset/TechsetConstantsT6.h" -#include "Techset/CommonVertexDeclCreator.h" -#include "Utils/Logging/Log.h" - -using namespace T6; - -namespace -{ - class VertexDeclCompilerT6 final : public SubAssetCreator - { - public: - explicit VertexDeclCompilerT6(MemoryManager& memory) - : m_memory(memory) - { - } - - AssetCreationResult CreateSubAsset(const std::string& subAssetName, AssetCreationContext& context) override - { - const auto commonVertexDecl = techset::CreateVertexDeclFromName(subAssetName, commonRoutingInfos); - if (!commonVertexDecl) - return AssetCreationResult::Failure(); - - if (commonVertexDecl->m_routing.size() > std::extent_v) - { - con::error("Vertex declaration can only have up to {} routing entries", std::extent_v); - return AssetCreationResult::Failure(); - } - - auto* vertexDecl = m_memory.Alloc(); - - for (const auto& commonRoutingEntry : commonVertexDecl->m_routing) - { - vertexDecl->routing.data[vertexDecl->streamCount].source = commonRoutingEntry.m_source; - vertexDecl->routing.data[vertexDecl->streamCount].dest = commonRoutingEntry.m_destination; - vertexDecl->hasOptionalSource = vertexDecl->hasOptionalSource || commonRoutingEntry.m_source >= STREAM_SRC_OPTIONAL_BEGIN; - - vertexDecl->streamCount++; - } - - return AssetCreationResult::Success(context.AddSubAsset(AssetRegistration(subAssetName, vertexDecl))); - } - - private: - MemoryManager& m_memory; - }; -} // namespace - -namespace techset -{ - std::unique_ptr CreateVertexDeclCompilerT6(MemoryManager& memory) - { - return std::make_unique(memory); - } -} // namespace techset diff --git a/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.h b/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.h deleted file mode 100644 index 434e602f..00000000 --- a/src/ObjCompiling/Game/T6/Techset/VertexDeclCompilerT6.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#include "Asset/IAssetCreator.h" -#include "Utils/MemoryManager.h" - -#include - -namespace techset -{ - std::unique_ptr CreateVertexDeclCompilerT6(MemoryManager& memory); -} diff --git a/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp b/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp index 5e1497fd..4fc8aba3 100644 --- a/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp +++ b/src/ObjCompiling/Techset/CommonShaderArgCreator.cpp @@ -326,7 +326,7 @@ namespace const techset::CommonShaderArgCreatorDestination& input) override { assert(m_shader_info); - // TODO + return false; } @@ -577,7 +577,6 @@ namespace return std::move(result); } - // TODO return NoResult{}; } diff --git a/src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.cpp b/src/ObjCompiling/Techset/TechniqueCompiler.cpp.template similarity index 90% rename from src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.cpp rename to src/ObjCompiling/Techset/TechniqueCompiler.cpp.template index 6b61a657..4fff5f44 100644 --- a/src/ObjCompiling/Game/T6/Techset/TechniqueCompilerT6.cpp +++ b/src/ObjCompiling/Techset/TechniqueCompiler.cpp.template @@ -1,19 +1,50 @@ -#include "TechniqueCompilerT6.h" +#options GAME(T6) -#include "Game/T6/T6.h" -#include "Game/T6/Techset/TechsetConstantsT6.h" -#include "PrecompiledIndexT6.h" +#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".cpp" + +#set COMPILER_HEADER "\"TechniqueCompiler" + GAME + ".h\"" +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" +#set TECHSET_CONSTANTS_HEADER "\"Game/" + GAME + "/Techset/TechsetConstants" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See TechniqueCompiler.cpp.template. +// Do not modify, changes will be lost. + +#include COMPILER_HEADER + +#include GAME_HEADER +#include TECHSET_CONSTANTS_HEADER #include "Techset/CommonShaderArgCreator.h" #include "Techset/CommonTechniqueLoader.h" #include "Techset/LiteralConstsZoneState.h" #include "Utils/StringUtils.h" +#if defined(FEATURE_T6) +#set PRECOMPILED_INDEX_HEADER "\"Game/" + GAME + "/Techset/PrecompiledIndex" + GAME + ".h\"" +#include PRECOMPILED_INDEX_HEADER +#endif + #include #include #include #include -using namespace T6; +using namespace GAME; + +#set SHADER_LOADER_CLASS_NAME "TechniqueShaderLoader" + GAME +#set COMPILER_CLASS_NAME "TechniqueCompiler" + GAME namespace { @@ -236,10 +267,10 @@ namespace } } - class TechniqueShaderLoaderT6 final : public techset::ITechniqueShaderLoader + class SHADER_LOADER_CLASS_NAME final : public techset::ITechniqueShaderLoader { public: - explicit TechniqueShaderLoaderT6(AssetCreationContext& context) + explicit SHADER_LOADER_CLASS_NAME(AssetCreationContext& context) : m_context(context) { } @@ -282,10 +313,10 @@ namespace AssetCreationContext& m_context; }; - class TechniqueCompilerT6 final : public SubAssetCreator + class COMPILER_CLASS_NAME final : public SubAssetCreator { public: - TechniqueCompilerT6(MemoryManager& memory, Zone& zone, ISearchPath& searchPath) + COMPILER_CLASS_NAME(MemoryManager& memory, Zone& zone, ISearchPath& searchPath) : m_memory(memory), m_zone(zone), m_search_path(searchPath) @@ -295,7 +326,7 @@ namespace AssetCreationResult CreateSubAsset(const std::string& subAssetName, AssetCreationContext& context) override { bool failure = false; - TechniqueShaderLoaderT6 shaderLoader(context); + SHADER_LOADER_CLASS_NAME shaderLoader(context); const auto commonShaderArgCreator = techset::CommonShaderArgCreator::CreateDx11(shaderLoader, context, commonCodeSourceInfos); const auto commonTechnique = @@ -336,10 +367,12 @@ namespace }; } // namespace +#set CREATE_COMPILER_METHOD "CreateTechniqueCompiler" + GAME + namespace techset { - std::unique_ptr CreateTechniqueCompilerT6(MemoryManager& memory, Zone& zone, ISearchPath& searchPath) + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory, Zone& zone, ISearchPath& searchPath) { - return std::make_unique(memory, zone, searchPath); + return std::make_unique(memory, zone, searchPath); } } // namespace techset diff --git a/src/ObjCompiling/Techset/TechniqueCompiler.h.template b/src/ObjCompiling/Techset/TechniqueCompiler.h.template new file mode 100644 index 00000000..a1310e61 --- /dev/null +++ b/src/ObjCompiling/Techset/TechniqueCompiler.h.template @@ -0,0 +1,36 @@ +#options GAME(T6) + +#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".h" + +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See TechniqueCompiler.h.template. +// Do not modify, changes will be lost. + +#pragma once + +#include "Asset/IAssetCreator.h" +#include "SearchPath/ISearchPath.h" +#include "Utils/MemoryManager.h" + +#include + +#set CREATE_COMPILER_METHOD "CreateTechniqueCompiler" + GAME + +namespace techset +{ + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory, Zone& zone, ISearchPath& searchPath); +} diff --git a/src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.cpp b/src/ObjCompiling/Techset/TechsetCompiler.cpp.template similarity index 79% rename from src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.cpp rename to src/ObjCompiling/Techset/TechsetCompiler.cpp.template index b23280fc..b005610b 100644 --- a/src/ObjCompiling/Game/T6/Techset/TechsetCompilerT6.cpp +++ b/src/ObjCompiling/Techset/TechsetCompiler.cpp.template @@ -1,11 +1,37 @@ -#include "TechsetCompilerT6.h" +#options GAME(T6) -#include "Game/T6/T6.h" -#include "Game/T6/Techset/TechsetConstantsT6.h" +#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".cpp" + +#set COMPILER_HEADER "\"TechsetCompiler" + GAME + ".h\"" +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" +#set TECHSET_CONSTANTS_HEADER "\"Game/" + GAME + "/Techset/TechsetConstants" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See TechsetCompiler.cpp.template. +// Do not modify, changes will be lost. + +#include COMPILER_HEADER + +#include GAME_HEADER +#include TECHSET_CONSTANTS_HEADER #include "Techset/CommonTechsetLoader.h" #include "Techset/TechsetCommon.h" -using namespace T6; +using namespace GAME; + +#set COMPILER_CLASS_NAME "TechsetCompiler" + GAME namespace { @@ -71,10 +97,10 @@ namespace return techset; } - class TechsetCompilerT6 final : public AssetCreator + class COMPILER_CLASS_NAME final : public AssetCreator { public: - TechsetCompilerT6(ISearchPath& searchPath, MemoryManager& memory) + COMPILER_CLASS_NAME(ISearchPath& searchPath, MemoryManager& memory) : m_search_path(searchPath), m_memory(memory) { @@ -106,8 +132,6 @@ namespace // but the game determines the material type by techset name. // So this may just be a constraint that cannot be changed. ApplyMaterialTypeToTechnique(*techset->techniques[techniqueIndex], materialType); - - // Precompiled index? } return AssetCreationResult::Success(context.AddAsset(AssetRegistration(assetName, techset))); @@ -119,10 +143,12 @@ namespace }; } // namespace +#set CREATE_COMPILER_METHOD "CreateTechsetCompiler" + GAME + namespace techset { - std::unique_ptr CreateCompilerT6(MemoryManager& memory, ISearchPath& searchPath) + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory, ISearchPath& searchPath) { - return std::make_unique(searchPath, memory); + return std::make_unique(searchPath, memory); } } // namespace techset diff --git a/src/ObjCompiling/Techset/TechsetCompiler.h.template b/src/ObjCompiling/Techset/TechsetCompiler.h.template new file mode 100644 index 00000000..78ba580e --- /dev/null +++ b/src/ObjCompiling/Techset/TechsetCompiler.h.template @@ -0,0 +1,36 @@ +#options GAME(T6) + +#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".h" + +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See TechsetCompiler.h.template. +// Do not modify, changes will be lost. + +#pragma once + +#include "Asset/IAssetCreator.h" +#include "SearchPath/ISearchPath.h" +#include "Utils/MemoryManager.h" + +#include + +#set CREATE_COMPILER_METHOD "CreateTechsetCompiler" + GAME + +namespace techset +{ + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory, ISearchPath& searchPath); +} diff --git a/src/ObjCompiling/Techset/VertexDeclCompiler.cpp.template b/src/ObjCompiling/Techset/VertexDeclCompiler.cpp.template new file mode 100644 index 00000000..39e01cac --- /dev/null +++ b/src/ObjCompiling/Techset/VertexDeclCompiler.cpp.template @@ -0,0 +1,97 @@ +#options GAME(T6) + +#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".cpp" + +#set COMPILER_HEADER "\"VertexDeclCompiler" + GAME + ".h\"" +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" +#set TECHSET_CONSTANTS_HEADER "\"Game/" + GAME + "/Techset/TechsetConstants" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See VertexDeclCompiler.cpp.template. +// Do not modify, changes will be lost. + +#include COMPILER_HEADER + +#include GAME_HEADER +#include TECHSET_CONSTANTS_HEADER +#include "Techset/CommonVertexDeclCreator.h" +#include "Utils/Logging/Log.h" + +using namespace GAME; + +#set COMPILER_CLASS_NAME "VertexDeclCompiler" + GAME + +#if defined(FEATURE_T6) +#define ABSTRACT_CREATOR_NAME SubAssetCreator +#define OVERRIDEN_CREATOR_METHOD CreateSubAsset +#define ASSET_NAME SubAssetVertexDecl +#define INTERFACE_NAME ISubAssetCreator +#else +#define ABSTRACT_CREATOR_NAME AssetCreator +#define OVERRIDEN_CREATOR_METHOD CreateAsset +#define ASSET_NAME AssetVertexDecl +#define INTERFACE_NAME IAssetCreator +#endif + +namespace +{ + class COMPILER_CLASS_NAME final : public ABSTRACT_CREATOR_NAME + { + public: + explicit COMPILER_CLASS_NAME(MemoryManager& memory) + : m_memory(memory) + { + } + + AssetCreationResult OVERRIDEN_CREATOR_METHOD(const std::string& assetName, AssetCreationContext& context) override + { + const auto commonVertexDecl = techset::CreateVertexDeclFromName(assetName, commonRoutingInfos); + if (!commonVertexDecl) + return AssetCreationResult::Failure(); + + if (commonVertexDecl->m_routing.size() > std::extent_v) + { + con::error("Vertex declaration can only have up to {} routing entries", std::extent_v); + return AssetCreationResult::Failure(); + } + + auto* vertexDecl = m_memory.Alloc(); + + for (const auto& commonRoutingEntry : commonVertexDecl->m_routing) + { + vertexDecl->routing.data[vertexDecl->streamCount].source = commonRoutingEntry.m_source; + vertexDecl->routing.data[vertexDecl->streamCount].dest = commonRoutingEntry.m_destination; + vertexDecl->hasOptionalSource = vertexDecl->hasOptionalSource || commonRoutingEntry.m_source >= STREAM_SRC_OPTIONAL_BEGIN; + + vertexDecl->streamCount++; + } + + return AssetCreationResult::Success(context.AddSubAsset(AssetRegistration(assetName, vertexDecl))); + } + + private: + MemoryManager& m_memory; + }; +} // namespace + +#set CREATE_COMPILER_METHOD "CreateVertexDeclCompiler" + GAME + +namespace techset +{ + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory) + { + return std::make_unique(memory); + } +} // namespace techset diff --git a/src/ObjCompiling/Techset/VertexDeclCompiler.h.template b/src/ObjCompiling/Techset/VertexDeclCompiler.h.template new file mode 100644 index 00000000..1d20878b --- /dev/null +++ b/src/ObjCompiling/Techset/VertexDeclCompiler.h.template @@ -0,0 +1,41 @@ +#options GAME(T6) + +#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".h" + +#set GAME_HEADER "\"Game/" + GAME + "/" + GAME + ".h\"" + +#if GAME == "IW3" +#define FEATURE_IW3 +#elif GAME == "IW4" +#define FEATURE_IW4 +#elif GAME == "IW5" +#define FEATURE_IW5 +#elif GAME == "T5" +#define FEATURE_T5 +#elif GAME == "T6" +#define FEATURE_T6 +#endif + +// This file was templated. +// See VertexDeclCompiler.h.template. +// Do not modify, changes will be lost. + +#pragma once + +#include "Asset/IAssetCreator.h" +#include "Utils/MemoryManager.h" + +#include + +#set CREATE_COMPILER_METHOD "CreateVertexDeclCompiler" + GAME + +#if defined(FEATURE_T6) +#define INTERFACE_NAME ISubAssetCreator +#else +#define INTERFACE_NAME IAssetCreator +#endif + +namespace techset +{ + std::unique_ptr CREATE_COMPILER_METHOD(MemoryManager& memory); +} diff --git a/test/ObjCompilingTests.lua b/test/ObjCompilingTests.lua index e521a743..1e382f12 100644 --- a/test/ObjCompilingTests.lua +++ b/test/ObjCompilingTests.lua @@ -3,6 +3,7 @@ ObjCompilingTests = {} function ObjCompilingTests:include(includes) if includes:handle(self:name()) then includedirs { + "%{wks.location}/src/ObjCompiling", path.join(TestFolder(), "ObjCompilingTests") } end diff --git a/test/ObjCompilingTests/Game/T6/Techset/TechsetCompilerT6Test.cpp b/test/ObjCompilingTests/Game/T6/Techset/TechsetCompilerT6Test.cpp index 4eb3a709..51a38425 100644 --- a/test/ObjCompilingTests/Game/T6/Techset/TechsetCompilerT6Test.cpp +++ b/test/ObjCompilingTests/Game/T6/Techset/TechsetCompilerT6Test.cpp @@ -34,7 +34,7 @@ TEST_CASE("TechsetCompilerT6", "[techset][t6][compiler]") AssetCreationContext context(zone, &creators, &ignoredAssets); MockSearchPath searchPath; TestMemoryManager memory; - const auto sut = techset::CreateCompilerT6(memory, searchPath); + const auto sut = techset::CreateTechsetCompilerT6(memory, searchPath); SECTION("Sets correct worldVertFormat") {