//
// cocos2d::CCParticleSystem::getParticleDrawCost from 0x100196024 to 0x10019609c (120 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::update @ 0x1002d0680
//
// 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 __fastcall cocos2d::CCParticleSystem::getParticleDrawCost(cocos2d::CCParticleSystem *a1)
{
__int64 m_uParticleCount; // x8
float *p_timeToLive; // x9
float v3; // s0
if ( !a1->m_bIsActive )
return 0;
m_uParticleCount = a1->m_uParticleCount;
if ( (_DWORD)m_uParticleCount )
{
p_timeToLive = &a1->m_pParticles->timeToLive;
v3 = 0.0;
do
{
if ( *p_timeToLive > 0.0 )
v3 = v3 + (float)((float)((float)(*(p_timeToLive - 4) * 0.5) * (float)(*(p_timeToLive - 4) * 0.5)) * 3.1416);
p_timeToLive += 37;
--m_uParticleCount;
}
while ( m_uParticleCount );
}
else
{
v3 = 0.0;
}
return llroundf(v3 / 10.0);
}