//
// cocos2d::CCParticleSpiral::initWithTotalParticles from 0x180067360 to 0x18006759a (570 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180065da7
// > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180065d96
// > ??> @ 0x180103978
// > ??> @ 0x180142fac
// > ??> @ 0x180142fbc
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bde34
//
// 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:53 +0000
//
char __fastcall cocos2d::CCParticleSpiral::initWithTotalParticles(cocos2d::CCParticleSpiral *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
struct cocos2d::CCTexture2D *v10; // rax
float v12; // [rsp+40h] [rbp+18h] BYREF
float v13; // [rsp+44h] [rbp+1Ch]
float v14; // [rsp+48h] [rbp+20h] BYREF
if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )
return 0;
v3 = *(_QWORD *)this;
*((_DWORD *)this + 117) = -1082130432;
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *, _QWORD))(v3 + 1560))(this, 0);
v4 = *(_QWORD *)this;
v5 = kmVec2Fill(&v14, 0.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *, float *))(v4 + 1040))(this, v5);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1056LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1072LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1120LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1136LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1088LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *))(*(_QWORD *)this + 1104LL))(this);
*((_QWORD *)this + 62) = 1119092736;
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6, &v12);
v7 = *(_QWORD *)this;
v8 = kmVec2Fill(&v14, v12 * 0.5, v13 * 0.5);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *, float *))(v7 + 184))(this, v8);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *, void *))(*(_QWORD *)this + 952LL))(this, &unk_1801B2448);
v9 = *((_DWORD *)this + 167);
*((_QWORD *)this + 61) = 1094713344;
*((_QWORD *)this + 71) = 1101004800;
*((_DWORD *)this + 144) = -1082130432;
*((_DWORD *)this + 146) = 1056964608;
*((_DWORD *)this + 147) = 1056964608;
*((_DWORD *)this + 148) = 1056964608;
*((_DWORD *)this + 149) = 1065353216;
*((_DWORD *)this + 150) = 1056964608;
*((_DWORD *)this + 151) = 1056964608;
*((_QWORD *)this + 76) = 1056964608;
*((_DWORD *)this + 154) = 1056964608;
*((_DWORD *)this + 155) = 1056964608;
*((_DWORD *)this + 156) = 1056964608;
*((_DWORD *)this + 157) = 1065353216;
*((_DWORD *)this + 158) = 1056964608;
*((_DWORD *)this + 159) = 1056964608;
*((_QWORD *)this + 80) = 1056964608;
*((float *)this + 166) = (float)v9 / 12.0;
v10 = sub_180065EE0();
if ( v10 )
(*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(
(char *)this + 320,
v10);
(*(void (__fastcall **)(cocos2d::CCParticleSpiral *, _QWORD))(*(_QWORD *)this + 1272LL))(this, 0);
return 1;
}