// // PlayerObject::togglePlayerScale from 0x1002271ac to 0x1002274f4 (840 bytes) // // 9 xrefs: // > GJBaseGameLayer::setupLevelStart @ 0x1001e5f98 // > GJBaseGameLayer::setupLevelStart @ 0x1001e5fb4 // > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8664 // > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8838 // > PlayerObject::resetObject @ 0x100226b88 // > PlayerObject::copyAttributes @ 0x10022d378 // > PlayerObject::loadFromCheckpoint @ 0x10022e278 // > MenuGameLayer::resetPlayer @ 0x10039ae5c // > MenuGameLayer::resetPlayer @ 0x10039b1c8 // // 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::togglePlayerScale(PlayerObject *a1, bool a2, bool a3) { float m_vehicleSize; // s0 bool v4; // w8 PlayerObject *v6; // x19 int v7; // w1 GameManager *v8; // x0 float v9; // s0 float v10; // s0 GhostTrailEffect *m_ghostTrail; // x8 cocos2d::CCMotionStreak *m_shipStreak; // x0 float v13; // s8 int v14; // w2 int m_maybeSavedPlayerFrame; // w1 cocos2d::CCScaleTo *v16; // x0 cocos2d::CCEaseElasticOut *v17; // x21 float v18; // s8 PlayLayer *m_playLayer; // x20 int v20; // w21 __int64 v21; // [xsp+8h] [xbp-38h] BYREF cocos2d::CCPoint v22; // 0:s0.4,4:s1.4 m_vehicleSize = a1->m_vehicleSize; v4 = m_vehicleSize == 1.0; if ( a2 ) v4 = m_vehicleSize != 1.0; if ( !v4 ) { v6 = a1; if ( a2 ) { a1->m_vehicleSize = 0.6; if ( !a1->m_defaultMiniIcon ) { LABEL_14: v9 = v6->m_vehicleSize; v6->m_spriteWidthScale = v9; v6->m_spriteHeightScale = v9; cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_landParticles0, v9); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_landParticles1, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_playerGroundParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_vehicleGroundParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_trailingParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_shipClickParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_ufoClickParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_robotBurstParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_dashParticles, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_swingBurstParticles1, v6->m_vehicleSize); cocos2d::CCParticleSystem::loadScaledDefaults(v6->m_swingBurstParticles2, v6->m_vehicleSize); v10 = 0.8; if ( !v6->m_isDart ) v10 = 1.0; cocos2d::CCMotionStreak::setStroke( v6->m_regularTrail, v10 * (float)(v6->m_streakStrokeWidth * v6->m_vehicleSize)); if ( v6->m_playEffects || v6->m_isDart ) v6->m_waveTrail->m_waveSize = v6->m_vehicleSize; m_ghostTrail = v6->m_ghostTrail; if ( m_ghostTrail ) m_ghostTrail->m_playerScale = v6->m_vehicleSize; m_shipStreak = v6->m_shipStreak; if ( m_shipStreak ) sub_1002173A0(m_shipStreak, v6->m_shipStreakType, (__int64)v6); GJActionManager::stopInternalAction(v6->m_actionManager, 6); v13 = v6->m_vehicleSize; if ( !v6->m_playEffects || v6->m_maybeReducedEffects || GameManager::sharedState()->m_playLayer->m_skipArtReload ) { ((void (__fastcall *)(PlayerObject *, float))v6->setScaleX)(v6, v13); ((void (__fastcall *)(PlayerObject *, float))v6->setScaleY)(v6, v13); } else { v16 = cocos2d::CCScaleTo::create(0.5, v13, v13); v17 = cocos2d::CCEaseElasticOut::create_1(v16); ((void (__fastcall *)(cocos2d::CCEaseElasticOut *, __int64))v17->setTag)(v17, 6); GJActionManager::runInternalAction(v6->m_actionManager, v17, v6); if ( !a3 ) { v18 = v6->m_vehicleSize; m_playLayer = GameManager::sharedState()->m_playLayer; sub_1000229B8(&v21, (__int64 *)&v6->m_lastPortalPos); v22.x = 1.0; if ( v18 == 1.0 ) v20 = 9895680; else v20 = 9830655; GJBaseGameLayer::lightningFlash_1(m_playLayer, v22, (cocos2d::ccColor3B)&v21); PlayerObject::spawnPortalCircle(v6, (cocos2d::ccColor3B)v20, 45.0); PlayerObject::spawnScaleCircle(v6); } } if ( v6->m_isBall && v6->m_isRotating ) PlayerObject::runRotateAction(v6, 0, v14); PlayerObject::placeStreakPoint(v6); PlayerObject::updateRobotAnimationSpeed(v6); return; } if ( a1->m_isBall ) { v7 = 0; LABEL_13: PlayerObject::updatePlayerRollFrame(a1, v7); goto LABEL_14; } if ( a1->m_isRobot || a1->m_isDart ) goto LABEL_14; m_maybeSavedPlayerFrame = 0; } else { if ( a1->m_isPlatformer ) a1->m_stateScale = 2; a1->m_vehicleSize = 1.0; if ( !a1->m_defaultMiniIcon ) goto LABEL_14; if ( a1->m_isBall ) { v8 = GameManager::sharedState(); v7 = v8->m_playerBall.random - v8->m_playerBall.seed; a1 = v6; goto LABEL_13; } if ( a1->m_isRobot || a1->m_isDart ) goto LABEL_14; m_maybeSavedPlayerFrame = a1->m_maybeSavedPlayerFrame; } PlayerObject::updatePlayerFrame(a1, m_maybeSavedPlayerFrame); goto LABEL_14; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source