//
// cocos2d::CCParticleSystem::resetSystem from 0x5dbab2 to 0x5dbb3a (136 bytes)
//
// 72 xrefs:
// > GameToolbox::particleFromStruct @ 0x2ed738
// > PlayerObject::removeAllParticles @ 0x33d03e
// > PlayerObject::resetAllParticles @ 0x33d258
// > PlayerObject::playSpiderDashEffect @ 0x3406ac
// > PlayerObject::toggleVisibility @ 0x3423c4
// > PlayerObject::hitGround @ 0x344402
// > PlayerObject::rotateGameplay @ 0x346998
// > PlayerObject::toggleSwingMode @ 0x346a90
// > PlayerObject::toggleSwingMode @ 0x346a98
// > PlayerObject::toggleSwingMode @ 0x346b04
// > PlayerObject::toggleSwingMode @ 0x346b0c
// > PlayerObject::toggleFlyMode @ 0x346f50
// > PlayerObject::toggleFlyMode @ 0x346f58
// > PlayerObject::toggleBirdMode @ 0x347164
// > PlayerObject::spiderTestJumpY @ 0x34aaa4
// > PlayerObject::spiderTestJumpX @ 0x34b364
// > GameObject::setVisible @ 0x35311e
// > LevelEditorLayer::claimCustomParticle @ 0x364f38
// > MenuGameLayer::destroyPlayer @ 0x3a9fa2
// > ParticleGameObject::updateSyncedAnimation @ 0x3e45f4
// > ParticleGameObject::updateSyncedAnimation @ 0x3e46e4
// > ParticleGameObject::resetObject @ 0x3e5306
// > ParticleGameObject::updateAnimateOnTrigger @ 0x3e533a
// > LevelPage::updateDynamicPage @ 0x40b6fe
// > LevelPage::updateDynamicPage @ 0x40b77a
// > LevelPage::updateDynamicPage @ 0x40b7f8
// > GJBaseGameLayer::playSpeedParticle @ 0x477e38
// > GJBaseGameLayer::claimCustomParticle @ 0x489ca8
// > GJDifficultySprite::updateFeatureState @ 0x4b3e5c
// > CurrencyRewardLayer::createObjectsFull @ 0x4d1ff4
// > CurrencyRewardLayer::init @ 0x4d26aa
// > CurrencyRewardLayer::init @ 0x4d29fe
// > CurrencyRewardLayer::init @ 0x4d2d48
// > CurrencyRewardLayer::init @ 0x4d3064
// > GauntletSelectLayer::unlockAnimationStep2 @ 0x4d6f76
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x4d7326
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x4d73c8
// > GauntletSelectLayer::playUnlockAnimation @ 0x4d7676
// > GJShopLayer::init @ 0x4e38da
// > GJChestSprite::switchToState @ 0x4e7f32
// > GJChestSprite::switchToState @ 0x4e83ec
// > MapSelectLayer::checkTouchMonster @ 0x50e866
// > CreateParticlePopup::update @ 0x52feea
// > CreateParticlePopup::onDurationForever @ 0x531cb6
// > CreateParticlePopup::onMaxEmission @ 0x531ce6
// > CreateParticlePopup::onCalcEmission @ 0x531d6e
// > PlayerObject::playCompleteEffect @ 0x566544
// > PlayerObject::playDeathEffect @ 0x567068
// > PlayerObject::playDeathEffect @ 0x5673ce
// > PlayerObject::playDeathEffect @ 0x56771a
// > PlayerObject::playDeathEffect @ 0x567a8e
// > PlayerObject::playDeathEffect @ 0x567e64
// > PlayerObject::playDeathEffect @ 0x568148
// > PlayerObject::playDeathEffect @ 0x5684c6
// > PlayerObject::playDeathEffect @ 0x568890
// > PlayerObject::playDeathEffect @ 0x568c58
// > PlayerObject::playDeathEffect @ 0x56900e
// > PlayerObject::playDeathEffect @ 0x56939a
// > PlayerObject::playDeathEffect @ 0x569748
// > PlayerObject::playDeathEffect @ 0x569b68
// > PlayerObject::playDeathEffect @ 0x569f36
// > PlayerObject::playDeathEffect @ 0x56a2c8
// > PlayerObject::playDeathEffect @ 0x56a5fe
// > PlayerObject::playDeathEffect @ 0x56a97a
// > PlayerObject::playDeathEffect @ 0x56ace8
// > PlayerObject::playDeathEffect @ 0x56b024
// > PlayerObject::playDeathEffect @ 0x56b19e
// > GJPathPage::unlockAnimationStep2 @ 0x58bfea
// > GJPathPage::playUnlockAnimation @ 0x58c6c4
// > GJPathPage::unlockAnimationStep3 @ 0x58cb44
// > GJPathPage::unlockAnimationStep3 @ 0x58cbd6
// > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0x5ddfec
//
// 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 cocos2d::CCParticleSystem::resetSystem(cocos2d::CCParticleSystem *a1)
{
unsigned int m_uParticleCount; // r0
unsigned int m_uParticleIdx; // r3
unsigned int v4; // r3
cocos2d::tCCParticle *m_pParticles; // r2
unsigned int v6; // r3
cocos2d::CCParticleBatchNode *m_pBatchNode; // r0
int v8; // r6
a1->m_bIsActive = 1;
a1->m_fElapsed = 0.0;
a1->m_bWasRemoved = 0;
a1->m_uParticleIdx = 0;
m_uParticleCount = a1->m_uParticleCount;
while ( 1 )
{
m_uParticleIdx = a1->m_uParticleIdx;
if ( m_uParticleIdx >= m_uParticleCount )
break;
*((_DWORD *)&a1->m_pParticles->timeToLive + 37 * m_uParticleIdx) = 0;
a1->m_uParticleIdx = m_uParticleIdx + 1;
}
while ( 1 )
{
v4 = a1->m_uParticleCount;
if ( !v4 )
break;
m_pParticles = a1->m_pParticles;
v6 = v4 - 1;
a1->m_uParticleIdx = v6;
m_pBatchNode = a1->m_pBatchNode;
v8 = *((_DWORD *)&m_pParticles->modeA.dir.x + 37 * v6);
if ( m_pBatchNode )
{
cocos2d::CCParticleBatchNode::disableParticle(m_pBatchNode, a1->m_uAtlasIndex + v8);
*((_DWORD *)a1->m_pParticles + 37 * a1->m_uParticleCount - 19) = v8;
}
--a1->m_uParticleCount;
}
cocos2d::CCParticleSystem::updateVisible(a1);
}