//
// ParticleGameObject::updateSyncedAnimation from 0x1001b2c30 to 0x1001b2d73 (323 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008c8780
//
// 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 ParticleGameObject::updateSyncedAnimation(ParticleGameObject *a1, float a2, int a3)
{
cocos2d::CCParticleSystemQuad *m_particle; // rdi
float m_respawnResult; // xmm1_4
float v6; // xmm0_4
float m_fRespawn; // xmm2_4
float v8; // xmm1_4
float v9; // xmm2_4
float v10; // xmm2_4
float v11; // [rsp+Ch] [rbp-14h]
float v12; // [rsp+14h] [rbp-Ch]
m_particle = a1->m_particle;
if ( m_particle )
{
if ( a1->m_animateOnTrigger )
{
if ( a1->m_animationTriggered )
{
cocos2d::CCParticleSystem::resetSystem(m_particle);
a1->m_animationTriggered = 0;
}
}
else
{
m_respawnResult = a1->m_respawnResult;
if ( m_respawnResult < 0.0 )
{
v12 = a2;
v11 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *, int))m_particle->getLife)(m_particle, a3);
v6 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getLifeVar)(a1->m_particle);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getDuration)(a1->m_particle);
m_particle = a1->m_particle;
m_fRespawn = m_particle->m_fRespawn;
qword_10099F158 = 214013 * qword_10099F158 + 2531011;
v8 = fmaxf(
(float)((float)((float)((float)((float)(WORD1(qword_10099F158) & 0x7FFF) / 32767.0)
+ (float)((float)(WORD1(qword_10099F158) & 0x7FFF) / 32767.0))
+ -1.0)
* m_particle->m_fRespawnVar)
+ m_fRespawn,
0.0);
if ( a1->m_startingRespawn )
{
a1->m_startingRespawn = 0;
a2 = v12;
v9 = v12;
}
else
{
v10 = (float)(v11 + v6) + v6;
a2 = v12;
v9 = v10 + v12;
}
m_respawnResult = v8 + v9;
a1->m_respawnResult = m_respawnResult;
}
if ( a2 > m_respawnResult )
{
cocos2d::CCParticleSystem::resetSystem(m_particle);
a1->m_respawnResult = -1.0;
}
}
}
}