// // PlayerObject::toggleBirdMode from 0x100229e18 to 0x10022a098 (640 bytes) // // 5 xrefs: // > GJBaseGameLayer::switchToFlyMode @ 0x1001e655c // > PlayerObject::switchedToMode @ 0x1002270ac // > PlayerObject::switchedToMode @ 0x100227134 // > PlayerObject::copyAttributes @ 0x10022d2fc // > MenuGameLayer::resetPlayer @ 0x10039b0c8 // // 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::toggleBirdMode(PlayerObject *a1, bool a2, bool a3) { __int64 v3; // x29 __int64 v4; // x30 _BOOL4 v6; // w20 GameManager *v8; // x0 __n128 v9; // q0 cocos2d::CCSprite *m_iconSprite; // x22 __n128 v11; // q1 __n128 v12; // q0 cocos2d::CCSprite *m_vehicleSprite; // x22 __n128 v14; // q1 int8x8_t v15; // d3 float32x2_t v16; // [xsp+0h] [xbp-40h] BYREF float v17; // [xsp+8h] [xbp-38h] int v18; // [xsp+Ch] [xbp-34h] __int64 v19; // [xsp+30h] [xbp-10h] __int64 v20; // [xsp+38h] [xbp-8h] if ( a1->m_isBird == a2 ) return; v19 = v3; v20 = v4; v6 = a2; a1->m_gameModeChangedTime = a1->m_totalTime; a1->m_isBird = a2; if ( a2 ) PlayerObject::switchedToMode(a1, UfoPortal); *(_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_isBird ) { PlayerObject::resetPlayerIcon(a1); if ( !v6 ) return; goto LABEL_14; } v8 = GameManager::sharedState(); PlayerObject::updatePlayerBirdFrame(a1, v8->m_playerBird.random - v8->m_playerBird.seed); PlayerObject::stopPlatformerJumpAnimation(a1); v9 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconSprite->setScale)(a1->m_iconSprite, 0.55); m_iconSprite = a1->m_iconSprite; v9.n128_u32[0] = 0; v11.n128_u32[0] = 5.0; sub_100022980(v9, v11, &v16); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))m_iconSprite->setPosition)(m_iconSprite, &v16); v12 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_vehicleSprite->setVisible)(a1->m_vehicleSprite, 1); m_vehicleSprite = a1->m_vehicleSprite; v12.n128_u32[0] = 0; v14.n128_u32[0] = -7.0; sub_100022980(v12, v14, &v16); ((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))m_vehicleSprite->setPosition)(m_vehicleSprite, &v16); PlayerObject::updatePlayerGlow(a1); v15.i16[0] = *(_WORD *)&a1->m_playerColor2.r; v15.i8[2] = a1->m_playerColor2.b; v15.i32[1] = (unsigned __int32)v15.i32[0] >> 8; v16 = vdiv_f32(vcvt_f32_u32((uint32x2_t)vand_s8(v15, (int8x8_t)0xFF000000FFLL)), (float32x2_t)vdup_n_s32(0x437F0000u)); v17 = (float)v15.u8[2] / 255.0; v18 = 1065353216; ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float32x2_t *))a1->m_trailingParticles->setStartColor)( a1->m_trailingParticles, &v16); ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, float32x2_t *))a1->m_trailingParticles->setEndColor)( a1->m_trailingParticles, &v16); if ( !a1->m_isHidden ) cocos2d::CCParticleSystem::resetSystem(a1->m_trailingParticles); if ( a1->m_hasGroundParticles ) cocos2d::CCParticleSystem::stopSystem(a1->m_playerGroundParticles); a1->m_hasGroundParticles = 0; 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); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_birdVehicle->setVisible)(a1->m_birdVehicle, 1); if ( v6 ) { LABEL_14: PlayerObject::updatePlayerArt(a1); PlayerObject::updateDashArt(a1); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source