// // PlayerObject::stopDashing from 0x100401a50 to 0x100402183 (1843 bytes) // // 8 xrefs: // > PlayerObject::playCompleteEffect @ 0x100214054 // > PlayerObject::update @ 0x1003fdf87 // > PlayerObject::collidedWithObjectInternal @ 0x10040ae9e // > PlayerObject::collidedWithObjectInternal @ 0x10040b002 // > PlayerObject::resetObject @ 0x100412244 // > PlayerObject::playerDestroyed @ 0x100413ae6 // > PlayerObject::releaseButton @ 0x100415792 // > PlayerObject::touchedObject @ 0x10041d290 // // 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::stopDashing(PlayerObject *a1) { __int128 v1; // xmm0 DashRingObject *m_dashRing; // rax double m_endBoost; // xmm1_8 float v5; // xmm0_4 cocos2d::CCSprite *v6; // r14 GameManager *v7; // rax cocos2d::CCSprite *v8; // r15 unsigned __int64 *v9; // r12 unsigned __int64 *v10; // rax float v11; // xmm0_4 float v12; // xmm0_4 __int64 v13; // rax double m_dashAngle; // xmm0_8 double v15; // xmm0_8 cocos2d::CCScaleTo *v16; // r12 cocos2d::CCCallFunc *v17; // rax cocos2d::CCSequence *v18; // rax cocos2d::CCMoveBy *v19; // rax cocos2d::CCFadeTo *v20; // rax cocos2d::CCFadeTo *v21; // rsi float m_dashX; // xmm0_4 float m_dashY; // xmm1_4 __m128 v24; // xmm0 __m128 v25; // xmm1 __m128 v26; // xmm2 __int64 v27; // xmm0_8 __m128 v28; // rt1 __int64 v29; // rax int v30; // edx int v31; // ecx __m128 v32; // xmm3 float v33; // xmm2_4 float m_playerSpeed; // xmm1_4 float v35; // xmm1_4 __m128 v36; // rt1 __int64 v37; // rax int v38; // edx int v39; // ecx GJRobotSprite *m_robotSprite; // r14 GJBaseGameLayer *m_gameLayer; // rdi __int128 v42; // [rsp+0h] [rbp-60h] BYREF void *__p; // [rsp+10h] [rbp-50h] cocos2d::CCPoint v44; // [rsp+24h] [rbp-3Ch] BYREF double v45; // [rsp+2Ch] [rbp-34h] BYREF float v46; // [rsp+34h] [rbp-2Ch] if ( a1->m_isDashing ) { a1->m_isDashing = 0; a1->m_lastLandTime = 0.0; if ( a1->m_isPlatformer ) { m_dashRing = a1->m_dashRing; if ( m_dashRing ) { m_endBoost = m_dashRing->m_endBoost; v5 = a1->m_dashX * m_endBoost; *(float *)&m_endBoost = m_endBoost * a1->m_dashY; sub_10028CBE0((float *)&v45, v5, *(float *)&m_endBoost); sub_10028CC60(&v44, &v45); a1->m_isAccelerating = 1; *(double *)&v1 = v44.y; a1->m_yVelocity = v44.y; if ( a1->m_isPlatformer ) { *(double *)&v1 = v44.x; a1->m_platformerXVelocity = v44.x; a1->m_affectedByForces = 1; } if ( a1->m_dashRing->m_stopSlide ) { a1->m_isAccelerating = 0; a1->m_affectedByForces = 0; } } } a1->m_dashRing = nullptr; ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_dashFireSprite->setVisible)(a1->m_dashFireSprite, 0); if ( a1->m_playEffects && !a1->m_maybeReducedEffects ) { v6 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_001.png"); v7 = GameManager::sharedState(); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v7->m_playLayer->m_objectLayer->addChild_0)( v7->m_playLayer->m_objectLayer, v6, 40); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v6->setBlendFunc)(v6, 0x100000302LL); v8 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_outline_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v6->addChild_0)(v6, v8, 1); ((void (__fastcall *)(double *, cocos2d::CCSprite *))v6->getScaledContentSize)(&v45, v6); sub_10028CBE0((float *)&v44, *(float *)&v45 * 0.5, 0.5 * *((float *)&v45 + 1)); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v8->setPosition)(v8, &v44); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v8->setOpacity)(v8, 150); v9 = (unsigned __int64 *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1); v10 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getPosition)(a1->m_dashFireSprite); sub_10028CCE0((double *)&v44, v9, v10); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v6->setPosition)(v6, &v44); v11 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleX)(a1->m_dashFireSprite); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScaleX)(v6, v11 * a1->m_vehicleSize); v12 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleY)(a1->m_dashFireSprite); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScaleY)(v6, v12 * a1->m_vehicleSize); v13 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getColor)(a1->m_dashFireSprite); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v6->setColor)(v6, v13); m_dashAngle = a1->m_dashAngle; *(float *)&m_dashAngle = m_dashAngle; ((void (__fastcall *)(cocos2d::CCSprite *, double))v6->setRotation)( v6, COERCE_DOUBLE(*(_QWORD *)&m_dashAngle ^ 0x8000000080000000LL)); v46 = ((float (__fastcall *)(cocos2d::CCSprite *))v6->getScaleX)(v6) * 0.2; v15 = ((double (__fastcall *)(cocos2d::CCSprite *))v6->getScaleY)(v6); v16 = cocos2d::CCScaleTo::create(0.2, v46, *(float *)&v15 * 0.2); v17 = cocos2d::CCCallFunc::create(v6, (cocos2d::SEL_CallFunc)0x209uLL); v18 = sub_1003B5760(v16, v17, 0); cocos2d::CCNode::runAction(v6, v18); sub_10028CBE0((float *)&v44, -20.0, 0.0); v19 = cocos2d::CCMoveBy::create(0.2, &v44); cocos2d::CCNode::runAction(v6, v19); v20 = cocos2d::CCFadeTo::create(0.2, 0); cocos2d::CCNode::runAction(v6, v20); *(_QWORD *)&v1 = 1045220557; v21 = cocos2d::CCFadeTo::create(0.2, 0); cocos2d::CCNode::runAction(v8, v21); } cocos2d::CCParticleSystem::stopSystem(a1->m_dashParticles); if ( !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing && !a1->m_isRobot && !a1->m_isSpider ) { v46 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->getRotation)(a1->m_iconSprite); ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconSprite->setScale)(a1->m_iconSprite, 1.0); cocos2d::CCNode::stopAllActions(a1->m_iconSprite); ((void (__fastcall *)(cocos2d::CCSprite *, double))a1->m_iconSprite->setRotation)(a1->m_iconSprite, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconGlow->setScale)(a1->m_iconGlow, 1.0); cocos2d::CCNode::stopAllActions(a1->m_iconGlow); ((void (__fastcall *)(cocos2d::CCSprite *, double))a1->m_iconGlow->setRotation)(a1->m_iconGlow, 0.0); *(_QWORD *)&v1 = LODWORD(v46); ((void (__fastcall *)(PlayerObject *, float))a1->setRotation)(a1, v46); if ( a1->m_isPlatformer ) { m_dashX = a1->m_dashX; m_dashY = a1->m_dashY; sub_10028CBE0((float *)&v45, m_dashX, m_dashY); v24 = (__m128)LODWORD(v45); v24.f32[0] = fsqrt((float)(v24.f32[0] * v24.f32[0]) + (float)(*((float *)&v45 + 1) * *((float *)&v45 + 1))); v25 = v24; v25.f32[0] = (float)((float)(v24.f32[0] / 17.310005) * 1.5) + 0.5; v26 = _mm_cmplt_ss((__m128)0x418A7AE4u, v24); v27 = v26.i32[0] & 0x40000000; v28.i32[0] = LODWORD(a1->m_vehicleSize); v29 = _mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss((__m128)0x3F800000u, v28)) & 1; v30 = 180; if ( a1->m_isUpsideDown ) v30 = -180; v31 = -v30; if ( !a1->m_isGoingLeft ) v31 = v30; v32 = v26; v33 = (float)v31; *(_QWORD *)&v1 = v27 | _mm_andnot_ps(v32, v25).u64[0]; if ( a1->m_isSideways ) v33 = -v33; *(float *)&v1 = (float)(*(float *)&v1 * (float)(v33 * a1->m_gravityMod)) / flt_10081B570[v29]; LODWORD(a1->m_rotationSpeed) = v1; a1->m_isRotating = 1; } } if ( a1->m_isBall ) { if ( a1->m_isPlatformer ) { *(_WORD *)&a1->m_isRotating = 0; a1->m_isBallRotating = 0; a1->m_rotationSpeed = 0.0; } else if ( !a1->m_isDashing ) { a1->m_isBallRotating = 0; a1->m_rotateSpeed = 1.0; m_playerSpeed = a1->m_playerSpeed; if ( m_playerSpeed == 0.69999999 ) { v35 = 1.2405638; } else if ( m_playerSpeed == 1.1 ) { v35 = 0.80424345; } else if ( m_playerSpeed == 1.3 ) { v35 = 0.66576928; } else if ( m_playerSpeed == 1.6 ) { v35 = 0.54093748; } else { v35 = 1.0; } v36.i32[0] = 1065353216; v37 = _mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss((__m128)LODWORD(a1->m_vehicleSize), v36)) & 1; v38 = 120; if ( a1->m_isUpsideDown ) v38 = -120; v39 = -v38; if ( !a1->m_isGoingLeft ) v39 = v38; DWORD1(v1) = 0; *(float *)&v1 = (float)v39 / (float)(v35 * flt_10081B660[v37]); LODWORD(a1->m_rotationSpeed) = v1; if ( a1->m_isSideways ) { *(_QWORD *)&v1 = v1 ^ 0x8000000080000000LL; LODWORD(a1->m_rotationSpeed) = v1; } a1->m_isRotating = 1; } } if ( a1->m_isOnGround2 ) { if ( a1->m_isRobot ) { m_robotSprite = a1->m_robotSprite; if ( (a1->m_currentRobotAnimation.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v42, a1->m_currentRobotAnimation.m_data.m_long.longStorage, a1->m_currentRobotAnimation.m_data.m_long.size, *(double *)&v1); } else { __p = a1->m_currentRobotAnimation.m_data.m_long.longStorage; v1 = *(_OWORD *)&a1->m_currentRobotAnimation.m_data.m_short.sizex2; v42 = v1; } CCAnimatedSprite::runAnimation((__int64)m_robotSprite, &v42, *(double *)&v1); if ( (v42 & 1) != 0 ) operator delete(__p); } else if ( a1->m_isSpider ) { PlayerObject::playDynamicSpiderRun(a1); } } m_gameLayer = a1->m_gameLayer; if ( m_gameLayer ) GJBaseGameLayer::gameEventTriggered(m_gameLayer, DashStop, 0, a1->m_uniqueID); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source