// // PlayerObject::toggleDartMode from 0x10022a994 to 0x10022ac28 (660 bytes) // // 7 xrefs: // > GJBaseGameLayer::switchToFlyMode @ 0x1001e65a4 // > PlayerObject::switchedToMode @ 0x1002270ec // > PlayerObject::switchedToMode @ 0x100227164 // > PlayerObject::copyAttributes @ 0x10022d31c // > MenuGameLayer::init @ 0x10039a8bc // > MenuGameLayer::init @ 0x10039a8cc // > MenuGameLayer::resetPlayer @ 0x10039b138 // // 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 PlayerObject::toggleDartMode(PlayerObject *a1, bool a2, bool a3) { _BOOL4 v4; // w20 GameManager *v6; // x0 cocos2d::ccColor3B *v7; // x1 CCCircleWave *v8; // x21 __int16 v9; // w8 int m_maybeSavedPlayerFrame; // w1 float v11; // s0 if ( a1->m_isDart != a2 ) { v4 = a2; a1->m_gameModeChangedTime = a1->m_totalTime; a1->m_isDart = a2; if ( a2 ) PlayerObject::switchedToMode(a1, WavePortal); *(_WORD *)&a1->m_isRotating = 0; a1->m_isBallRotating = 0; a1->m_rotationSpeed = 0.0; a1->m_yVelocity = a1->m_yVelocity * 0.5; ((void (__fastcall *)(PlayerObject *, float))a1->setRotation)(a1, 0.0); a1->m_isOnGround2 = 0; a1->m_isOnGround = 0; a1->m_shouldTryPlacingCheckpoint = 0; PlayerObject::removePendingCheckpoint(a1); if ( a1->m_isDart ) { a1->m_unkAngle1 = 20.0; *(_QWORD *)&a1->m_width = 0x4120000041200000LL; v6 = GameManager::sharedState(); PlayerObject::updatePlayerDartFrame(a1, v6->m_playerDart.random - v6->m_playerDart.seed); if ( !a3 ) PlayerObject::spawnPortalCircle(a1, (cocos2d::ccColor3B)51455, 50.0); PlayerObject::activateStreak(a1); GJActionManager::stopInternalAction(a1->m_actionManager, 6); ((void (__fastcall *)(PlayerObject *, float))a1->setScaleX)(a1, a1->m_vehicleSize); ((void (__fastcall *)(PlayerObject *, float))a1->setScaleY)(a1, a1->m_vehicleSize); if ( a1->m_hasGroundParticles ) cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles); a1->m_hasGroundParticles = 0; if ( a1->m_maybeIsVehicleGlowing ) v7 = (cocos2d::ccColor3B *)&unk_10063A903; else v7 = &stru_10063A900; ((void (__fastcall *)(cocos2d::CCMotionStreak *, cocos2d::ccColor3B *))a1->m_regularTrail->setColor)( a1->m_regularTrail, v7); HardStreak::reset(a1->m_waveTrail); PlayerObject::placeStreakPoint(a1); if ( a1->m_playEffects && !a1->m_maybeReducedEffects && !GameManager::sharedState()->m_playLayer->m_skipArtReload && !a3 ) { v8 = CCCircleWave::create_1(10.0, 60.0, 0.4, 0); v9 = *(_WORD *)&a1->m_playerColor1.r; v8->m_color.b = a1->m_playerColor1.b; *(_WORD *)&v8->m_color.r = v9; ((void (__fastcall *)(CCCircleWave *, cocos2d::CCPoint *))v8->setPosition)(v8, &a1->m_lastPortalPos); *(_QWORD *)&v8->m_circleMode = 0x400000001LL; ((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, _QWORD))a1->m_parentLayer->addChild_0)( a1->m_parentLayer, v8, 0); } } else { if ( a1->m_vehicleSize == 1.0 || !a1->m_defaultMiniIcon ) m_maybeSavedPlayerFrame = a1->m_maybeSavedPlayerFrame; else m_maybeSavedPlayerFrame = 0; PlayerObject::updatePlayerFrame(a1, m_maybeSavedPlayerFrame); PlayerObject::resetPlayerIcon(a1); } v11 = 0.8; if ( !a1->m_isDart ) v11 = 1.0; cocos2d::CCMotionStreak::setStroke(a1->m_regularTrail, v11 * (float)(a1->m_streakStrokeWidth * a1->m_vehicleSize)); if ( v4 ) { PlayerObject::updatePlayerArt(a1); PlayerObject::updateDashArt(a1); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source