//
// cocos2d::CCParticleSystem::getParticleDrawCost from 0xafeb30 to 0xafeba8 (120 bytes)
//
// 2 xrefs:
// > CreateParticlePopup::update @ 0x9c08e0
// > ??> @ 0xb4360
//
// 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
//
int cocos2d::CCParticleSystem::getParticleDrawCost(cocos2d::CCParticleSystem *a1)
{
int result; // w0
unsigned int m_uParticleCount; // w1
cocos2d::tCCParticle *m_pParticles; // x2
float v5; // s1
float *p_size; // x0
float *v7; // x1
result = 0;
if ( a1->m_bIsActive )
{
m_uParticleCount = a1->m_uParticleCount;
if ( m_uParticleCount )
{
m_pParticles = a1->m_pParticles;
v5 = 0.0;
p_size = &m_pParticles->size;
v7 = &m_pParticles->size + 37 * m_uParticleCount;
do
{
if ( p_size[4] > 0.0 )
v5 = v5 + (float)((float)((float)(*p_size * 0.5) * (float)(*p_size * 0.5)) * 3.1416);
p_size += 37;
}
while ( p_size != v7 );
return llroundf(v5 / 10.0);
}
}
return result;
}