//
// ShaderLayer::preChromaticShader from 0x68381c to 0x683902 (230 bytes)
//
// 1 xrefs:
// > ShaderLayer::performCalculations @ 0x6855d8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:56:03 +0000
//
int __fastcall ShaderLayer::preChromaticShader(ShaderLayer *this)
{
int v2; // r3
float v3; // s18
float v4; // s15
float v5; // s17
float v6; // s16
cocos2d::CCGLProgram *v7; // r0
cocos2d::CCGLProgram *v8; // r0
if ( *((float *)this + 149) != 0.0
|| *((float *)this + 150) != 0.0
|| cocos2d::CCNode::getActionByTag(this, 1)
|| cocos2d::CCNode::getActionByTag(this, 2) )
{
*((_BYTE *)this + 950) = 1;
}
if ( *((_BYTE *)this + 604) && (v2 = *((_DWORD *)this + 244)) != 0 )
v3 = fabsf((*(float (__fastcall **)(_DWORD))(**(_DWORD **)(v2 + 2436) + 84))(*(_DWORD *)(v2 + 2436)));
else
v3 = 1.0;
v4 = *((float *)this + 249) / 1.2019;
v5 = v4 / *((float *)this + 255);
v6 = v4 / *((float *)this + 256);
v7 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
cocos2d::CCGLProgram::setUniformLocationWith1f(
v7,
*((_DWORD *)this + 313),
(float)((float)(v5 * *((float *)this + 149)) * *((float *)this + 96)) * v3);
v8 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
return cocos2d::CCGLProgram::setUniformLocationWith1f(
v8,
*((_DWORD *)this + 314),
(float)((float)(v6 * *((float *)this + 150)) * *((float *)this + 97)) * v3);
}