//
// cocos2d::CCParticleFlower::initWithTotalParticles from 0x180066650 to 0x180066884 (564 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800658c7
// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800658b6
// > ??> @ 0x180102c78
// > ??> @ 0x180142f60
// > ??> @ 0x180142f70
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bdd5c
//
// 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::CCParticleFlower::initWithTotalParticles(cocos2d::CCParticleFlower *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
__int64 v11; // rdx
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) = -1082130432;
(*(void (__fastcall **)(cocos2d::CCParticleFlower *, _QWORD))(v3 + 1560))(this, 0);
v4 = *(_QWORD *)this;
v5 = kmVec2Fill(&v15, 0.0, 0.0);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *, float *))(v4 + 1040))(this, v5);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_QWORD *)this + 1056LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_QWORD *)this + 1072LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_QWORD *)this + 1120LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_QWORD *)this + 1136LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_QWORD *)this + 1088LL))(this);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *))(*(_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::CCParticleFlower *, float *))(v7 + 184))(this, v8);
(*(void (__fastcall **)(cocos2d::CCParticleFlower *, void *))(*(_QWORD *)this + 952LL))(this, &unk_1801B2448);
v9 = *((_DWORD *)this + 167);
*((_DWORD *)this + 122) = 1082130432;
*((_DWORD *)this + 123) = 1065353216;
*((_DWORD *)this + 142) = 1106247680;
*((_DWORD *)this + 143) = 1092616192;
*((_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;
*((_DWORD *)this + 152) = 1056964608;
*((float *)this + 166) = (float)v9 * 0.25;
*(_QWORD *)((char *)this + 612) = 1056964608;
*(_QWORD *)((char *)this + 620) = 0;
*(_QWORD *)((char *)this + 628) = 1065353216;
*(_QWORD *)((char *)this + 636) = 0;
*((_DWORD *)this + 161) = 0;
v10 = sub_180065EE0();
if ( v10 )
(*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(
(char *)this + 320,
v10);
LOBYTE(v11) = 1;
(*(void (__fastcall **)(cocos2d::CCParticleFlower *, __int64))(*(_QWORD *)this + 1272LL))(this, v11);
return 1;
}