//
// GJBaseGameLayer::spawnPlayer2 from 0x58f238 to 0x58f28c (84 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::toggleDualMode @ 0x5b90a0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:04 +0000
//
GameManager *__fastcall GJBaseGameLayer::spawnPlayer2(GJBaseGameLayer *this)
{
int v2; // r0
if ( !(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 520) + 256))(*((_DWORD *)this + 520)) )
{
v2 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 519) + 256))(*((_DWORD *)this + 519));
(*(void (__fastcall **)(int, _DWORD, int))(*(_DWORD *)v2 + 232))(v2, *((_DWORD *)this + 520), 59);
if ( !*((_BYTE *)this + 10612) )
PlayerObject::addAllParticles(*((PlayerObject **)this + 520));
}
return PlayerObject::spawnFromPlayer(
*((_DWORD *)this + 520),
*((PlayerObject **)this + 519),
*((unsigned __int8 *)this + 1388) ^ 1);
}