// // PlayerObject::startDashing from 0x1002262e8 to 0x10022692c (1604 bytes) // // 2 xrefs: // > PlayerObject::ringJump @ 0x1002286f8 // > PlayerObject::loadFromCheckpoint @ 0x10022e3d0 // // 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) { bool m_hasNoEffects; // w22 float v5; // s8 float v6; // s10 float v7; // s8 float v8; // s0 float m_dashAngle; // s10 float v10; // w8 float v11; // s0 float v12; // s0 __int32 v13; // s2 float v14; // s1 PlayerObject *v15; // x0 bool v16; // w1 double v17; // d0 float v18; // s13 float v19; // s14 cocos2d::CCScaleTo *v20; // x0 cocos2d::CCEaseInOut *v21; // x21 cocos2d::CCScaleTo *v22; // x0 char v23; // w0 __int64 v24; // x1 __int64 v25; // x2 __int64 v26; // x3 __int64 v27; // x4 __int64 v28; // x5 __int64 v29; // x6 __int64 v30; // x7 cocos2d::CCSequence *v31; // x0 __int64 v32; // x8 unsigned __int8 *v33; // x8 unsigned __int8 v34; // w22 unsigned __int8 v35; // w23 cocos2d::CCSprite *v36; // x25 GameManager *v37; // x0 __int64 v38; // x0 int v39; // w21 cocos2d::CCArray *v40; // x26 cocos2d::CCSpriteFrameCache *v41; // x28 cocos2d::CCString *v42; // x0 const char *CString; // x0 cocos2d::CCSpriteFrame *v44; // x0 cocos2d::CCAnimation *v45; // x0 cocos2d::CCAnimate *v46; // x26 char v47; // w0 __int64 v48; // x1 __int64 v49; // x2 __int64 v50; // x3 __int64 v51; // x4 __int64 v52; // x5 __int64 v53; // x6 __int64 v54; // x7 cocos2d::CCSequence *v55; // x0 cocos2d::CCDelayTime *v56; // x26 char v57; // w0 __int64 v58; // x1 __int64 v59; // x2 __int64 v60; // x3 __int64 v61; // x4 __int64 v62; // x5 __int64 v63; // x6 __int64 v64; // x7 cocos2d::CCSequence *v65; // x0 int m_objectID; // w8 unsigned __int8 v67; // w1 unsigned __int8 v68; // w0 cocos2d::CCTintTo *v69; // x0 cocos2d::CCDelayTime *v70; // x20 char v71; // w0 __int64 v72; // x1 __int64 v73; // x2 __int64 v74; // x3 __int64 v75; // x4 __int64 v76; // x5 __int64 v77; // x6 __int64 v78; // x7 cocos2d::CCSequence *v79; // x0 GJBaseGameLayer *m_gameLayer; // x0 unsigned __int8 v81; // [xsp+14h] [xbp-ACh] float32x2_t v82; // [xsp+1Ch] [xbp-A4h] BYREF unsigned __int64 v83; // [xsp+24h] [xbp-9Ch] BYREF float v84; // [xsp+2Ch] [xbp-94h] BYREF cocos2d::SEL_CallFunc v85; // 0:x1.16 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 ) { PlayerObject::stopPlatformerJumpAnimation(a1); } if ( !a1->m_isDart ) PlayerObject::deactivateStreak(a1, 0); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_dashFireSprite->setVisible)(a1->m_dashFireSprite, 1); if ( a2 ) { a1->m_dashRing = a2; m_hasNoEffects = a2->m_hasNoEffects; a1->m_dashStartTime = a1->m_totalTime; v5 = ((float (__fastcall *)(DashRingObject *))a2->getObjectRotation)(a2); if ( ((unsigned int (__fastcall *)(DashRingObject *))a2->isFlipX)(a2) ) v6 = v5 + 180.0; else v6 = v5; v7 = ((float (__fastcall *)(DashRingObject *))a2->getRotationX)(a2); if ( vabds_f32(v7, ((float (__fastcall *)(DashRingObject *))a2->getRotationY)(a2)) <= 179.0 ) v8 = v6; else v8 = v6 + 180.0; m_dashAngle = fmodf(-v8, 360.0); v84 = m_dashAngle; if ( m_dashAngle <= 180.0 ) { if ( m_dashAngle >= -180.0 ) goto LABEL_26; v10 = 360.0; } else { v10 = -360.0; } m_dashAngle = m_dashAngle + v10; v84 = m_dashAngle; LABEL_26: if ( !a1->m_isPlatformer ) { PlayerObject::limitDashRotation(a1, &v84); m_dashAngle = v84; } cocos2d::ccpForAngle(m_dashAngle * 0.017453); v11 = 1.0; if ( a1->m_isPlatformer ) v11 = a2->m_dashSpeed * 5.77; sub_100022A14(&v82, (float32x2_t *)&v83, v11); v12 = *((float *)&v83 + 1); v13 = v83; if ( a1->m_isSideways ) { v83 = __PAIR64__(v83, HIDWORD(v83)); v14 = *(float *)&v13; } else { v14 = *((float *)&v83 + 1); v12 = *(float *)&v83; } a1->m_dashX = v12; a1->m_dashY = v14; if ( a1->m_isPlatformer ) { if ( v12 < 0.0 ) { v15 = a1; v16 = 1; LABEL_39: PlayerObject::doReversePlayer(v15, v16); goto LABEL_40; } if ( v12 > 0.0 ) { v15 = a1; v16 = 0; goto LABEL_39; } } else { v17 = (float)(v14 / fabsf(v12)); a1->m_dashY = v17; a1->m_dashX = fabs(v17); } LABEL_40: a1->m_dashAngle = m_dashAngle; goto LABEL_41; } m_hasNoEffects = 0; m_dashAngle = a1->m_dashAngle; LABEL_41: PlayerObject::updateDashArt(a1); cocos2d::CCNode::stopAllActions(a1->m_dashFireSprite); v18 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleX)(a1->m_dashFireSprite) * 1.1; v19 = ((float (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleY)(a1->m_dashFireSprite) * 1.2; ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.3); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite); v20 = cocos2d::CCScaleTo::create(0.1, v18 * 0.9, v19 * 1.2); v21 = cocos2d::CCEaseInOut::create(v20, 2.0); v22 = cocos2d::CCScaleTo::create(0.1, v18, v19); v23 = (unsigned __int8)cocos2d::CCEaseInOut::create(v22, 2.0); v31 = sub_10018A494(v21, v24, v25, v26, v27, v28, v29, v30, v23); cocos2d::CCNode::runAction(a1->m_dashFireSprite, v31); cocos2d::CCParticleSystem::resumeSystem(a1->m_dashParticles); v32 = 2605; if ( a1->m_switchDashFireColor ) v32 = 2602; if ( a2 && !m_hasNoEffects && a1->m_playEffects ) { v33 = (unsigned __int8 *)a1 + v32; v81 = *v33; v34 = v33[1]; v35 = v33[2]; v36 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_boom2_001.png"); v37 = GameManager::sharedState(); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *, __int64))v37->m_playLayer->m_objectLayer->addChild_0)( v37->m_playLayer->m_objectLayer, v36, 40); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v36->setBlendFunc)(v36, 0x100000302LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v36->setRotation)(v36, -m_dashAngle); ((void (__fastcall *)(cocos2d::CCSprite *, float))v36->setScale)(v36, 1.2); ((void (__fastcall *)(unsigned __int64 *__return_ptr, DashRingObject *))a2->getRealPosition)(&v83, a2); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v36->setPosition)(v36, &v83); v38 = ((__int64 (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))v36->setColor)(v36, &stru_10063A900); v39 = 1; v40 = (cocos2d::CCArray *)sub_10024A15C(v38); do { v41 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v42 = (cocos2d::CCString *)sub_100268F4C("playerDash2_boom2_%03d.png", v39); CString = cocos2d::CCString::getCString(v42); v44 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v41, CString); sub_10024A2D0(v40, v44); ++v39; } while ( v39 != 10 ); v45 = cocos2d::CCAnimation::createWithSpriteFrames(v40, 0.05); v46 = cocos2d::CCAnimate::create(v45); v85.ptr = (void (*)(void))520; v85.adj = 1; v47 = (unsigned __int8)cocos2d::CCCallFunc::create(v36, v85); v55 = sub_10018A494(v46, v48, v49, v50, v51, v52, v53, v54, v47); cocos2d::CCNode::runAction(v36, v55); v56 = cocos2d::CCDelayTime::create(0.2); v57 = (unsigned __int8)cocos2d::CCFadeOut::create(0.3); v65 = sub_10018A494(v56, v58, v59, v60, v61, v62, v63, v64, v57); cocos2d::CCNode::runAction(v36, v65); m_objectID = a2->m_objectID; if ( m_objectID == 1704 ) v67 = -1; else v67 = 0; if ( m_objectID == 1704 ) v68 = 0; else v68 = -1; v69 = cocos2d::CCTintTo::create(0.3, v68, v67, v68); cocos2d::CCNode::runAction(v36, v69); 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); PlayerObject::setSecondColor(a1, &a1->m_flashSecondColor); 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_10063A900); v70 = cocos2d::CCDelayTime::create(0.1); v71 = (unsigned __int8)cocos2d::CCTintTo::create(0.2, v81, v34, v35); v79 = sub_10018A494(v70, v72, v73, v74, v75, v76, v77, v78, v71); cocos2d::CCNode::runAction(a1->m_dashFireSprite, v79); } sub_1000229D0(&a1->m_lastGroundedPos, (double *)&stru_10086CBF0); 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