//
// cocos2d::CCParticleFlower::initWithTotalParticles from 0x180064220 to 0x180064451 (561 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800634a7
// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x180063496
// > ??> @ 0x1800fc6f8
// > ??> @ 0x180139bcc
// > ??> @ 0x180139bdc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b3a08
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
char __fastcall cocos2d::CCParticleFlower::initWithTotalParticles(cocos2d::CCParticleFlower *this, unsigned int a2)
{
cocos2d::CCParticleFlower_vtbl *v3; // rax
cocos2d::CCParticleFlower_vtbl *v4; // rbx
float *v5; // rax
cocos2d::CCDirector *v6; // rax
cocos2d::CCParticleFlower_vtbl *v7; // rbx
float *v8; // rax
signed int m_uTotalParticles; // eax
struct cocos2d::CCTexture2D *v10; // rax
__int64 v11; // rdx
float v13; // [rsp+40h] [rbp+18h]
float v14; // [rsp+44h] [rbp+1Ch]
float v15; // [rsp+48h] [rbp+20h] BYREF
if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )
return 0;
v3 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
this->m_fDuration = -1.0;
((void (__fastcall *)(cocos2d::CCParticleFlower *, _QWORD))v3->setEmitterMode)(this, 0);
v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v5 = kmVec2Fill(&v15, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCParticleFlower *, float *))v4->setGravity)(this, v5);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setSpeed)(this);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setSpeedVar)(this);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setRadialAccel)(this);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setRadialAccelVar)(this);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setTangentialAccel)(this);
((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setTangentialAccelVar)(this);
this->m_fAngle = 90.0;
this->m_fAngleVar = 360.0;
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
v7 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v8 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);
((void (__fastcall *)(cocos2d::CCParticleFlower *, float *))v7->setPosition_0)(this, v8);
((void (__fastcall *)(cocos2d::CCParticleFlower *, void *))this->setPosVar)(this, &unk_1801A8408);
m_uTotalParticles = this->m_uTotalParticles;
this->m_fLife = 4.0;
this->m_fLifeVar = 1.0;
this->m_fStartSize = 30.0;
this->m_fStartSizeVar = 10.0;
this->m_fEndSize = -1.0;
this->m_tStartColor.r = 0.5;
this->m_tStartColor.g = 0.5;
this->m_tStartColor.b = 0.5;
this->m_tStartColor.a = 1.0;
this->m_tStartColorVar.r = 0.5;
this->m_tStartColorVar.g = 0.5;
this->m_tStartColorVar.b = 0.5;
this->m_fEmissionRate = (float)m_uTotalParticles * 0.25;
*(_QWORD *)&this->m_tStartColorVar.a = 1056964608;
*(_QWORD *)&this->m_tEndColor.g = 0;
*(_QWORD *)&this->m_tEndColor.a = 1065353216;
*(_QWORD *)&this->m_tEndColorVar.g = 0;
this->m_tEndColorVar.a = 0.0;
v10 = sub_180063AC0();
if ( v10 )
((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(
&this->cocos2d::CCTextureProtocol,
v10);
LOBYTE(v11) = 1;
((void (__fastcall *)(cocos2d::CCParticleFlower *, __int64))this->setBlendAdditive)(this, v11);
return 1;
}