//
// PlayerObject::resetTouchedRings from 0x4400dc to 0x440182 (166 bytes)
//
// 3 xrefs:
// > PlayerObject::resetObject @ 0x440310
// > GJBaseGameLayer::update @ 0x5bdcde
// > GJBaseGameLayer::update @ 0x5bdcee
//
// 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:48:25 +0000
//
_DWORD *__fastcall PlayerObject::resetTouchedRings(cocos2d::CCArray **this, unsigned int a2)
{
_DWORD *result; // r0
_DWORD *v4; // r7
unsigned int v5; // r5
_DWORD *v6; // r5
_DWORD *v7; // r3
unsigned int v8[2]; // [sp+0h] [bp-8h] BYREF
v8[0] = (unsigned int)this;
v8[1] = a2;
if ( a2 )
{
result = (_DWORD *)cocos2d::CCArray::removeAllObjects(*(this + 519));
}
else
{
v4 = this + 520;
v5 = 0;
while ( 1 )
{
result = (_DWORD *)cocos2d::CCArray::count(*(this + 519));
if ( v5 >= (unsigned int)result )
break;
v8[0] = *(_DWORD *)(cocos2d::CCArray::objectAtIndex(*(this + 519), v5) + 780);
if ( std::__hash_table,std::equal_to,std::allocator>::find(v4, v8) )
++v5;
else
cocos2d::CCArray::removeObjectAtIndex(*(this + 519), v5, 1);
}
}
if ( *(this + 523) )
{
for ( result = *(this + 522); result; result = v6 )
{
v6 = (_DWORD *)*result;
operator delete(result);
}
v7 = *(this + 521);
*(this + 522) = nullptr;
while ( result != v7 )
{
*((_DWORD *)*(this + 520) + (_DWORD)result) = 0;
result = (_DWORD *)((char *)result + 1);
}
*(this + 523) = nullptr;
}
return result;
}