//
// ShaderLayer::preGrayscaleShader from 0x6848e0 to 0x6849a8 (200 bytes)
//
// 1 xrefs:
// > ShaderLayer::performCalculations @ 0x685602
//
// 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::preGrayscaleShader(ShaderLayer *this)
{
cocos2d::CCGLProgram *v2; // r0
int result; // r0
cocos2d::CCGLProgram *v4; // r0
cocos2d::CCGLProgram *v5; // r0
if ( *((float *)this + 213) > 0.0 || cocos2d::CCNode::getActionByTag(this, 32) )
*((_BYTE *)this + 950) = 1;
v2 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
result = cocos2d::CCGLProgram::setUniformLocationWith1f(v2, *((_DWORD *)this + 342), *((float *)this + 213));
if ( *((float *)this + 213) > 0.0 )
{
v4 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
cocos2d::CCGLProgram::setUniformLocationWith1f(v4, *((_DWORD *)this + 344), (float)*((unsigned __int8 *)this + 856));
v5 = (cocos2d::CCGLProgram *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 241) + 328))(*((_DWORD *)this + 241));
return cocos2d::CCGLProgram::setUniformLocationWith3f(
v5,
*((_DWORD *)this + 343),
(float)*((unsigned __int8 *)this + 864) / 255.0,
(float)*((unsigned __int8 *)this + 865) / 255.0,
(float)*((unsigned __int8 *)this + 866) / 255.0);
}
return result;
}