//
// ParticleGameObject::addMainSpriteToParent from 0x1001b1b00 to 0x1001b1ba7 (167 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008c8548
//
// 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 ParticleGameObject::addMainSpriteToParent(ParticleGameObject *a1, bool a2)
{
ZLayer ObjectZLayer; // eax
cocos2d::CCNode *v3; // r14
__int64 v4; // r12
cocos2d::CCParticleSystemQuad *m_particle; // r15
unsigned int ObjectZOrder; // eax
GameObject::addMainSpriteToParent(a1, a2);
if ( a1->m_particle )
{
ObjectZLayer = GameObject::getObjectZLayer(a1);
v3 = GameObject::parentForZLayer(a1, ObjectZLayer, 0, 4);
if ( (cocos2d::CCNode *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getParent)(a1->m_particle) == v3 )
{
v4 = 576;
if ( !a2 )
return;
}
else
{
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, _QWORD))a1->m_particle->removeFromParentAndCleanup)(
a1->m_particle,
0);
v4 = 448;
}
m_particle = a1->m_particle;
ObjectZOrder = GameObject::getObjectZOrder(a1);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCParticleSystemQuad *, _QWORD))((char *)&v3->copyWithZone + v4))(
v3,
m_particle,
ObjectZOrder);
}
}