//
// cocos2d::CCParticleRain::initWithTotalParticles from 0x1800648b0 to 0x180064ad9 (553 bytes)
//
// 7 xrefs:
// > cocos2d::CCParticleRain::createWithTotalParticles @ 0x180063717
// > cocos2d::CCParticleRain::createWithTotalParticles @ 0x180063706
// > ??> @ 0x1800fed98
// > ??> @ 0x180139cac
// > ??> @ 0x180139cbc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b3a74
//
// 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::CCParticleRain::initWithTotalParticles(cocos2d::CCParticleRain *this, unsigned int a2)
{
cocos2d::CCParticleRain_vtbl *v3; // rax
cocos2d::CCParticleRain_vtbl *v4; // rbx
float *v5; // rax
cocos2d::CCDirector *v6; // rax
cocos2d::CCParticleRain_vtbl *v7; // rbx
float *v8; // rax
cocos2d::CCParticleRain_vtbl *v9; // rbx
float *v10; // rax
struct cocos2d::CCTexture2D *v11; // rax
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::CCParticleRain *, _QWORD))v3->setEmitterMode)(this, 0);
v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v5 = kmVec2Fill(&v15, 10.0, -10.0);
((void (__fastcall *)(cocos2d::CCParticleRain *, float *))v4->setGravity)(this, v5);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setRadialAccel)(this);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setRadialAccelVar)(this);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setTangentialAccel)(this);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setTangentialAccelVar)(this);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setSpeed)(this);
((void (__fastcall *)(cocos2d::CCParticleRain *))this->setSpeedVar)(this);
this->m_fAngle = -90.0;
this->m_fAngleVar = 5.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);
((void (__fastcall *)(cocos2d::CCParticleRain *, float *))v7->setPosition_0)(this, v8);
v9 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v10 = kmVec2Fill(&v15, v13 * 0.5, 0.0);
((void (__fastcall *)(cocos2d::CCParticleRain *, float *))v9->setPosVar)(this, v10);
*(_QWORD *)&this->m_fLife = 1083179008;
*(_QWORD *)&this->m_tStartColorVar.g = 0;
this->m_tStartColorVar.a = 0.0;
*(_QWORD *)&this->m_tEndColorVar.g = 0;
this->m_tEndColorVar.a = 0.0;
this->m_fStartSize = 4.0;
this->m_fStartSizeVar = 2.0;
this->m_fEndSize = -1.0;
this->m_fEmissionRate = 20.0;
this->m_tStartColor.r = 0.69999999;
this->m_tStartColor.g = 0.80000001;
this->m_tStartColor.b = 1.0;
*(_QWORD *)&this->m_tStartColor.a = 1065353216;
this->m_tEndColor.r = 0.69999999;
this->m_tEndColor.g = 0.80000001;
this->m_tEndColor.b = 1.0;
*(_QWORD *)&this->m_tEndColor.a = 1056964608;
v11 = sub_180063AC0();
if ( v11 )
((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(
&this->cocos2d::CCTextureProtocol,
v11);
((void (__fastcall *)(cocos2d::CCParticleRain *, _QWORD))this->setBlendAdditive)(this, 0);
return 1;
}