mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-05-02 08:29:36 +00:00
feat: compile iw5 techsets
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include "ObjCompilerIW5.h"
|
||||
|
||||
#include "Game/IW5/IW5.h"
|
||||
#include "Game/IW5/Techset/TechniqueCompilerIW5.h"
|
||||
#include "Game/IW5/Techset/TechsetCompilerIW5.h"
|
||||
#include "Game/IW5/Techset/VertexDeclCompilerIW5.h"
|
||||
#include "Image/ImageIwdPostProcessor.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -13,7 +16,10 @@ namespace
|
||||
{
|
||||
auto& memory = zone.Memory();
|
||||
|
||||
// No compilers yet
|
||||
collection.AddAssetCreator(techset::CreateVertexDeclCompilerIW5(memory));
|
||||
collection.AddAssetCreator(techset::CreateTechsetCompilerIW5(memory, searchPath));
|
||||
|
||||
collection.AddSubAssetCreator(techset::CreateTechniqueCompilerIW5(memory, zone, searchPath));
|
||||
}
|
||||
|
||||
void ConfigurePostProcessors(AssetCreatorCollection& collection,
|
||||
@@ -39,5 +45,6 @@ void ObjCompiler::ConfigureCreatorCollection(AssetCreatorCollection& collection,
|
||||
IOutputPath& outDir,
|
||||
IOutputPath& cacheDir) const
|
||||
{
|
||||
ConfigureCompilers(collection, zone, searchPath);
|
||||
ConfigurePostProcessors(collection, zone, zoneDefinition, searchPath, zoneStates, outDir);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".cpp"
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace
|
||||
pass.customSamplerFlags = static_cast<decltype(MaterialPass::customSamplerFlags)>(commonPass.m_sampler_flags);
|
||||
}
|
||||
|
||||
#ifdef FEATURE_IW4
|
||||
#if defined(FEATURE_IW4) || defined(FEATURE_IW5)
|
||||
// Not sure if this is actually how this is calculated.
|
||||
// It produces identical results at least though.
|
||||
constexpr MaterialConstantSource ALLOWED_PIXEL_CONSTANTS_FOR_FLAG_200[]{
|
||||
@@ -282,7 +282,7 @@ namespace
|
||||
#if defined(FEATURE_IW3)
|
||||
if (lowerTechniqueName == "zprepass")
|
||||
technique.flags |= MTL_TECHFLAG_ZPREPASS;
|
||||
#elif defined(FEATURE_IW4)
|
||||
#elif defined(FEATURE_IW4) || defined(FEATURE_IW5)
|
||||
// Not a particularly cool way to do this but...
|
||||
// the game actually does this :shrug:
|
||||
if (lowerTechniqueName == "zprepass")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechniqueCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/TechsetCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".cpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#options GAME(IW3, IW4, T5, T6)
|
||||
#options GAME(IW3, IW4, IW5, T5, T6)
|
||||
|
||||
#filename "Game/" + GAME + "/Techset/VertexDeclCompiler" + GAME + ".h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user