//
// cocos2d::CCParticleSmoke::initWithTotalParticles from 0x180066f10 to 0x18006711e (526 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x180065c07
// > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x180065bf6
// > ??> @ 0x180104678
// > ??> @ 0x180142ff4
// > ??> @ 0x180143004
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bddec
//
// 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::CCParticleSmoke::initWithTotalParticles(cocos2d::CCParticleSmoke *this, unsigned int a2)
{
__int64 v3; // rax
__int64 v4; // rbx
float *v5; // rax
struct cocos2d::CCDirector *v6; // rax
__int64 v7; // rbx
float *v8; // rax
__int64 v9; // rbx
float *v10; // rax
int v11; // eax
struct cocos2d::CCTexture2D *v12; // rax
float v14; // [rsp+40h] [rbp+18h] BYREF
float v15; // [rsp+48h] [rbp+20h] BYREF
if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )
return 0;
v3 = *(_QWORD *)this;
*((_DWORD *)this + 117) = -1082130432;
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *, _QWORD))(v3 + 1560))(this, 0);
v4 = *(_QWORD *)this;
v5 = kmVec2Fill(&v15, 0.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *, float *))(v4 + 1040))(this, v5);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *))(*(_QWORD *)this + 1120LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *))(*(_QWORD *)this + 1136LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *))(*(_QWORD *)this + 1056LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *))(*(_QWORD *)this + 1072LL))(this);
*((_DWORD *)this + 124) = 1119092736;
*((_DWORD *)this + 125) = 1084227584;
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6, &v14);
v7 = *(_QWORD *)this;
v8 = kmVec2Fill(&v15, v14 * 0.5, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *, float *))(v7 + 184))(this, v8);
v9 = *(_QWORD *)this;
v10 = kmVec2Fill(&v15, 20.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *, float *))(v9 + 952))(this, v10);
v11 = *((_DWORD *)this + 167);
*((_DWORD *)this + 122) = 1082130432;
*((_DWORD *)this + 123) = 1065353216;
*((_DWORD *)this + 142) = 1114636288;
*((_DWORD *)this + 143) = 1092616192;
*((_DWORD *)this + 144) = -1082130432;
*((_DWORD *)this + 146) = 1061997773;
*((_DWORD *)this + 147) = 1061997773;
*((_DWORD *)this + 148) = 1061997773;
*((_DWORD *)this + 149) = 1065353216;
*((_DWORD *)this + 150) = 1017370378;
*((_DWORD *)this + 151) = 1017370378;
*((_QWORD *)this + 76) = 1017370378;
*((float *)this + 166) = (float)v11 * 0.25;
*((_QWORD *)this + 77) = 0;
*((_DWORD *)this + 156) = 0;
*(_QWORD *)((char *)this + 628) = 1065353216;
*(_QWORD *)((char *)this + 636) = 0;
*((_DWORD *)this + 161) = 0;
v12 = sub_180065EE0();
if ( v12 )
(*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(
(char *)this + 320,
v12);
(*(void (__fastcall **)(cocos2d::CCParticleSmoke *, _QWORD))(*(_QWORD *)this + 1272LL))(this, 0);
return 1;
}