//
// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0xb18814 to 0xb188b4 (160 bytes)
//
// 5 xrefs:
// > ??> @ 0x31ec0
// > ??> @ 0x1137a08
// > ??> @ 0x1202c38
// > ??> @ 0x1218d28
// > ??> @ 0x121aba8
//
// 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::CCSpriteBatchNode::removeAllChildrenWithCleanup(cocos2d::CCSpriteBatchNode *a1, bool a2)
{
cocos2d::CCArray *m_pobDescendants; // x0
cocos2d::CCArray *v5; // x0
cocos2d::ccArray *data; // x1
cocos2d::CCObject **arr; // x19
cocos2d::CCObject **v8; // x20
cocos2d::CCObject *v9; // x0
cocos2d::_ccArray *v10; // x1
m_pobDescendants = a1->m_pobDescendants;
if ( m_pobDescendants )
{
if ( (unsigned int)cocos2d::CCArray::count(m_pobDescendants) )
{
v5 = a1->m_pobDescendants;
if ( v5 )
{
data = v5->data;
if ( data->num )
{
arr = data->arr;
v8 = &arr[data->num - 1];
while ( v8 >= arr )
{
v9 = *arr;
if ( !*arr )
break;
++arr;
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v9->__vftable[13].getTag)(v9, 0);
}
}
}
}
}
cocos2d::CCNode::removeAllChildrenWithCleanup(a1, a2);
cocos2d::CCArray::removeAllObjects(a1->m_pobDescendants, v10);
cocos2d::CCTextureAtlas::removeAllQuads(a1->m_pobTextureAtlas);
}