//
// GJBaseGameLayer::destroyObject from 0x100128940 to 0x100128a01 (193 bytes)
//
// 9 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x10012726c
// > GJBaseGameLayer::collisionCheckObjects @ 0x100127ae1
// > PlayerObject::collidedWithObjectInternal @ 0x100409dab
// > PlayerObject::collidedWithObjectInternal @ 0x100409e02
// > PlayerObject::collidedWithObjectInternal @ 0x10040a31b
// > PlayerObject::collidedWithObjectInternal @ 0x10040a3d4
// > PlayerObject::collidedWithObjectInternal @ 0x10040a712
// > PlayerObject::collidedWithObjectInternal @ 0x10040b180
// > PlayerObject::collidedWithObjectInternal @ 0x10040b2fe
//
// 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)
{
float v2; // xmm2_4
int v3; // r15d
_BYTE v4[40]; // [rsp+8h] [rbp-28h] BYREF
if ( ((unsigned int (__fastcall *)(GameObject *))a2->getType)(a2) == 30 && GameObject::shouldShowPickupEffects(a2) )
{
v3 = *(_DWORD *)(&a2[1]._cascadeOpacityEnabled + 3);
if ( v3 <= 0 )
{
GameObject::spawnDefaultPickupParticle(a2, a1);
}
else
{
((void (__fastcall *)(GameObject *))a2->getPosition)(a2);
sub_10028CC60(v4);
GJBaseGameLayer::spawnParticleTrigger(a1, v3, 0, 1.0, v2);
}
}
GameObject::playDestroyObjectAnim(a2, a1);
GameObject::destroyObject(a2);
if ( ((unsigned int (__fastcall *)(GameObject *))a2->getType)(a2) == 21 )
GJBaseGameLayer::gameEventTriggered(a1, DestroyBlock, 0, 0);
}