// // ShaderLayer::preGrayscaleShader from 0x100272870 to 0x100272944 (212 bytes) // // 1 xrefs: // > ShaderLayer::performCalculations @ 0x100273180 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall ShaderLayer::preGrayscaleShader(ShaderLayer *a1) { cocos2d::CCGLProgram *v2; // x0 cocos2d::CCGLProgram *v3; // x0 unsigned int v4; // s0 cocos2d::CCGLProgram *v5; // x0 unsigned int v6; // s0 unsigned int v7; // s1 unsigned int v8; // s3 if ( a1->m_state.m_grayscaleValue > 0.0 || cocos2d::CCNode::getActionByTag(a1, 32) ) a1->m_state.m_usesShaders = 1; v2 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->getShaderProgram)(a1->m_sprite); cocos2d::CCGLProgram::setUniformLocationWith1f(v2, a1->m_grayscaleValueUniform, a1->m_state.m_grayscaleValue); if ( a1->m_state.m_grayscaleValue > 0.0 ) { v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->getShaderProgram)(a1->m_sprite); LOBYTE(v4) = a1->m_state.m_grayscaleUseLum; cocos2d::CCGLProgram::setUniformLocationWith1f(v3, a1->m_grayscaleUseLumUniform, (float)v4); v5 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->getShaderProgram)(a1->m_sprite); LOBYTE(v6) = a1->m_state.m_grayscaleTint.r; LOBYTE(v7) = a1->m_state.m_grayscaleTint.g; LOBYTE(v8) = a1->m_state.m_grayscaleTint.b; cocos2d::CCGLProgram::setUniformLocationWith3f( v5, a1->m_grayscaleTintUniform, (float)v6 / 255.0, (float)v7 / 255.0, (float)v8 / 255.0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source