//
// GJBaseGameLayer::destroyObject from 0x1001061d0 to 0x100106291 (193 bytes)
//
// 9 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x100104ce7
// > GJBaseGameLayer::collisionCheckObjects @ 0x100105567
// > PlayerObject::collidedWithObjectInternal @ 0x1003f6f2b
// > PlayerObject::collidedWithObjectInternal @ 0x1003f6f82
// > PlayerObject::collidedWithObjectInternal @ 0x1003f749b
// > PlayerObject::collidedWithObjectInternal @ 0x1003f7554
// > PlayerObject::collidedWithObjectInternal @ 0x1003f7892
// > PlayerObject::collidedWithObjectInternal @ 0x1003f8300
// > PlayerObject::collidedWithObjectInternal @ 0x1003f847e
//
// This function is hookable on this platform (idp: pc, 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:21:31 +0000
//
void __fastcall GJBaseGameLayer::destroyObject(__int64 a1, _DWORD *a2, double a3)
{
int v3; // r15d
__int64 v4; // rax
_BYTE v5[40]; // [rsp+8h] [rbp-28h] BYREF
if ( (*(unsigned int (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1800LL))(a2) == 30
&& (unsigned __int8)GameObject::shouldShowPickupEffects(a2) )
{
v3 = a2[423];
if ( v3 <= 0 )
{
GameObject::spawnDefaultPickupParticle(a2, a1);
}
else
{
v4 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 192LL))(a2);
sub_1002782D0(v5, v4);
a3 = 0.0;
GJBaseGameLayer::spawnParticleTrigger(a1, (unsigned int)v3, v5, 0.0, 1.0);
}
}
GameObject::playDestroyObjectAnim(a2, a1);
GameObject::destroyObject(a2);
if ( (*(unsigned int (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1800LL))(a2) == 21 )
GJBaseGameLayer::gameEventTriggered(a1, 61, 0, 0, a3);
}