//
// GJBaseGameLayer::spawnObject from 0x5a7f80 to 0x5a80d2 (338 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'GJBaseGameLayer::spawnObject @ 0x5a80dc
//
// 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:22 +0000
//
int __fastcall GJBaseGameLayer::spawnObject(int result, GameObject *this, __int64 a3, int a4)
{
int v5; // r7
_DWORD v7[5]; // [sp+0h] [bp-18h] BYREF
v5 = result;
if ( !*(_BYTE *)(result + 11140) )
{
if ( *((_DWORD *)this + 271) == 1 )
{
if ( !*((_BYTE *)this + 550)
&& (*((_BYTE *)this + 1484)
|| (result = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)this + 776))(this)) == 0)
&& *((_BYTE *)this + 1293)
&& (!*(_BYTE *)(v5 + 11181) || !*((_BYTE *)this + 1095)) )
{
result = GameObject::isSpawnableTrigger(this);
if ( result )
{
if ( *(_DWORD *)a4 == *(_DWORD *)(a4 + 4) )
{
(*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)this + 744))(this, 0);
if ( *((_DWORD *)this + 223) == 1268 )
{
SpawnTriggerGameObject::updateRemapKeys((int)this, (char **)a4);
*((_QWORD *)this + 210) = a3;
}
return (*(int (__fastcall **)(GameObject *, int, _DWORD, int))(*(_DWORD *)this + 648))(this, v5, 0, a4);
}
else
{
v7[4] = 1065353216;
memset(v7, 0, 16);
GJBaseGameLayer::applyRemap((_DWORD *)v5, (unsigned int)this, (_DWORD *)a4, v7);
(*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)this + 744))(this, 0);
if ( *((_DWORD *)this + 223) == 1268 )
{
SpawnTriggerGameObject::updateRemapKeys((int)this, (char **)a4);
*((_QWORD *)this + 210) = a3;
}
(*(void (__fastcall **)(GameObject *, int, _DWORD, int))(*(_DWORD *)this + 648))(this, v5, 0, a4);
if ( *(_DWORD *)a4 != *(_DWORD *)(a4 + 4) )
GJBaseGameLayer::restoreRemap(v5, (int)this, v7);
return std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::~__hash_table((int)v7);
}
}
}
}
else
{
return (*(int (__fastcall **)(GameObject *))(*(_DWORD *)this + 760))(this);
}
}
return result;
}