//
// GJBaseGameLayer::destroyObject from 0x492028 to 0x4920c6 (158 bytes)
//
// 6 xrefs:
// > PlayerObject::collidedWithObjectInternal @ 0x345e08
// > PlayerObject::collidedWithObjectInternal @ 0x345fbc
// > PlayerObject::collidedWithObjectInternal @ 0x346476
// > PlayerObject::collidedWithObjectInternal @ 0x346668
// > GJBaseGameLayer::collisionCheckObjects @ 0x492ad2
// > GJBaseGameLayer::collisionCheckObjects @ 0x492bc2
//
// 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 GJBaseGameLayer::destroyObject(GJBaseGameLayer *a1, GameObject *a2)
{
int width_low; // r7
const cocos2d::CCPoint *v5; // r0
cocos2d::CCPoint v6; // [sp+Ch] [bp-Ch] BYREF
if ( a2->getType(a2) == Collectible && GameObject::shouldShowPickupEffects(a2) )
{
width_low = LODWORD(a2[1].m_obRect.size.width);
if ( width_low <= 0 )
{
GameObject::spawnDefaultPickupParticle(a2, a1);
}
else
{
v5 = a2->getPosition(a2);
cocos2d::CCPoint::CCPoint(&v6, v5);
GJBaseGameLayer::spawnParticleTrigger(a1, width_low, &v6, 0.0, 1.0);
}
}
GameObject::playDestroyObjectAnim(a2, a1);
GameObject::destroyObject(a2);
if ( a2->getType(a2) == Breakable )
GJBaseGameLayer::gameEventTriggered(a1, DestroyBlock, 0, 0);
}