//
// cocos2d::CCParticleExplosion::initWithTotalParticles from 0xd6c928 to 0xd6cb7c (596 bytes)
//
// 4 xrefs:
// > cocos2d::CCParticleExplosion::create @ 0xd6de08
// > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0xd6de94
// > ??> @ 0xe66b0
// > ??> @ 0x152b0d0
//
// This function is hookable on this platform (idp: arm, 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 13:07:57 +0000
//
__int64 __fastcall cocos2d::CCParticleExplosion::initWithTotalParticles(
cocos2d::CCParticleExplosion *this,
unsigned int a2)
{
unsigned __int8 v3; // w0
unsigned int v4; // w21
__int64 v6; // x2
void (__fastcall *v7)(cocos2d::CCParticleExplosion *, float *); // x24
cocos2d::CCDirector *v8; // x0
void (__fastcall *v9)(cocos2d::CCParticleExplosion *, float *); // x24
float v10; // s2
float v11; // s0
__int64 v12; // x1
__int64 v13; // [xsp+58h] [xbp+58h] BYREF
float v14; // [xsp+60h] [xbp+60h] BYREF
v3 = cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0);
v4 = v3;
if ( v3 )
{
v6 = *(_QWORD *)this;
*((_DWORD *)this + 115) = 1036831949;
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, _QWORD))(v6 + 1600))(this, 0);
v7 = *(void (__fastcall **)(cocos2d::CCParticleExplosion *, float *))(*(_QWORD *)this + 1048LL);
cocos2d::CCPoint::CCPoint(&v14, 0.0, 0.0);
v7(this, &v14);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1064LL))(this, 70.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1080LL))(this, 40.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1128LL))(this, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1144LL))(this, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1096LL))(this, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float))(*(_QWORD *)this + 1112LL))(this, 0.0);
*((_DWORD *)this + 122) = 1119092736;
*((_DWORD *)this + 123) = 1135869952;
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)0x43B40000);
cocos2d::CCDirector::getWinSize(&v13, v8);
v9 = *(void (__fastcall **)(cocos2d::CCParticleExplosion *, float *))(*(_QWORD *)this + 184LL);
cocos2d::CCPoint::CCPoint(&v14, *(float *)&v13 * 0.5, *((float *)&v13 + 1) * 0.5);
v9(this, &v14);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, void *))(*(_QWORD *)this + 960LL))(this, &unk_1560510);
v10 = *((float *)this + 115);
v11 = (float)*((unsigned int *)this + 165);
*((_DWORD *)this + 145) = 1036831949;
*((float *)this + 148) = 0.5;
*((_DWORD *)this + 144) = 1060320051;
*((float *)this + 120) = 5.0;
*((float *)this + 121) = 2.0;
*((float *)this + 149) = 0.5;
*((float *)this + 140) = 15.0;
*((_DWORD *)this + 146) = 1045220557;
*((float *)this + 141) = 10.0;
*((float *)this + 164) = v11 / v10;
*((float *)this + 142) = -1.0;
*((float *)this + 147) = 1.0;
*((float *)this + 150) = 0.5;
*((_DWORD *)this + 151) = 0;
*((float *)this + 152) = 0.5;
*((float *)this + 153) = 0.5;
*((float *)this + 154) = 0.5;
*((_DWORD *)this + 155) = 0;
*((float *)this + 156) = 0.5;
*((float *)this + 157) = 0.5;
*((float *)this + 158) = 0.5;
*((_DWORD *)this + 159) = 0;
v12 = sub_D6B8F8((cocos2d::CCTextureCache *)0x3E4CCCCD);
if ( v12 )
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, __int64))(*(_QWORD *)this + 1520LL))(this, v12);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, _QWORD))(*(_QWORD *)this + 1280LL))(this, 0);
}
return v4;
}