//
// cocos2d::extension::CCScrollView::visit from 0x1003f89e0 to 0x1003f8b4b (363 bytes)
//
// 2 xrefs:
// > ??> @ 0x100933450
// > ??> @ 0x100935898
//
// 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 cocos2d::extension::CCScrollView::visit(cocos2d::extension::CCScrollView *a1)
{
cocos2d::CCGridBase *m_pGrid; // rdi
cocos2d::CCArray *m_pChildren; // rax
cocos2d::ccArray *data; // r15
unsigned __int64 v5; // r12
cocos2d::CCObject *v6; // r14
unsigned __int64 v7; // r14
cocos2d::CCObject *v8; // rdi
cocos2d::CCEGLView *v9; // rax
cocos2d::CCGridBase *v10; // rdi
if ( ((unsigned __int8 (__fastcall *)(cocos2d::extension::CCScrollView *))a1->isVisible)(a1) )
{
sub_100207E70();
m_pGrid = a1->m_pGrid;
if ( m_pGrid && m_pGrid->m_bActive )
{
cocos2d::CCGridBase::beforeDraw(m_pGrid);
cocos2d::CCNode::transformAncestors(a1);
}
cocos2d::CCNode::transform(a1);
cocos2d::extension::CCScrollView::beforeDraw(a1);
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
data = m_pChildren->data;
if ( data->num )
{
v5 = 0;
do
{
v6 = data->arr[v5];
if ( ((int (__fastcall *)(cocos2d::CCObject *))v6->__vftable[1].isEqual)(v6) >= 0 )
break;
((void (__fastcall *)(cocos2d::CCObject *))v6->__vftable[9].~CCObject_0)(v6);
++v5;
}
while ( v5 < data->num );
}
else
{
LODWORD(v5) = 0;
}
((void (__fastcall *)(cocos2d::extension::CCScrollView *))a1->draw)(a1);
if ( (unsigned int)v5 < data->num )
{
v7 = (unsigned int)v5;
do
{
v8 = data->arr[v7];
((void (__fastcall *)(cocos2d::CCObject *))v8->__vftable[9].~CCObject_0)(v8);
++v7;
}
while ( v7 < data->num );
}
}
else
{
((void (__fastcall *)(cocos2d::extension::CCScrollView *))a1->draw)(a1);
}
if ( a1->m_bClippingToBounds )
{
if ( !a1->m_bScissorRestored )
{
glDisable(0xC11u);
v10 = a1->m_pGrid;
if ( v10 )
{
LABEL_21:
if ( v10->m_bActive )
cocos2d::CCGridBase::afterDraw(v10, a1);
}
LABEL_24:
sub_100207EB0((__int64)v10);
return;
}
v9 = cocos2d::CCEGLView::sharedOpenGLView();
((void (__fastcall *)(cocos2d::CCEGLView *, float, float, float, float))v9->setScissorInPoints)(
v9,
a1->m_tParentScissorRect.origin.x,
a1->m_tParentScissorRect.origin.y,
a1->m_tParentScissorRect.size.width,
a1->m_tParentScissorRect.size.height);
}
v10 = a1->m_pGrid;
if ( v10 )
goto LABEL_21;
goto LABEL_24;
}
}