//
// GJBaseGameLayer::removeTemporaryParticles from 0x59da90 to 0x59db0c (124 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x5b954c
//
// 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:53:14 +0000
//
unsigned int __fastcall GJBaseGameLayer::removeTemporaryParticles(
GJBaseGameLayer *this,
unsigned int a2,
unsigned int a3)
{
cocos2d::CCArray **v3; // r8
int *v4; // r4
unsigned int v5; // r7
unsigned int result; // r0
_DWORD *v7; // r5
unsigned int v8[3]; // [sp+0h] [bp-Ch] BYREF
v8[0] = (unsigned int)this;
v8[1] = a2;
v8[2] = a3;
v3 = (cocos2d::CCArray **)((char *)this + 10680);
v4 = (int *)((char *)this + 10684);
v5 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(*v3);
if ( v5 >= result )
break;
v7 = (_DWORD *)cocos2d::CCArray::objectAtIndex(*v3, v5);
if ( (*(int (__fastcall **)(_DWORD *))(*v7 + 788))(v7) )
{
(*(void (__fastcall **)(_DWORD *))(*v7 + 268))(v7);
v8[0] = v7[1];
std::__hash_table,std::equal_to,std::allocator>::__erase_unique(v4, v8);
cocos2d::CCArray::fastRemoveObjectAtIndex(*v3, v5);
}
else
{
++v5;
}
}
return result;
}