//
// PlayerObject::playerDestroyed from 0x1002c47d4 to 0x1002c48c0 (236 bytes)
//
// 3 xrefs:
// > PlayLayer::destroyPlayer @ 0x100147c2c
// > PlayLayer::destroyPlayer @ 0x100147c60
// > LevelEditorLayer::postUpdate @ 0x100405820
//
// 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 11:02:32 +0000
//
__int64 __fastcall PlayerObject::playerDestroyed(__int64 a1, char a2)
{
float v4; // s0
double *v5; // x0
__int64 v6; // x0
__n128 v7; // q0
if ( *(_BYTE *)(a1 + 2420) == 1 )
PlayerObject::fadeOutStreak2(a1, 0.2);
PlayerObject::stopDashing(a1);
*(_BYTE *)(a1 + 2424) = 1;
*(_WORD *)(a1 + 1784) = 0;
*(_BYTE *)(a1 + 1640) = 0;
*(_DWORD *)(a1 + 1776) = 0;
v4 = sub_1002BAAE8(a1);
v5 = (double *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)a1 + 192LL))(a1, v4);
sub_10002630C((_QWORD *)(a1 + 1224), v5);
v6 = *(_QWORD *)(a1 + 3000);
if ( v6 )
{
v7 = cocos2d::CCNode::stopAllActions(v6);
(*(void (__fastcall **)(_QWORD, _QWORD, __n128))(**(_QWORD **)(a1 + 3000) + 344LL))(*(_QWORD *)(a1 + 3000), 0, v7);
}
PlayerObject::toggleGhostEffect(a1, 0);
sub_1002C495C(a1);
if ( *(_BYTE *)(a1 + 1972) != 1 || (a2 & 1) != 0 || *(_BYTE *)(a1 + 1787) == 1 )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 912LL))(a1, 0);
else
return PlayerObject::playDeathEffect((_QWORD **)a1);
}