// // PlayerObject::toggleSwingMode from 0x630828 to 0x630a60 (568 bytes) // // 6 xrefs: // > PlayerObject::switchedToMode @ 0x630ae8 // > PlayerObject::switchedToMode @ 0x630bb0 // > PlayerObject::copyAttributes @ 0x631dd4 // > MenuGameLayer::resetPlayer @ 0x6c976c // > GJBaseGameLayer::switchToFlyMode @ 0x859d10 // > @ 0x81e70 // // 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 PlayerObject::toggleSwingMode(PlayerObject *a1, bool a2, bool a3) { _BOOL4 v3; // w20 _BOOL4 v5; // w21 double m_totalTime; // x1 void (__fastcall *setRotation)(PlayerObject *__hidden, float); // x1 GameManager *v8; // x0 long double v9; // q0 cocos2d::ccColor3B v10; // [xsp+38h] [xbp+38h] v3 = a2; v5 = a3; if ( a1->m_isSwing != a2 ) { m_totalTime = a1->m_totalTime; a1->m_isSwing = v3; a1->m_gameModeChangedTime = m_totalTime; if ( v3 ) PlayerObject::switchedToMode(a1, SwingPortal); PlayerObject::stopRotation(a1, 0, 9); setRotation = a1->setRotation; a1->m_yVelocity = a1->m_yVelocity * 0.5; setRotation(a1, 0.0); a1->m_isOnGround2 = 0; a1->m_isOnGround = 0; a1->m_shouldTryPlacingCheckpoint = 0; PlayerObject::removePendingCheckpoint(a1); if ( !a1->m_isSwing ) { PlayerObject::resetPlayerIcon(a1); PlayerObject::updatePlayerFrame(a1, a1->m_maybeSavedPlayerFrame); LODWORD(v9) = 0; if ( a1->m_isUpsideDown ) LODWORD(v9) = 1127481344; a1->setRotation(a1, v9); PlayerObject::disableSwingFire(a1); goto LABEL_8; } v8 = GameManager::sharedState(); PlayerObject::updatePlayerSwingFrame(a1, v8->m_playerSwing.random - v8->m_playerSwing.seed); if ( v5 ) { if ( a1->m_isHidden ) { LABEL_7: cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles); a1->m_hasShipParticles = 0; PlayerObject::deactivateParticle(a1); PlayerObject::activateStreak(a1); a1->m_swingFireMiddle->setVisible(a1->m_swingFireMiddle, 1); PlayerFireBoostSprite::loopFireAnimation(a1->m_swingFireMiddle); a1->m_swingFireBottom->setScale(a1->m_swingFireBottom, 0.01); a1->m_swingFireTop->setScale(a1->m_swingFireTop, 0.01); a1->m_swingFireBottom->setVisible(a1->m_swingFireBottom, 1); a1->m_swingFireTop->setVisible(a1->m_swingFireTop, 1); cocos2d::CCParticleSystem::resetSystem(a1->m_swingBurstParticles1); cocos2d::CCParticleSystem::resetSystem(a1->m_swingBurstParticles2); cocos2d::CCParticleSystem::stopSystem(a1->m_swingBurstParticles1); cocos2d::CCParticleSystem::stopSystem(a1->m_swingBurstParticles2); PlayerObject::updateSwingFire(a1); LABEL_8: if ( v3 ) PlayerObject::modeDidChange(a1); return; } } else { *(_WORD *)&v10.r = -14081; v10.b = 0; PlayerObject::spawnPortalCircle(a1, v10, 50.0); if ( a1->m_isHidden ) goto LABEL_7; } cocos2d::CCParticleSystem::resetSystem(a1->m_trailingParticles); cocos2d::CCParticleSystem::resetSystem(a1->m_shipClickParticles); goto LABEL_7; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source