//
// CreateParticlePopup::update from 0x1002d0600 to 0x1002d07dc (476 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007d73c8
//
// 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
//
void __fastcall CreateParticlePopup::update(CreateParticlePopup *a1, float a2)
{
float v4; // s0
cocos2d::CCLabelBMFont *m_perfLogLabel; // x20
int v6; // w21
int v7; // w22
int ParticleDrawCost; // w0
cocos2d::CCString *v9; // x0
const char *CString; // x0
float v11; // s0
float v12; // s9
cocos2d::CCParticleSystemQuad *m_particle; // x0
float m_fRespawn; // s0
unsigned __int64 v15; // x11
float m_fRespawnVar; // s4
float v17; // s5
float v18; // s8
if ( a1->m_perfLogEnabled )
{
v4 = a1->m_perfLogElapsed + a2;
a1->m_perfLogElapsed = v4;
if ( v4 >= 0.1 )
{
a1->m_perfLogElapsed = 0.0;
m_perfLogLabel = a1->m_perfLogLabel;
v6 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getParticleCount)(a1->m_particle);
v7 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getTotalParticles)(a1->m_particle);
ParticleDrawCost = cocos2d::CCParticleSystem::getParticleDrawCost(a1->m_particle);
v9 = (cocos2d::CCString *)sub_100268F4C("%i/%i\n%i", v6, v7, ParticleDrawCost);
CString = cocos2d::CCString::getCString(v9);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))m_perfLogLabel->setString)(m_perfLogLabel, CString);
}
}
v11 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getDuration)(a1->m_particle);
if ( v11 >= 0.0 )
{
v12 = v11;
a1->m_elapsed = a1->m_elapsed + a2;
m_particle = a1->m_particle;
if ( a1->m_respawnResult < 0.0 )
{
m_fRespawn = m_particle->m_fRespawn;
v15 = 214013 * qword_10086DA10 + 2531011;
qword_10086DA10 = v15;
m_fRespawnVar = m_particle->m_fRespawnVar;
v17 = 0.0;
if ( (float)(m_fRespawn
+ (float)((float)((float)((float)((float)((v15 >> 16) & 0x7FFF) / 32767.0) * 2.0) + -1.0)
* m_fRespawnVar)) > 0.0 )
{
qword_10086DA10 = 214013 * v15 + 2531011;
v17 = m_fRespawn
+ (float)((float)((float)((float)((float)(((unsigned __int64)qword_10086DA10 >> 16) & 0x7FFF) / 32767.0)
* 2.0)
+ -1.0)
* m_fRespawnVar);
}
a1->m_respawnResult = v17;
}
v18 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))m_particle->getLife)(m_particle);
if ( a1->m_elapsed > (float)(v12
+ (float)((float)(v18
+ ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getLifeVar)(a1->m_particle))
+ a1->m_respawnResult)) )
{
a1->m_elapsed = 0.0;
a1->m_respawnResult = -1.0;
cocos2d::CCParticleSystem::resetSystem(a1->m_particle);
}
}
}