//
// ShaderLayer::preColorChangeShader from 0x684be8 to 0x684d0c (292 bytes)
//
// 1 xrefs:
// > ShaderLayer::performCalculations @ 0x68561a
//
// 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:04 +0000
//
int __fastcall ShaderLayer::preColorChangeShader(ShaderLayer *this)
{
float v2; // s14
int v3; // r0
cocos2d::CCGLProgram *v4; // r0
int result; // r0
cocos2d::CCGLProgram *v6; // r0
float v7; // r2
cocos2d::CCGLProgram *v8; // r0
v2 = *((float *)this + 224);
v3 = *((_DWORD *)this + 241);
if ( v2 == 1.0
&& *((float *)this + 225) == 1.0
&& *((float *)this + 226) == 1.0
&& *((float *)this + 227) == 0.0
&& *((float *)this + 228) == 0.0
&& *((float *)this + 229) == 0.0 )
{
v4 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(int))(*(_DWORD *)v3 + 328))(v3);
cocos2d::CCGLProgram::setUniformLocationWith3f(v4, *((_DWORD *)this + 349), 0.0, 0.0, 0.0);
result = cocos2d::CCNode::getActionByTag(this, 42);
if ( result
|| (result = cocos2d::CCNode::getActionByTag(this, 43)) != 0
|| (result = cocos2d::CCNode::getActionByTag(this, 44)) != 0
|| (result = cocos2d::CCNode::getActionByTag(this, 39)) != 0
|| (result = cocos2d::CCNode::getActionByTag(this, 40)) != 0
|| (result = cocos2d::CCNode::getActionByTag(this, 41)) != 0 )
{
*((_BYTE *)this + 950) = 1;
}
}
else
{
*((_BYTE *)this + 950) = 1;
v6 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(int))(*(_DWORD *)v3 + 328))(v3);
if ( *((float *)this + 224) > 0.001 )
v7 = *((float *)this + 224);
else
v7 = 0.001;
cocos2d::CCGLProgram::setUniformLocationWith3f(
v6,
*((_DWORD *)this + 349),
v7,
*((float *)this + 225),
*((float *)this + 226));
v8 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
return cocos2d::CCGLProgram::setUniformLocationWith3f(
v8,
*((_DWORD *)this + 350),
*((float *)this + 227),
*((float *)this + 228),
*((float *)this + 229));
}
return result;
}