//
// cocos2d::CCParticleExplosion::initWithTotalParticles from 0x180066030 to 0x18006626d (573 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180065657
// > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180065646
// > ??> @ 0x180103ff8
// > ??> @ 0x180142fd0
// > ??> @ 0x180142fe0
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bdcf0
//
// This function is hookable on this platform (idp: pc, 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 11:21:52 +0000
//
char __fastcall cocos2d::CCParticleExplosion::initWithTotalParticles(
cocos2d::CCParticleExplosion *this,
unsigned int a2)
{
__int64 v3; // rax
__int64 v4; // rbx
float *v5; // rax
struct cocos2d::CCDirector *v6; // rax
__int64 v7; // rbx
float *v8; // rax
int v9; // eax
float v10; // xmm0_4
struct cocos2d::CCTexture2D *v11; // rax
float v13; // [rsp+40h] [rbp+18h] BYREF
float v14; // [rsp+44h] [rbp+1Ch]
float v15; // [rsp+48h] [rbp+20h] BYREF
if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )
return 0;
v3 = *(_QWORD *)this;
*((_DWORD *)this + 117) = 1036831949;
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, _QWORD))(v3 + 1560))(this, 0);
v4 = *(_QWORD *)this;
v5 = kmVec2Fill(&v15, 0.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float *))(v4 + 1040))(this, v5);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1056LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1072LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1120LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1136LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1088LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *))(*(_QWORD *)this + 1104LL))(this);
*((_DWORD *)this + 124) = 1119092736;
*((_DWORD *)this + 125) = 1135869952;
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6, &v13);
v7 = *(_QWORD *)this;
v8 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, float *))(v7 + 184))(this, v8);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, void *))(*(_QWORD *)this + 952LL))(this, &unk_1801B2448);
v9 = *((_DWORD *)this + 167);
*((_DWORD *)this + 122) = 1084227584;
*((_DWORD *)this + 123) = 0x40000000;
*((_DWORD *)this + 142) = 1097859072;
*((_DWORD *)this + 143) = 1092616192;
*((_DWORD *)this + 144) = -1082130432;
*((_DWORD *)this + 146) = 1060320051;
*((_DWORD *)this + 147) = 1036831949;
*((_DWORD *)this + 148) = 1045220557;
*((_DWORD *)this + 149) = 1065353216;
v10 = (float)v9 / *((float *)this + 117);
*((_DWORD *)this + 150) = 1056964608;
*((_DWORD *)this + 151) = 1056964608;
*((_QWORD *)this + 76) = 1056964608;
*((_DWORD *)this + 154) = 1056964608;
*((_DWORD *)this + 155) = 1056964608;
*((_QWORD *)this + 78) = 1056964608;
*((_DWORD *)this + 158) = 1056964608;
*((_DWORD *)this + 159) = 1056964608;
*((_QWORD *)this + 80) = 1056964608;
*((float *)this + 166) = v10;
v11 = sub_180065EE0();
if ( v11 )
(*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(
(char *)this + 320,
v11);
(*(void (__fastcall **)(cocos2d::CCParticleExplosion *, _QWORD))(*(_QWORD *)this + 1272LL))(this, 0);
return 1;
}