//
// ParticleGameObject::addMainSpriteToParent from 0x1001920d0 to 0x100192177 (167 bytes)
//
// 1 xrefs:
// > ??> @ 0x100acbc18
//
// This function is hookable on this platform (idp: pc, 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 12:25:54 +0000
//
__int64 __fastcall ParticleGameObject::addMainSpriteToParent(__int64 a1, char a2)
{
__int64 result; // rax
unsigned int ObjectZLayer; // eax
_QWORD *v4; // r14
__int64 v5; // r12
__int64 v6; // r15
unsigned int ObjectZOrder; // eax
result = GameObject::addMainSpriteToParent();
if ( *(_QWORD *)(a1 + 776) )
{
ObjectZLayer = GameObject::getObjectZLayer(a1);
v4 = (_QWORD *)GameObject::parentForZLayer(a1, ObjectZLayer, 0, 4);
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 776) + 512LL))(*(_QWORD *)(a1 + 776));
if ( (_QWORD *)result == v4 )
{
v5 = 592;
if ( !a2 )
return result;
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 776) + 528LL))(*(_QWORD *)(a1 + 776), 0);
v5 = 464;
}
v6 = *(_QWORD *)(a1 + 776);
ObjectZOrder = GameObject::getObjectZOrder(a1);
return (*(__int64 (__fastcall **)(_QWORD *, __int64, _QWORD))(*v4 + v5))(v4, v6, ObjectZOrder);
}
return result;
}