ShaderEffect.cpp (0x8728C0-0x873F50), ShadowCache.cpp (0x873F60-0x876370), ShaderEffectManager.cpp (0x876370-0x876E30) and ShaderEffectParser.cpp (0x876E30-0x8773F0). Shared additions: GxRenderTargetSet, CGxDevice::DeviceGetRenderTarget, C44Matrix::Identity, CWFrustum (m_sceneLink removed: 0xF4 stride), M2LIGHTTYPE and the CM2Lighting::SetupGxLights declaration. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
40 lines
1.6 KiB
C++
40 lines
1.6 KiB
C++
#ifndef ENGINE_SOURCE_SHADEREFFECT_SHADEREFFECTPARSER_H
|
|
#define ENGINE_SOURCE_SHADEREFFECT_SHADEREFFECTPARSER_H
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include "Engine/Source/ShaderEffect/Types.h"
|
|
|
|
class CShaderEffectParser {
|
|
public:
|
|
struct ParsedEffect {
|
|
struct FixedFuncPass {
|
|
/* 0000 */ uint32_t m_pass;
|
|
/* 0004 */ EGxTexOp m_colorOps[3];
|
|
/* 0010 */ EGxTexOp m_alphaOps[3];
|
|
};
|
|
|
|
struct ShaderPass {
|
|
/* 0000 */ char m_vertexShader[64];
|
|
/* 0040 */ char m_pixelShader[64];
|
|
};
|
|
|
|
/* 0000 */ char m_name[64];
|
|
/* 0040 */ uint32_t m_fixedFuncPassCount;
|
|
/* 0044 */ FixedFuncPass m_fixedFuncPasses[1];
|
|
/* 0060 */ uint32_t m_shaderPassCount;
|
|
/* 0064 */ ShaderPass m_shaderPasses[1];
|
|
};
|
|
|
|
static const char* s_gxTexOpNames[GxTexOps_Last];
|
|
static const EGxTexOp s_gxTexOpValues[GxTexOps_Last];
|
|
|
|
static int32_t ExtractFuncKeyword(const char* text, const char* keyword, char (*args)[64], uint32_t& argCount, uint32_t& pos);
|
|
static void ParseEffect(char* data, uint32_t size, uint32_t& pos, char (*args)[64], uint32_t argCount, ParsedEffect* effect);
|
|
static void ParseEffectFile(char* data, uint32_t size, void (*callback)(const ParsedEffect&, void*), void* param);
|
|
static void ParseFixedFunc(char* data, uint32_t size, uint32_t& pos, char (*args)[64], uint32_t argCount, ParsedEffect* effect);
|
|
static void ParseShader(char* data, uint32_t size, uint32_t& pos, char (*args)[64], uint32_t argCount, ParsedEffect* effect);
|
|
};
|
|
|
|
#endif
|