//
// cocos2d::CCClippingNode::visit from 0xaf6da0 to 0xaf712c (908 bytes)
//
// 2 xrefs:
// > ??> @ 0x5c118
// > ??> @ 0x1210ea0
//
// 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 cocos2d::CCClippingNode::visit(cocos2d::CCClippingNode *a1)
{
cocos2d::CCClippingNode_vtbl *v2; // x0
int IsEnabled; // w27
cocos2d::CCDirector *v4; // x0
cocos2d::CCShaderCache *v5; // x0
cocos2d::CCGLProgram *v6; // x21
int UniformLocation; // [xsp+68h] [xbp+68h]
cocos2d::CCSize v8; // [xsp+90h] [xbp+90h] BYREF
cocos2d::CCPoint v9; // [xsp+A0h] [xbp+A0h] BYREF
cocos2d::CCPoint v10; // 0:s0.4,4:s1.4
cocos2d::CCPoint v11; // 0:s2.4,4:s3.4
cocos2d::ccColor4F v12; // 0:s4.4,4:s5.4,8:s6.4,12:s7.4
if ( dword_1230CF0 <= 0 )
goto LABEL_7;
v2 = a1[1].__vftable;
if ( v2 && (*((unsigned __int8 (__fastcall **)(cocos2d::CCClippingNode_vtbl *))v2->copyWithZone + 42))(v2) )
{
if ( dword_1230CF8 + 1 == dword_1230CF0 )
{
if ( byte_1230CF4 )
byte_1230CF4 = 0;
goto LABEL_7;
}
++dword_1230CF8;
IsEnabled = (unsigned __int8)glIsEnabled();
glGetIntegerv();
glGetIntegerv();
glGetIntegerv();
glGetIntegerv();
glGetIntegerv();
glGetIntegerv();
glGetIntegerv();
glEnable();
glStencilMask();
glClear();
glGetBooleanv();
glDepthMask();
glStencilFunc();
glStencilOp();
cocos2d::CCPoint::CCPoint(&v9, &stru_12454A8);
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v4);
cocos2d::ccpFromSize(&v8);
v10.x = 1.0;
v10.y = 1.0;
v11.x = 1.0;
v11.y = 1.0;
cocos2d::ccDrawSolidRect(v10, v11, v12);
glStencilFunc();
glStencilOp();
if ( *(float *)&a1[1].m_uID < 1.0 )
{
v5 = cocos2d::CCShaderCache::sharedShaderCache();
v6 = cocos2d::CCShaderCache::programForKey(v5, "ShaderPositionTextureColorAlphaTest");
UniformLocation = glGetUniformLocation();
cocos2d::CCGLProgram::use(v6);
cocos2d::CCGLProgram::setUniformLocationWith1f(v6, UniformLocation, *(float *)&a1[1].m_uID);
sub_AF6958((__int64 *)a1[1].__vftable, (__int64)v6);
}
kmGLPushMatrix();
cocos2d::CCNode::transform(a1);
(*((void (__fastcall **)(cocos2d::CCClippingNode_vtbl *))a1[1].copyWithZone + 92))(a1[1].__vftable);
kmGLPopMatrix();
glDepthMask();
glStencilFunc();
glStencilOp();
cocos2d::CCNode::visit(a1);
glStencilFunc();
glStencilOp();
glStencilMask();
if ( !IsEnabled )
glDisable();
--dword_1230CF8;
}
else if ( LOBYTE(a1[1].m_nLuaID) )
{
LABEL_7:
cocos2d::CCNode::visit(a1);
}
}