//
// cocos2d::CCParticleSystem::resetSystem from 0xafebc8 to 0xafeca4 (220 bytes)
//
// 73 xrefs:
// > GameToolbox::particleFromStruct @ 0x5823c8
// > PlayerObject::removeAllParticles @ 0x6229bc
// > PlayerObject::resetAllParticles @ 0x622c6c
// > PlayerObject::playSpiderDashEffect @ 0x62709c
// > PlayerObject::toggleVisibility @ 0x62a1d8
// > PlayerObject::hitGround @ 0x62d438
// > PlayerObject::rotateGameplay @ 0x630600
// > PlayerObject::toggleSwingMode @ 0x630980
// > PlayerObject::toggleSwingMode @ 0x630988
// > PlayerObject::toggleSwingMode @ 0x630a50
// > PlayerObject::toggleSwingMode @ 0x630a58
// > PlayerObject::toggleFlyMode @ 0x6311f4
// > PlayerObject::toggleFlyMode @ 0x6311fc
// > PlayerObject::toggleBirdMode @ 0x631460
// > PlayerObject::spiderTestJumpY @ 0x636520
// > PlayerObject::spiderTestJumpX @ 0x63702c
// > GameObject::setVisible @ 0x64115c
// > LevelEditorLayer::claimCustomParticle @ 0x65b634
// > MenuGameLayer::destroyPlayer @ 0x6c9c64
// > ParticleGameObject::updateSyncedAnimation @ 0x74ad48
// > ParticleGameObject::updateSyncedAnimation @ 0x74ad68
// > ParticleGameObject::resetObject @ 0x7507f8
// > ParticleGameObject::updateAnimateOnTrigger @ 0x750850
// > LevelPage::updateDynamicPage @ 0x79fb34
// > LevelPage::updateDynamicPage @ 0x79fbec
// > LevelPage::updateDynamicPage @ 0x79fca4
// > GJBaseGameLayer::playSpeedParticle @ 0x867dfc
// > GJBaseGameLayer::claimCustomParticle @ 0x8a16d0
// > GJDifficultySprite::updateFeatureState @ 0x8da308
// > CurrencyRewardLayer::createObjectsFull @ 0x90fec4
// > CurrencyRewardLayer::init @ 0x910d58
// > CurrencyRewardLayer::init @ 0x9111d0
// > CurrencyRewardLayer::init @ 0x911648
// > CurrencyRewardLayer::init @ 0x911a64
// > GauntletSelectLayer::unlockAnimationStep2 @ 0x9184f8
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x918974
// > GauntletSelectLayer::unlockAnimationStep3 @ 0x918ad8
// > GauntletSelectLayer::playUnlockAnimation @ 0x918f54
// > GJShopLayer::init @ 0x92e670
// > GJChestSprite::switchToState @ 0x9370dc
// > GJChestSprite::switchToState @ 0x9374d4
// > MapSelectLayer::checkTouchMonster @ 0x97eec4
// > CreateParticlePopup::update @ 0x9c0804
// > CreateParticlePopup::onDurationForever @ 0x9c452c
// > CreateParticlePopup::onMaxEmission @ 0x9c4574
// > CreateParticlePopup::onCalcEmission @ 0x9c4618
// > PlayerObject::playCompleteEffect @ 0xa26d4c
// > PlayerObject::playDeathEffect @ 0xa27c1c
// > PlayerObject::playDeathEffect @ 0xa28260
// > PlayerObject::playDeathEffect @ 0xa286ac
// > PlayerObject::playDeathEffect @ 0xa28b2c
// > PlayerObject::playDeathEffect @ 0xa28f30
// > PlayerObject::playDeathEffect @ 0xa29380
// > PlayerObject::playDeathEffect @ 0xa29810
// > PlayerObject::playDeathEffect @ 0xa29bc4
// > PlayerObject::playDeathEffect @ 0xa2a024
// > PlayerObject::playDeathEffect @ 0xa2a4e8
// > PlayerObject::playDeathEffect @ 0xa2a94c
// > PlayerObject::playDeathEffect @ 0xa2ae0c
// > PlayerObject::playDeathEffect @ 0xa2b244
// > PlayerObject::playDeathEffect @ 0xa2b6c0
// > PlayerObject::playDeathEffect @ 0xa2bb6c
// > PlayerObject::playDeathEffect @ 0xa2bff0
// > PlayerObject::playDeathEffect @ 0xa2c42c
// > PlayerObject::playDeathEffect @ 0xa2c834
// > PlayerObject::playDeathEffect @ 0xa2cc74
// > GJPathPage::unlockAnimationStep2 @ 0xa6d62c
// > GJPathPage::playUnlockAnimation @ 0xa6e210
// > GJPathPage::unlockAnimationStep3 @ 0xa6eb24
// > GJPathPage::unlockAnimationStep3 @ 0xa6ec18
// > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0xb03644
// > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0xb0374c
// > ??> @ 0x53c40
//
// 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; // w0
unsigned int v3; // w2
cocos2d::tCCParticle *m_pParticles; // x4
_DWORD *p_timeToLive; // x0
unsigned int v6; // w0
cocos2d::CCParticleBatchNode *m_pBatchNode; // x3
int v8; // w20
unsigned int v9; // w0
m_uParticleCount = a1->m_uParticleCount;
a1->m_fElapsed = 0.0;
a1->m_bIsActive = 1;
a1->m_bWasRemoved = 0;
a1->m_uParticleIdx = 0;
if ( m_uParticleCount )
{
v3 = m_uParticleCount - 1;
m_pParticles = a1->m_pParticles;
p_timeToLive = (_DWORD *)&m_pParticles->timeToLive;
do
{
*p_timeToLive = 0;
p_timeToLive += 37;
}
while ( p_timeToLive != (_DWORD *)(&m_pParticles[2].pos.y + 37 * v3) );
do
{
while ( 1 )
{
m_pBatchNode = a1->m_pBatchNode;
a1->m_uParticleIdx = v3;
v8 = *((_DWORD *)&m_pParticles->modeA.dir.x + 37 * v3);
if ( !m_pBatchNode )
break;
cocos2d::CCParticleBatchNode::disableParticle(m_pBatchNode, v8 + a1->m_uAtlasIndex);
m_pParticles = a1->m_pParticles;
v6 = a1->m_uParticleCount - 1;
v3 = a1->m_uParticleCount - 2;
*((_DWORD *)&m_pParticles->modeA.dir.x + 37 * v6) = v8;
a1->m_uParticleCount = v6;
if ( !v6 )
goto LABEL_8;
}
v9 = a1->m_uParticleCount - 1;
a1->m_uParticleCount = v9;
v3 = v9 - 1;
}
while ( v9 );
}
LABEL_8:
cocos2d::CCParticleSystem::updateVisible(a1);
}