//
// GameToolbox::preVisitWithClippingRect from 0x1004eabf0 to 0x1004eacca (218 bytes)
//
// 4 xrefs:
// > BoomScrollLayer::visit @ 0x10038fa90
// > CCScrollLayerExt::visit @ 0x10041c1f1
// > ParticlePreviewLayer::visit @ 0x10046be98
// > ScrollingLayer::visit @ 0x1007ff9d2
//
// 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:21 +0000
//
__int64 __fastcall GameToolbox::preVisitWithClippingRect(__int64 a1, __m128 *a2)
{
__int64 result; // rax
unsigned __int64 *v4; // rsi
__int64 v5; // rax
__int64 v6; // rax
__m128 v7; // [rsp+0h] [rbp-40h] BYREF
__m128 v8; // [rsp+10h] [rbp-30h] BYREF
double v9[4]; // [rsp+20h] [rbp-20h] BYREF
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1);
if ( (_BYTE)result )
{
glEnable(0xC11u);
sub_1002787F0(&v7, (unsigned __int64 *)a2);
v4 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 192LL))(a1);
sub_100278350(v9, v4, (unsigned __int64 *)&v7);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);
if ( v5 )
cocos2d::CCNode::convertToWorldSpace((double *)v8.i64, v5, (unsigned int *)v9);
else
sub_1002782D0(&v8, v9);
sub_100278300(&v7, &v8);
sub_1002787F0(&v8, (unsigned __int64 *)&v7);
sub_100278810(a2, (unsigned __int64 *)&v8);
v6 = cocos2d::CCEGLView::sharedOpenGLView(a2);
return (*(__int64 (__fastcall **)(__int64, float, float, float, float))(*(_QWORD *)v6 + 112LL))(
v6,
a2->f32[0],
a2->f32[1],
a2->f32[2],
a2->f32[3]);
}
return result;
}