//
// GameObject::createAndAddParticle from 0x140198b20 to 0x140198c48 (296 bytes)
//
// 41 xrefs:
// > EndPortalObject::init @ 0x140137e10
// > GameObject::customSetup @ 0x140191788
// > GameObject::customSetup @ 0x140191817
// > GameObject::customSetup @ 0x140191951
// > GameObject::customSetup @ 0x14019199f
// > GameObject::customSetup @ 0x140191a1c
// > GameObject::customSetup @ 0x140191aab
// > GameObject::customSetup @ 0x140191b36
// > GameObject::customSetup @ 0x140191bfe
// > GameObject::customSetup @ 0x140191ce8
// > GameObject::customSetup @ 0x140191da6
// > GameObject::customSetup @ 0x140191e64
// > GameObject::customSetup @ 0x140191f22
// > GameObject::customSetup @ 0x140191feb
// > GameObject::customSetup @ 0x1401920c5
// > GameObject::customSetup @ 0x14019218a
// > GameObject::customSetup @ 0x140192778
// > GameObject::customSetup @ 0x1401927db
// > GameObject::customSetup @ 0x14019283e
// > GameObject::customSetup @ 0x1401928a1
// > GameObject::customSetup @ 0x140192904
// > GameObject::customSetup @ 0x1401929c8
// > GameObject::customSetup @ 0x140192a2b
// > GameObject::customSetup @ 0x140192ad4
// > GameObject::customSetup @ 0x140192b49
// > GameObject::customSetup @ 0x140192c39
// > GameObject::customSetup @ 0x140192d39
// > GameObject::customSetup @ 0x140192e39
// > GameObject::customSetup @ 0x140192f11
// > GameObject::customSetup @ 0x14019301a
// > GameObject::customSetup @ 0x140193102
// > GameObject::customSetup @ 0x1401931da
// > GameObject::customSetup @ 0x1401932b2
// > GameObject::customSetup @ 0x14019338a
// > GameObject::customSetup @ 0x1401938b8
// > GameObject::commonInteractiveSetup @ 0x140196e08
// > EnhancedGameObject::customSetup @ 0x1401a53af
// > EnhancedGameObject::customSetup @ 0x1401a54e1
// > EnhancedGameObject::customSetup @ 0x1401a58d7
// > EnhancedGameObject::updateUserCoin @ 0x1401a698c
// > ??> @ 0x1406cbcc4
//
// 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
//
// Hidden C++ exception states: #wind=3
cocos2d::CCParticleSystemQuad *GameObject::createAndAddParticle(
GameObject *a1,
int a2,
const char *a3,
int a4,
cocos2d::tCCPositionType a5)
{
__int64 v9; // rcx
GJBaseGameLayer *v10; // rcx
int v11; // ecx
cocos2d::CCParticleSystemQuad *Particle; // r15
__int64 ParticleKey; // rax
void *v15; // [rsp+30h] [rbp-68h]
void *v16; // [rsp+30h] [rbp-68h]
_BYTE v17[32]; // [rsp+38h] [rbp-60h] BYREF
v9 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v15 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v9 = qword_1406C2ED8;
}
v10 = *(GJBaseGameLayer **)(v9 + 520);
if ( !v10 || a1->m_hasNoParticles )
return nullptr;
Particle = GJBaseGameLayer::createParticle(v10, a2, a3, a4, a5);
if ( !qword_1406C2ED8 )
{
v16 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
}
ParticleKey = GJBaseGameLayer::getParticleKey(v11, (unsigned int)v17, a2, (_DWORD)a3, a4, a5);
sub_140051590((__int64)&a1->m_particleString, ParticleKey);
sub_14003A830((__int64)v17);
a1->m_hasParticles = 1;
return Particle;
}