// // PlayerObject::startDashing from 0x100411380 to 0x100411e81 (2817 bytes) // // 2 xrefs: // > PlayerObject::ringJump @ 0x1004149f4 // > PlayerObject::loadFromCheckpoint @ 0x10041d0d0 // // 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::startDashing(PlayerObject *a1, DashRingObject *a2) { cocos2d::CCSprite *m_iconSprite; // r15 cocos2d::CCSprite *m_iconGlow; // r15 bool m_hasNoEffects; // r12 __m128 v6; // xmm0 __m128 v7; // xmm1 __m128 v8; // xmm3 __m128 v9; // xmm1 __m128 v10; // xmm0 __m128 v11; // xmm0 __m128 v12; // xmm2 float v13; // xmm0_4 __m128 v14; // xmm0 float v15; // xmm0_4 float v16; // xmm1_4 __m128 v17; // xmm1 float v18; // xmm2_4 __m128 v19; // xmm5 __m128 v20; // rt1 __m128 v21; // xmm2 __m128 v22; // xmm1 __m128 v23; // xmm3 float v24; // xmm0_4 __m128 m_dashSpeed_low; // xmm0 float v26; // xmm2_4 float v27; // xmm0_4 float v28; // xmm1_4 float v29; // xmm1_4 __m128 v30; // xmm0 float v31; // xmm0_4 cocos2d::CCScaleTo *v32; // rax cocos2d::CCEaseInOut *v33; // r15 cocos2d::CCScaleTo *v34; // rax cocos2d::CCEaseInOut *v35; // rax cocos2d::CCSequence *v36; // rax __int64 v37; // rax cocos2d::CCSprite *v38; // r12 GameManager *v39; // rax cocos2d::CCArray *v40; // r13 cocos2d::CCSpriteFrameCache *v41; // r15 cocos2d::CCString *v42; // rax const char *CString; // rax cocos2d::CCSpriteFrame *v44; // rax cocos2d::CCSpriteFrameCache *v45; // r15 cocos2d::CCString *v46; // rax const char *v47; // rax cocos2d::CCSpriteFrame *v48; // rax cocos2d::CCSpriteFrameCache *v49; // r15 cocos2d::CCString *v50; // rax const char *v51; // rax cocos2d::CCSpriteFrame *v52; // rax cocos2d::CCSpriteFrameCache *v53; // r15 cocos2d::CCString *v54; // rax const char *v55; // rax cocos2d::CCSpriteFrame *v56; // rax cocos2d::CCSpriteFrameCache *v57; // r15 cocos2d::CCString *v58; // rax const char *v59; // rax cocos2d::CCSpriteFrame *v60; // rax cocos2d::CCSpriteFrameCache *v61; // r15 cocos2d::CCString *v62; // rax const char *v63; // rax cocos2d::CCSpriteFrame *v64; // rax cocos2d::CCSpriteFrameCache *v65; // r15 cocos2d::CCString *v66; // rax const char *v67; // rax cocos2d::CCSpriteFrame *v68; // rax cocos2d::CCSpriteFrameCache *v69; // r15 cocos2d::CCString *v70; // rax const char *v71; // rax cocos2d::CCSpriteFrame *v72; // rax cocos2d::CCSpriteFrameCache *v73; // r15 cocos2d::CCString *v74; // rax const char *v75; // rax cocos2d::CCSpriteFrame *v76; // rax cocos2d::CCAnimation *v77; // rax cocos2d::CCAnimate *v78; // r15 cocos2d::CCCallFunc *v79; // rax cocos2d::CCSequence *v80; // rax cocos2d::CCDelayTime *v81; // r15 cocos2d::CCFadeOut *v82; // rax cocos2d::CCSequence *v83; // rax cocos2d::CCTintTo *v84; // rax cocos2d::CCDelayTime *v85; // r14 cocos2d::CCTintTo *v86; // rax cocos2d::CCSequence *v87; // rax GJBaseGameLayer *m_gameLayer; // rdi bool v89; // cc char v90; // [rsp-78h] [rbp-78h] char v91; // [rsp-78h] [rbp-78h] char v92; // [rsp-78h] [rbp-78h] char v93; // [rsp-78h] [rbp-78h] char v94; // [rsp-78h] [rbp-78h] char v95; // [rsp-78h] [rbp-78h] char v96; // [rsp-78h] [rbp-78h] char v97; // [rsp-78h] [rbp-78h] char v98; // [rsp-78h] [rbp-78h] unsigned __int64 v99; // [rsp-74h] [rbp-74h] BYREF float v100; // [rsp-6Ch] [rbp-6Ch] __m128 v101; // [rsp-68h] [rbp-68h] __m128 v102; // [rsp-58h] [rbp-58h] unsigned __int64 v103; // [rsp-40h] [rbp-40h] BYREF float v104; // [rsp-38h] [rbp-38h] float v105; // [rsp-34h] [rbp-34h] if ( a1->m_isDashing ) return; a1->m_isDashing = 1; a1->m_lastLandTime = 0.0; *(_WORD *)&a1->m_isRotating = 0; a1->m_isBallRotating = 0; a1->m_rotationSpeed = 0.0; if ( a1->m_isPlatformer && !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing && !a1->m_isBall && !a1->m_isRobot && !a1->m_isSpider ) { m_iconSprite = a1->m_iconSprite; cocos2d::CCNode::stopActionByTag(m_iconSprite, 13); cocos2d::CCNode::stopActionByTag(m_iconSprite, 14); ((void (__fastcall *)(cocos2d::CCSprite *, float))m_iconSprite->setScale)(m_iconSprite, 1.0); m_iconGlow = a1->m_iconGlow; cocos2d::CCNode::stopActionByTag(m_iconGlow, 13); cocos2d::CCNode::stopActionByTag(m_iconGlow, 14); ((void (__fastcall *)(cocos2d::CCSprite *, float))m_iconGlow->setScale)(m_iconGlow, 1.0); } if ( !a1->m_isDart ) PlayerObject::deactivateStreak(a1, 0); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_dashFireSprite->setVisible)(a1->m_dashFireSprite, 1); if ( !a2 ) { v14 = (__m128)*(unsigned __int64 *)&a1->m_dashAngle; v14.f32[0] = *(double *)v14.i64; v102 = v14; m_hasNoEffects = 0; goto LABEL_63; } a1->m_dashRing = a2; m_hasNoEffects = a2->m_hasNoEffects; v6 = (__m128)*(unsigned __int64 *)&a1->m_totalTime; *(_QWORD *)&a1->m_dashStartTime = v6.i64[0]; *(double *)v6.i64 = ((double (__fastcall *)(DashRingObject *))a2->getObjectRotation)(a2); v101 = v6; if ( ((unsigned __int8 (__fastcall *)(DashRingObject *))a2->isFlipX)(a2) ) { v7 = v101; v7.f32[0] = v101.f32[0] + 180.0; v101 = v7; } *(double *)v6.i64 = ((double (__fastcall *)(DashRingObject *))a2->getRotationX)(a2); v102 = v6; v8.i32[0] = fabs(v6.f32[0] - ((float (__fastcall *)(DashRingObject *))a2->getRotationY)(a2)); v9 = v101; v9.f32[0] = v101.f32[0] + 180.0; v10 = _mm_cmplt_ss((__m128)0x43330000u, v8); v11 = _mm_xor_ps(_mm_or_ps(_mm_andnot_ps(v10, v101), _mm_and_ps(v9, v10)), (__m128)xmmword_1008150B0); v11.f32[0] = fmodf(v11.f32[0], 360.0); v12 = v11; if ( v11.f32[0] <= 180.0 ) { v13 = 360.0; if ( v12.f32[0] >= -180.0 ) goto LABEL_21; } else { v13 = -360.0; } v12.f32[0] = v12.f32[0] + v13; LABEL_21: if ( a1->m_isPlatformer ) goto LABEL_51; if ( a1->m_isSideways ) { v15 = -90.0; if ( !a1->m_isGoingLeft ) goto LABEL_27; goto LABEL_26; } v15 = 0.0; if ( a1->m_isGoingLeft ) LABEL_26: v15 = v15 + 180.0; LABEL_27: if ( v15 == 0.0 ) goto LABEL_33; v12.f32[0] = v12.f32[0] + v15; if ( v12.f32[0] <= 180.0 ) { if ( v12.f32[0] >= -180.0 ) goto LABEL_33; v16 = 360.0; } else { v16 = -360.0; } v12.f32[0] = v12.f32[0] + v16; LABEL_33: if ( fabs(v12.f32[0]) > 90.0 ) { v17 = (__m128)*((unsigned int *)&unk_10081B718 + (v12.f32[0] > 0.0)); v17.f32[0] = v17.f32[0] - v12.f32[0]; if ( v17.f32[0] <= 180.0 ) { if ( v17.f32[0] >= -180.0 ) { LABEL_39: v12 = v17; goto LABEL_40; } v18 = 360.0; } else { v18 = -360.0; } v17.f32[0] = v17.f32[0] + v18; goto LABEL_39; } LABEL_40: if ( v12.f32[0] > 70.0 || v12.f32[0] < -70.0 ) { if ( v12.f32[0] <= 0.0 ) { v23 = _mm_cmplt_ss(v12, (__m128)0x428C0000u); v12 = _mm_or_ps( _mm_andnot_ps(v23, (__m128)0x428C0000u), _mm_and_ps((__m128)(unsigned int)dword_10081B720[v12.f32[0] > -180.0], v23)); } else { v19.i32[0] = v12.i32[0]; v20.i32[0] = 1127481344; v21 = _mm_cmplt_ss(v12, v20); v22 = _mm_cmplt_ss((__m128)0x428C0000u, v19); v12 = _mm_or_ps( _mm_andnot_ps(v22, (__m128)0xC28C0000), _mm_and_ps(_mm_or_ps(_mm_andnot_ps(v21, (__m128)0xC28C0000), _mm_and_ps(v21, (__m128)0x428C0000u)), v22)); } } if ( v15 != 0.0 ) { v12.f32[0] = v12.f32[0] - v15; if ( v12.f32[0] <= 180.0 ) { if ( v12.f32[0] >= -180.0 ) goto LABEL_51; v24 = 360.0; } else { v24 = -360.0; } v12.f32[0] = v12.f32[0] + v24; } LABEL_51: v102 = v12; cocos2d::ccpForAngle(0.017453292 * v12.f32[0]); if ( a1->m_isPlatformer ) { m_dashSpeed_low = (__m128)LODWORD(a2->m_dashSpeed); m_dashSpeed_low.f32[0] = m_dashSpeed_low.f32[0] * 5.7700019; } else { m_dashSpeed_low = (__m128)0x3F800000u; } sub_10028CD40((double *)&v103, &v99, m_dashSpeed_low); v26 = *(float *)&v103; v27 = *((float *)&v103 + 1); if ( a1->m_isSideways ) { v103 = __PAIR64__(v103, HIDWORD(v103)); v28 = v26; } else { v28 = *((float *)&v103 + 1); v27 = *(float *)&v103; } a1->m_dashX = v27; a1->m_dashY = v28; if ( a1->m_isPlatformer ) { if ( v27 >= 0.0 ) { v89 = v27 <= 0.0; v31 = v102.f32[0]; if ( v89 ) goto LABEL_62; PlayerObject::doReversePlayer(a1, 0); } else { PlayerObject::doReversePlayer(a1, 1); } } else { v29 = v28 / fabs(v27); v30 = 0; *(double *)v30.i64 = v29; a1->m_dashY = v29; _mm_storel_ps(&a1->m_dashX, _mm_and_ps(v30, (__m128)xmmword_100816580)); } v31 = v102.f32[0]; LABEL_62: a1->m_dashAngle = v31; LABEL_63: PlayerObject::updateDashArt(a1); cocos2d::CCNode::stopAllActions(a1->m_dashFireSprite); v101.f32[0] = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleX)(a1->m_dashFireSprite) * 1.1; v104 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleY)(a1->m_dashFireSprite) * 1.2; v105 = 0.89999998 * v101.f32[0]; v100 = 1.2 * v104; ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.30000001); ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite, 0.2); v32 = cocos2d::CCScaleTo::create(0.1, v105, v100); v33 = cocos2d::CCEaseInOut::create(v32, 2.0); v34 = cocos2d::CCScaleTo::create(0.1, v101.f32[0], v104); v35 = cocos2d::CCEaseInOut::create(v34, 2.0); v36 = sub_1003B5760(v33, v35, 0); cocos2d::CCNode::runAction(a1->m_dashFireSprite, v36); cocos2d::CCParticleSystem::resumeSystem(a1->m_dashParticles); if ( a2 && !m_hasNoEffects && a1->m_playEffects ) { v37 = 3 * !a1->m_switchDashFireColor; v101.i8[0] = *(&a1->m_playerColor1.r + v37); LOBYTE(v104) = *(&a1->m_playerColor1.g + v37); LOBYTE(v105) = *(&a1->m_playerColor1.b + v37); v38 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_boom2_001.png"); v39 = GameManager::sharedState(); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v39->m_playLayer->m_objectLayer->addChild_0)( v39->m_playLayer->m_objectLayer, v38, 40); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v38->setBlendFunc)(v38, 0x100000302LL); ((void (__fastcall *)(cocos2d::CCSprite *, double))v38->setRotation)( v38, COERCE_DOUBLE(v102.i64[0] ^ 0x8000000080000000LL)); ((void (__fastcall *)(cocos2d::CCSprite *, float))v38->setScale)(v38, 1.2); ((void (__fastcall *)(unsigned __int64 *, DashRingObject *))a2->getRealPosition)(&v103, a2); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v38->setPosition)(v38, &v103); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))v38->setColor)(v38, &stru_10081B860); v40 = (cocos2d::CCArray *)sub_10071F9E0(v38, &stru_10081B860); v41 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v42 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v90); CString = cocos2d::CCString::getCString(v42); v44 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v41, CString); sub_10071FCD0(v40, v44); v45 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v102.i64[0] = (__int64)a2; v46 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v91); v47 = cocos2d::CCString::getCString(v46); v48 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v45, v47); sub_10071FCD0(v40, v48); v49 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v50 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v92); v51 = cocos2d::CCString::getCString(v50); v52 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v49, v51); sub_10071FCD0(v40, v52); v53 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v54 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v93); v55 = cocos2d::CCString::getCString(v54); v56 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v53, v55); sub_10071FCD0(v40, v56); v57 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v58 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v94); v59 = cocos2d::CCString::getCString(v58); v60 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v57, v59); sub_10071FCD0(v40, v60); v61 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v62 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v95); v63 = cocos2d::CCString::getCString(v62); v64 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v61, v63); sub_10071FCD0(v40, v64); v65 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v66 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v96); v67 = cocos2d::CCString::getCString(v66); v68 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v65, v67); sub_10071FCD0(v40, v68); v69 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v70 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v97); v71 = cocos2d::CCString::getCString(v70); v72 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v69, v71); sub_10071FCD0(v40, v72); v73 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v74 = (cocos2d::CCString *)sub_1007AB580("playerDash2_boom2_%03d.png", v98); v75 = cocos2d::CCString::getCString(v74); v76 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v73, v75); sub_10071FCD0(v40, v76); v77 = cocos2d::CCAnimation::createWithSpriteFrames(v40, 0.050000001); v78 = cocos2d::CCAnimate::create(v77); v79 = cocos2d::CCCallFunc::create(v38, (cocos2d::SEL_CallFunc)0x209uLL); v80 = sub_1003B5760(v78, v79, 0); cocos2d::CCNode::runAction(v38, v80); v81 = cocos2d::CCDelayTime::create(0.2); v82 = cocos2d::CCFadeOut::create(0.30000001); v83 = sub_1003B5760(v81, v82, 0); cocos2d::CCNode::runAction(v38, v83); v84 = cocos2d::CCTintTo::create( 0.30000001, -(*(_DWORD *)(v102.i64[0] + 1028) != 1704), -(*(_DWORD *)(v102.i64[0] + 1028) == 1704), -(*(_DWORD *)(v102.i64[0] + 1028) != 1704)); cocos2d::CCNode::runAction(v38, v84); a1->m_flashMainColor.b = -1; *(_WORD *)&a1->m_flashMainColor.r = -1; a1->m_flashSecondColor.b = -1; *(_WORD *)&a1->m_flashSecondColor.r = -1; ((void (__fastcall *)(PlayerObject *, cocos2d::ccColor3B *))a1->setColor)(a1, &a1->m_flashMainColor); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_iconSpriteSecondary->setColor)( a1->m_iconSpriteSecondary, &a1->m_flashSecondColor); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_vehicleSpriteSecondary->setColor)( a1->m_vehicleSpriteSecondary, &a1->m_flashSecondColor); GJRobotSprite::updateColor02( a1->m_robotSprite, (cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_flashSecondColor.r | (a1->m_flashSecondColor.b << 16))); GJRobotSprite::updateColor02( a1->m_spiderSprite, (cocos2d::ccColor3B)(*(unsigned __int16 *)&a1->m_flashSecondColor.r | (a1->m_flashSecondColor.b << 16))); a1->m_flashTime = a1->m_totalTime; *(_QWORD *)&a1->m_flashDuration = 0x3DCCCCCD3E4CCCCDLL; ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_dashFireSprite->setColor)( a1->m_dashFireSprite, &stru_10081B860); v85 = cocos2d::CCDelayTime::create(0.1); v86 = cocos2d::CCTintTo::create(0.2, v101.u8[0], LOBYTE(v104), LOBYTE(v105)); v87 = sub_1003B5760(v85, v86, 0); cocos2d::CCNode::runAction(a1->m_dashFireSprite, v87); } sub_10028CC90(&a1->m_lastGroundedPos, &dbl_1009A1558); m_gameLayer = a1->m_gameLayer; if ( m_gameLayer ) GJBaseGameLayer::gameEventTriggered(m_gameLayer, DashStart, 0, a1->m_uniqueID); }
GD Web Decomp Icon

GD Web Decomp

Raw Source