//
// GJBaseGameLayer::destroyObject from 0x1001e9474 to 0x1001e9558 (228 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e84ec
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8be8
// > PlayerObject::collidedWithObjectInternal @ 0x100222bb4
// > PlayerObject::collidedWithObjectInternal @ 0x100222f50
// > PlayerObject::collidedWithObjectInternal @ 0x100223048
//
// 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 __fastcall GJBaseGameLayer::destroyObject(GJBaseGameLayer *a1, GameObject *a2)
{
int v4; // w21
__int64 *v5; // x0
float v6; // s2
float v7; // s3
__int64 v8; // [xsp+8h] [xbp-28h] BYREF
cocos2d::CCPoint v9; // 0:s0.4,4:s1.4
if ( ((unsigned int (__fastcall *)(GameObject *))a2->getType)(a2) == 30 && GameObject::shouldShowPickupEffects(a2) )
{
v4 = *(_DWORD *)(&a2[1]._cascadeOpacityEnabled + 3);
if ( v4 < 1 )
{
GameObject::spawnDefaultPickupParticle(a2, a1);
}
else
{
v5 = (__int64 *)((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);
sub_1000229B8(&v8, v5);
v9.x = 0.0;
v9.y = 1.0;
GJBaseGameLayer::spawnParticleTrigger(a1, v4, v9, v6, v7);
}
}
GameObject::playDestroyObjectAnim(a2, a1);
GameObject::destroyObject(a2);
if ( ((unsigned int (__fastcall *)(GameObject *))a2->getType)(a2) == 21 )
GJBaseGameLayer::gameEventTriggered(a1, DestroyBlock, 0, 0);
}