//
// cocos2d::CCClippingNode::visit from 0x7de604 to 0x7de86c (616 bytes)
//
// 0 xrefs:
//
// 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 12:00:47 +0000
//
void __fastcall cocos2d::CCClippingNode::visit(cocos2d::CCClippingNode *this)
{
int v2; // r0
char v3; // r6
int v4; // r6
int v5; // r8
GLenum v6; // r0
cocos2d::CCDirector *v7; // r0
int v8; // r0
GLenum v9; // r0
cocos2d::CCShaderCache *v10; // r0
cocos2d::CCShaderCache *v11; // r0
cocos2d::CCGLProgram *v12; // r6
int UniformLocation; // r5
int IsEnabled; // [sp+8h] [bp-5Ch]
GLboolean flag; // [sp+17h] [bp-4Dh] BYREF
GLint params; // [sp+18h] [bp-4Ch] BYREF
GLint v17; // [sp+1Ch] [bp-48h] BYREF
GLint v18; // [sp+20h] [bp-44h] BYREF
GLint v19; // [sp+24h] [bp-40h] BYREF
GLint v20; // [sp+28h] [bp-3Ch] BYREF
GLint v21; // [sp+2Ch] [bp-38h] BYREF
GLint v22; // [sp+30h] [bp-34h] BYREF
_BYTE v23[8]; // [sp+34h] [bp-30h] BYREF
float v24[2]; // [sp+3Ch] [bp-28h] BYREF
_DWORD v25[6]; // [sp+44h] [bp-20h] BYREF
if ( dword_D1FE44 <= 0 )
goto LABEL_2;
v2 = *((_DWORD *)this + 66);
if ( v2 && (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 176))(v2) )
{
v3 = dword_D1FE4C + 1;
if ( dword_D1FE4C + 1 == dword_D1FE44 )
{
if ( byte_D1FE48 )
byte_D1FE48 = 0;
goto LABEL_2;
}
params = -1;
v19 = -1;
v17 = 519;
++dword_D1FE4C;
v18 = 0;
v4 = 1 << v3;
v20 = 7680;
v21 = 7680;
v22 = 7680;
v5 = (v4 - 1) | v4;
IsEnabled = glIsEnabled(0xB90u);
glGetIntegerv(0xB98u, ¶ms);
glGetIntegerv(0xB92u, &v17);
glGetIntegerv(0xB97u, &v18);
glGetIntegerv(0xB93u, &v19);
glGetIntegerv(0xB94u, &v20);
glGetIntegerv(0xB95u, &v21);
glGetIntegerv(0xB96u, &v22);
glEnable(0xB90u);
glStencilMask(v4);
glClear(0x400u);
flag = 1;
glGetBooleanv(0xB72u, &flag);
glDepthMask(0);
glStencilFunc(0x200u, v4, v4);
if ( *((_BYTE *)this + 272) )
v6 = 7681;
else
v6 = 0;
glStencilOp(v6, 0x1E00u, 0x1E00u);
v7 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint(v25, (const cocos2d::CCPoint *)&unk_D2F47C);
v8 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v23, v8);
cocos2d::ccpFromSize((cocos2d *)v24, (const cocos2d::CCSize *)v23);
v25[4] = 1.0;
v25[5] = 1.0;
v25[2] = 1.0;
v25[3] = 1.0;
cocos2d::ccDrawSolidRect(
(cocos2d::CCPoint *)v25,
v24,
COERCE_INT(1.0),
COERCE_INT(1.0),
COERCE_INT(1.0),
COERCE_INT(1.0));
glStencilFunc(0x200u, v4, v4);
if ( *((_BYTE *)this + 272) )
v9 = 0;
else
v9 = 7681;
glStencilOp(v9, 0x1E00u, 0x1E00u);
if ( *((float *)this + 67) < 1.0 )
{
v11 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache(v10);
v12 = (cocos2d::CCGLProgram *)cocos2d::CCShaderCache::programForKey(v11, "ShaderPositionTextureColorAlphaTest");
UniformLocation = glGetUniformLocation();
cocos2d::CCGLProgram::use(v12);
cocos2d::CCGLProgram::setUniformLocationWith1f(v12, UniformLocation, *((float *)this + 67));
sub_7DE3B4(*((_DWORD *)this + 66), (int)v12);
}
kmGLPushMatrix();
cocos2d::CCNode::transform(this);
(*(void (__fastcall **)(_DWORD))(**((_DWORD **)this + 66) + 376))(*((_DWORD *)this + 66));
kmGLPopMatrix();
glDepthMask(flag);
glStencilFunc(0x202u, v5, v5);
glStencilOp(0x1E00u, 0x1E00u, 0x1E00u);
cocos2d::CCNode::visit((int)this);
glStencilFunc(v17, v18, v19);
glStencilOp(v20, v21, v22);
glStencilMask(params);
if ( !IsEnabled )
glDisable(0xB90u);
--dword_D1FE4C;
}
else if ( *((_BYTE *)this + 272) )
{
LABEL_2:
cocos2d::CCNode::visit((int)this);
}
}