//
// GJEffectManager::spawnObject from 0x1002e9110 to 0x1002e91ff (239 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::spawnGroup @ 0x10012cd27
// > GJBaseGameLayer::spawnObjectsInOrder @ 0x10012ce2b
//
// 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 __fastcall GJEffectManager::spawnObject(
GJEffectManager *a1,
GameObject *a2,
float a3,
std::vector *const a4,
int a5,
int a6)
{
std::__vector_base::pointer end; // r14
int v7; // r12d
int v8; // r13d
SpawnTriggerAction *v9; // r14
GameObject *v10; // [rsp+0h] [rbp-40h] BYREF
float v11; // [rsp+Ch] [rbp-34h] BYREF
int v12; // [rsp+10h] [rbp-30h] BYREF
int v13[11]; // [rsp+14h] [rbp-2Ch] BYREF
v10 = a2;
v11 = a3;
v12 = a5;
v13[0] = a6;
if ( a2 )
{
end = a1->m_spawnTriggerActions.__end_;
if ( end >= a1->m_spawnTriggerActions.__end_cap_.__value_ )
{
v9 = (SpawnTriggerAction *)((__int64 (__fastcall *)(std::vector *, GameObject **, float *, std::vector *const, int *, int *))sub_1002F4AD0)(
&a1->m_spawnTriggerActions,
&v10,
&v11,
a4,
&v12,
v13);
}
else
{
*(_WORD *)&end->m_finished = 0;
*(_OWORD *)&end->m_deltaTime = 0;
*(_QWORD *)((char *)&end->m_triggerUniqueID + 1) = 0;
*(_OWORD *)&end->m_remapKeys.__begin_ = 0;
end->m_remapKeys.__end_cap_.__value_ = nullptr;
end->m_gameObject = a2;
end->m_duration = a3;
if ( &end->m_remapKeys != a4 )
{
v7 = a5;
v8 = a6;
sub_1000C51C0((char **)&end->m_remapKeys, (char *)a4->__begin_, (__int64)a4->__end_, a4->__end_ - a4->__begin_);
a5 = v7;
a6 = v8;
}
end->m_triggerUniqueID = a5;
end->m_controlID = a6;
v9 = end + 1;
a1->m_spawnTriggerActions.__end_ = v9;
}
a1->m_spawnTriggerActions.__end_ = v9;
}
}