//
// cocos2d::CCGridBase::afterDraw from 0x1004dea30 to 0x1004deaf0 (192 bytes)
//
// 6 xrefs:
// > cocos2d::CCSpriteBatchNode::visit @ 0x100155c5c
// > cocos2d::CCNode::visit @ 0x10026004a
// > cocos2d::CCParticleBatchNode::visit @ 0x1003b20df
// > ShaderLayer::visit @ 0x1003bb315
// > cocos2d::extension::CCScrollView::visit @ 0x1003e5d01
// > cocos2d::CCRenderTexture::visit @ 0x1006c8daf
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:31:17 +0000
//
__int64 __fastcall cocos2d::CCGridBase::afterDraw(__int64 a1, __int64 a2)
{
__int64 v3; // rax
_QWORD *v4; // rsi
double v5; // xmm0_8
double v6; // xmm1_8
__int64 v7; // rax
GLuint v8; // eax
__int64 v10; // [rsp+8h] [rbp-18h] BYREF
cocos2d::CCGrabber::afterRender(*(_QWORD *)(a1 + 88), *(_QWORD *)(a1 + 72));
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::setProjection(v3, *(_DWORD *)(a1 + 112));
if ( *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 672LL))(a2) + 92) == 1 )
{
v4 = (_QWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 312LL))(a2);
sub_1002782D0(&v10, v4);
*(_QWORD *)&v5 = (unsigned int)v10;
*(_QWORD *)&v6 = HIDWORD(v10);
kmGLTranslatef();
v7 = (*(__int64 (__fastcall **)(__int64, float, float, double))(*(_QWORD *)a2 + 672LL))(
a2,
*(float *)&v5,
*(float *)&v6,
0.0);
cocos2d::CCCamera::locate(v7, v5, v6);
kmGLTranslatef();
}
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 72) + 104LL))(*(_QWORD *)(a1 + 72));
cocos2d::ccGLBindTexture2D(v8);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 80LL))(a1);
}