//
// ParticleGameObject::updateSyncedAnimation from 0x1404a1540 to 0x1404a16a6 (358 bytes)
//
// 4 xrefs:
// > ??> @ 0x14060da90
// > ??> @ 0x1406a7b28
// > ??> @ 0x1406a7b60
// > ??> @ 0x1406dc6b0
//
// 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 ParticleGameObject::updateSyncedAnimation(ParticleGameObject *a1, float a2, int a3)
{
__int64 v3; // rdx
cocos2d::CCParticleSystemQuad *m_particle; // rcx
float m_respawnResult; // xmm0_4
double v7; // xmm0_8
float v8; // xmm6_4
double v9; // xmm0_8
float v10; // xmm0_4
float v11; // xmm8_4
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 )
{
v7 = ((double (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64, int))m_particle->getLifeVar)(
m_particle,
v3,
a3);
v8 = *(float *)&v7;
v9 = ((double (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getLife)(a1->m_particle);
v10 = a1->m_particle->getDuration(a1->m_particle) + (float)(*(float *)&v9 + v8);
m_particle = a1->m_particle;
qword_1406C2F48 = 214013 * qword_1406C2F48 + 2531011;
v11 = fmaxf(
0.0,
(float)((float)((float)((float)((float)(((unsigned __int64)qword_1406C2F48 >> 16) & 0x7FFF) / 32767.0)
+ (float)((float)(((unsigned __int64)qword_1406C2F48 >> 16) & 0x7FFF) / 32767.0))
- 1.0)
* m_particle->m_fRespawnVar)
+ m_particle->m_fRespawn);
if ( a1->m_startingRespawn )
{
a1->m_startingRespawn = 0;
m_respawnResult = v11 + a2;
}
else
{
m_respawnResult = (float)(v10 + a2) + v11;
}
a1->m_respawnResult = m_respawnResult;
}
if ( a2 > m_respawnResult )
{
cocos2d::CCParticleSystem::resetSystem(m_particle);
a1->m_respawnResult = -1.0;
}
}
}
}