//
// GJBaseGameLayer::createParticle from 0x5bec24 to 0x5bee02 (478 bytes)
//
// 1 xrefs:
// > GameObject::createAndAddParticle @ 0x4553d2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:53:46 +0000
//
cocos2d::CCParticleSystem *__fastcall GJBaseGameLayer::createParticle(
GameManager *a1,
int a2,
char *a3,
int a4,
int a5)
{
char *v5; // r10
int v10; // r7
size_t v11; // r0
int v12; // r7
cocos2d::CCArray *v13; // r0
cocos2d::CCArray *v14; // r7
char *v15; // r1
int v16; // r11
size_t v17; // r0
int v18; // r11
int v19; // r6
size_t v20; // r0
cocos2d::CCArray *v21; // r6
bool v22; // r2
cocos2d::CCParticleSystem *v23; // r4
char *v25; // [sp+Ch] [bp-58h]
int v26[2]; // [sp+14h] [bp-50h] BYREF
char *v27; // [sp+1Ch] [bp-48h]
int v28[3]; // [sp+20h] [bp-44h] BYREF
int v29[3]; // [sp+2Ch] [bp-38h] BYREF
int v30[3]; // [sp+38h] [bp-2Ch] BYREF
int v31[3]; // [sp+44h] [bp-20h] BYREF
int v32[3]; // [sp+50h] [bp-14h] BYREF
if ( *(_BYTE *)(GameManager::sharedState(a1) + 725) )
return nullptr;
GJBaseGameLayer::getParticleKey(v26, (int)a1, a2, a3, a4, a5);
v10 = *((_DWORD *)a1 + 2661);
if ( (v26[0] & 1) == 0 )
v5 = (char *)v26 + 1;
v28[0] = 0;
if ( (v26[0] & 1) != 0 )
v5 = v27;
v28[1] = 0;
v28[2] = 0;
v11 = strlen(v5);
std::string::__init(v28, v5, v11);
v12 = cocos2d::CCDictionary::objectForKey(v10, v28);
v13 = (cocos2d::CCArray *)std::string::~string((int)v28);
if ( !v12 )
{
v14 = (cocos2d::CCArray *)cocos2d::CCArray::create(v13);
v5 = (char *)cocos2d::CCArray::create(v14);
v16 = *((_DWORD *)a1 + 2661);
if ( (v26[0] & 1) == 0 )
v15 = (char *)v26 + 1;
v29[0] = 0;
if ( (v26[0] & 1) != 0 )
v15 = v27;
v29[1] = 0;
v29[2] = 0;
v25 = v15;
v17 = strlen(v15);
std::string::__init(v29, v25, v17);
cocos2d::CCDictionary::setObject(v16, v14);
std::string::~string((int)v29);
v18 = *((_DWORD *)a1 + 2661);
std::string::basic_string(v30, (int)v26);
GJBaseGameLayer::getParticleKey2(v31, (int)a1, (int)v30);
cocos2d::CCDictionary::setObject(v18, (cocos2d::CCObject *)v5);
std::string::~string((int)v31);
std::string::~string((int)v30);
}
v19 = *((_DWORD *)a1 + 2661);
if ( (v26[0] & 1) == 0 )
v5 = (char *)v26 + 1;
v32[0] = 0;
if ( (v26[0] & 1) != 0 )
v5 = v27;
v32[1] = 0;
v32[2] = 0;
v20 = strlen(v5);
std::string::__init(v32, v5, v20);
v21 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v19, v32);
std::string::~string((int)v32);
if ( cocos2d::CCArray::count(v21) >= *((_DWORD *)a1 + 2660) )
{
v23 = nullptr;
}
else
{
v23 = (cocos2d::CCParticleSystem *)cocos2d::CCParticleSystemQuad::create(
(cocos2d::CCParticleSystemQuad *)a3,
(const char *)&dword_0 + 1,
v22);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v23 + 36))(v23, a4);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v23 + 784))(v23, a5);
cocos2d::CCParticleSystem::stopSystem(v23);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, _DWORD))(*(_DWORD *)v23 + 172))(v23, 0);
cocos2d::CCArray::addObject(v21, v23);
}
std::string::~string((int)v26);
return v23;
}