//
// cocos2d::CCParticleSnow::initWithTotalParticles from 0xafbc9c to 0xafbef0 (596 bytes)
//
// 4 xrefs:
// > cocos2d::CCParticleSnow::create @ 0xafcef0
// > cocos2d::CCParticleSnow::createWithTotalParticles @ 0xafcf7c
// > ??> @ 0x981f0
// > ??> @ 0x1216050
//
// 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
//
bool cocos2d::CCParticleSnow::initWithTotalParticles(cocos2d::CCParticleSnow *a1, unsigned int a2)
{
bool v3; // w22
void (__fastcall *setEmitterMode)(cocos2d::CCParticleSystem *__hidden, int); // x2
void (__fastcall *setGravity)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCDirector *v7; // x0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23
void (__fastcall *setPosVar)(cocos2d::CCParticleSystem *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCTexture2D *v10; // x1
float v11; // [xsp+68h] [xbp+68h]
float v12; // [xsp+6Ch] [xbp+6Ch]
cocos2d::CCPoint v13; // [xsp+70h] [xbp+70h] BYREF
v3 = cocos2d::CCParticleSystemQuad::initWithTotalParticles(a1, a2, 0);
if ( v3 )
{
setEmitterMode = a1->setEmitterMode;
a1->m_fDuration = -1.0;
setEmitterMode(a1, 0);
setGravity = a1->setGravity;
cocos2d::CCPoint::CCPoint(&v13, 0.0, -1.0);
setGravity(a1, &v13);
a1->setSpeed(a1, 5.0);
a1->setSpeedVar(a1, 1.0);
a1->setRadialAccel(a1, 0.0);
a1->setRadialAccelVar(a1, 1.0);
a1->setTangentialAccel(a1, 0.0);
a1->setTangentialAccelVar(a1, 1.0);
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v7);
setPosition = a1->setPosition;
cocos2d::CCPoint::CCPoint(&v13, v11 * 0.5, v12 + 10.0);
setPosition(a1, &v13);
setPosVar = a1->setPosVar;
cocos2d::CCPoint::CCPoint(&v13, v11 * 0.5, 0.0);
setPosVar(a1, &v13);
a1->m_fAngleVar = 5.0;
a1->m_fAngle = -90.0;
a1->m_fLifeVar = 15.0;
a1->m_fStartSize = 10.0;
a1->m_fStartSizeVar = 5.0;
a1->m_fLife = 45.0;
a1->m_fEndSize = -1.0;
a1->m_fEmissionRate = 10.0;
a1->m_tStartColor.r = 1.0;
a1->m_tStartColor.g = 1.0;
a1->m_tStartColor.b = 1.0;
a1->m_tStartColor.a = 1.0;
a1->m_tStartColorVar.r = 0.0;
a1->m_tStartColorVar.g = 0.0;
a1->m_tStartColorVar.b = 0.0;
a1->m_tStartColorVar.a = 0.0;
a1->m_tEndColor.r = 1.0;
a1->m_tEndColor.g = 1.0;
a1->m_tEndColor.b = 1.0;
a1->m_tEndColor.a = 0.0;
a1->m_tEndColorVar.r = 0.0;
a1->m_tEndColorVar.g = 0.0;
a1->m_tEndColorVar.b = 0.0;
a1->m_tEndColorVar.a = 0.0;
v10 = sub_AFA7C0();
if ( v10 )
a1->setTexture(a1, v10);
a1->setBlendAdditive(a1, 0);
}
return v3;
}