//
// GJBaseGameLayer::destroyObject from 0x9c2208 to 0x9c2328 (288 bytes)
//
// 7 xrefs:
// > PlayerObject::collidedWithObjectInternal @ 0x75b524
// > PlayerObject::collidedWithObjectInternal @ 0x75bf58
// > PlayerObject::collidedWithObjectInternal @ 0x75c054
// > PlayerObject::collidedWithObjectInternal @ 0x75c3b4
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8bf4
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8fd8
// > ??> @ 0x41098
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:58:30 +0000
//
__int64 __fastcall GJBaseGameLayer::destroyObject(GJBaseGameLayer *this, GameObject *a2)
{
int v5; // w23
const cocos2d::CCPoint *v6; // x0
_BYTE v7[8]; // [xsp+50h] [xbp+50h] BYREF
if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 30
&& (unsigned __int8)GameObject::shouldShowPickupEffects(a2) )
{
v5 = *((_DWORD *)a2 + 423);
if ( v5 <= 0 )
{
GameObject::spawnDefaultPickupParticle(a2, this);
}
else
{
v6 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)a2 + 192LL))(a2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v7, v6);
GJBaseGameLayer::spawnParticleTrigger(this, v5, (__int64)v7, 0.0, 1.0);
}
}
GameObject::playDestroyObjectAnim(a2, this);
GameObject::destroyObject(a2);
if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 21 )
GJBaseGameLayer::gameEventTriggered((__int64)this, 0x3Du, 0, 0);
return _stack_chk_guard;
}