//
// GameObject::createAndAddParticle from 0x100259770 to 0x100259840 (208 bytes)
//
// 35 xrefs:
// > GameObject::customSetup @ 0x10025743c
// > GameObject::customSetup @ 0x10025823c
// > GameObject::customSetup @ 0x100258314
// > GameObject::customSetup @ 0x1002584c4
// > GameObject::customSetup @ 0x100258524
// > GameObject::customSetup @ 0x1002585fc
// > GameObject::customSetup @ 0x1002586f4
// > GameObject::customSetup @ 0x100258790
// > GameObject::customSetup @ 0x10025886c
// > GameObject::customSetup @ 0x100258924
// > GameObject::customSetup @ 0x100258994
// > GameObject::customSetup @ 0x100258b1c
// > GameObject::customSetup @ 0x100258ba0
// > GameObject::customSetup @ 0x100258c74
// > GameObject::customSetup @ 0x100258d04
// > GameObject::customSetup @ 0x100258dd4
// > GameObject::customSetup @ 0x100258e5c
// > GameObject::customSetup @ 0x100258ee8
// > GameObject::customSetup @ 0x100258f78
// > GameObject::customSetup @ 0x100259018
// > GameObject::customSetup @ 0x10025910c
// > GameObject::customSetup @ 0x10025917c
// > GameObject::customSetup @ 0x100259250
// > GameObject::customSetup @ 0x100259318
// > GameObject::customSetup @ 0x1002593a4
// > GameObject::customSetup @ 0x1002594a8
// > GameObject::customSetup @ 0x100259558
// > GameObject::customSetup @ 0x1002595c0
// > GameObject::customSetup @ 0x100259698
// > GameObject::commonInteractiveSetup @ 0x100259740
// > EnhancedGameObject::updateUserCoin @ 0x10025f550
// > EnhancedGameObject::customSetup @ 0x1002643c0
// > EnhancedGameObject::customSetup @ 0x10026463c
// > EnhancedGameObject::customSetup @ 0x1002646e4
// > EndPortalObject::init @ 0x1003fe784
//
// 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
//
// local variable allocation has failed, the output may be wrong!
cocos2d::CCParticleSystemQuad *__fastcall GameObject::createAndAddParticle(
GameObject *a1,
int a2,
const char *a3,
int a4,
cocos2d::tCCPositionType a5)
{
__int64 v5; // x20
__int64 v6; // x22
__int64 v8; // x24
cocos2d::CCParticleSystemQuad *Particle; // x21
GameManager *v11; // x0
void **p_m_particleString; // x20
__int128 v14; // [xsp+8h] [xbp-48h] BYREF
char *v15; // [xsp+18h] [xbp-38h]
v5 = *(_QWORD *)&a5;
v6 = *(_QWORD *)&a4;
v8 = *(_QWORD *)&a2;
if ( !GameManager::sharedState()->m_playLayer || a1->m_hasNoParticles )
return nullptr;
v11 = GameManager::sharedState();
Particle = GJBaseGameLayer::createParticle(v11->m_playLayer, v8, a3, v6, (cocos2d::tCCPositionType)v5);
GameManager::sharedState();
GJBaseGameLayer::getParticleKey(v8, (char *)a3, v6, v5, &v14);
p_m_particleString = (void **)&a1->m_particleString;
if ( a1->m_particleString.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete(*p_m_particleString);
*(_OWORD *)p_m_particleString = v14;
a1->m_particleString.m_data.m_long.longStorage = v15;
a1->m_hasParticles = 1;
return Particle;
}