//
// PlayLayer::removeAllObjects from 0x402798 to 0x402852 (186 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x40a8ca
// > EndLevelLayer::onEdit @ 0x533ff2
//
// 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 11:47:25 +0000
//
int __fastcall PlayLayer::removeAllObjects(PlayLayer *this)
{
int v2; // r3
_DWORD *v4; // r2
int *v5; // r6
int *v6; // r5
int v7; // r7
int v8; // t1
*((_BYTE *)this + 11796) = 0;
UILayer::disableMenu(*((UILayer **)this + 2810));
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 519) + 656))(*((_DWORD *)this + 519), 1);
PlayerObject::deactivateParticle(*((PlayerObject **)this + 519));
PlayerObject::deactivateStreak(*((PlayerObject **)this + 519), 1);
PlayerObject::toggleGhostEffect(*((_DWORD *)this + 519), 0);
if ( *((_BYTE *)this + 866) )
{
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 520) + 656))(*((_DWORD *)this + 520), 1);
PlayerObject::deactivateParticle(*((PlayerObject **)this + 520));
PlayerObject::deactivateStreak(*((PlayerObject **)this + 520), 1);
PlayerObject::toggleGhostEffect(*((_DWORD *)this + 520), 0);
}
v2 = *((_DWORD *)this + 522);
if ( v2 )
{
v4 = *(_DWORD **)(v2 + 52);
if ( *v4 )
{
v5 = (int *)v4[3];
v6 = &v5[*v4 - 1];
while ( v5 <= v6 )
{
v8 = *v5++;
v7 = v8;
if ( !v8 )
break;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 656))(v7, 1);
(*(void (__fastcall **)(int))(*(_DWORD *)v7 + 368))(v7);
}
}
}
return cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 522));
}