// // PlayerObject::startDashing from 0x140395910 to 0x1403961b4 (2212 bytes) // // 3 xrefs: // > PlayerObject::ringJump @ 0x1403991d5 // > PlayerObject::loadFromCheckpoint @ 0x1403a3165 // > @ 0x1406d6374 // // 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 // // Hidden C++ exception states: #wind=2 void PlayerObject::startDashing(PlayerObject *a1, DashRingObject *a2) { double v2; // xmm3_8 DashRingObject *v3; // r14 float v5; // xmm1_4 bool m_hasNoEffects; // si double v7; // xmm0_8 float v8; // xmm8_4 double v9; // xmm0_8 float v10; // xmm0_4 float v11; // xmm10_4 float v12; // xmm1_4 float v13; // xmm0_4 float v14; // xmm0_4 struct cocos2d::CCPoint v15; // rax float v16; // xmm1_4 float v17; // xmm2_4 double v18; // xmm0_8 double v19; // xmm0_8 float v20; // xmm9_4 double v21; // xmm0_8 float v22; // xmm8_4 float v23; // xmm6_4 struct cocos2d::CCScaleTo *v24; // rax struct cocos2d::CCEaseInOut *v25; // rbx struct cocos2d::CCScaleTo *v26; // rax struct cocos2d::CCEaseInOut *v27; // rax struct cocos2d::CCSequence *v28; // rax cocos2d::ccColor3B *v29; // r8 __int64 v30; // rax __int16 v31; // r12 unsigned __int8 v32; // r13 CCLightFlash *v33; // r15 __int64 v34; // rax int v35; // esi CCLightFlash_vtbl *v36; // rbx __int64 v37; // rax __int64 v38; // rcx cocos2d::CCArray *v39; // rbp cocos2d::CCString *v40; // rax const char *CString; // rbx __int64 v42; // rcx cocos2d::CCSpriteFrameCache *v43; // rax struct cocos2d::CCSpriteFrame *v44; // rax struct cocos2d::CCAnimation *v45; // rax struct cocos2d::CCAnimate *v46; // rbx __int64 v47; // rax struct cocos2d::CCSequence *v48; // rax cocos2d::ccColor3B *v49; // r8 struct cocos2d::CCDelayTime *v50; // rbx struct cocos2d::CCFadeOut *v51; // rax struct cocos2d::CCSequence *v52; // rax cocos2d::ccColor3B *v53; // r8 unsigned __int8 v54; // dl unsigned __int8 v55; // r8 struct cocos2d::CCTintTo *v56; // rax cocos2d::ccColor3B *v57; // r8 struct cocos2d::CCDelayTime *v58; // rbx struct cocos2d::CCTintTo *v59; // rax struct cocos2d::CCSequence *v60; // rax cocos2d::ccColor3B *v61; // r8 GJBaseGameLayer *m_gameLayer; // rcx float v63; // [rsp+20h] [rbp-98h] float v64; // [rsp+20h] [rbp-98h] float v65; // [rsp+20h] [rbp-98h] float v66; // [rsp+20h] [rbp-98h] float v67; // [rsp+20h] [rbp-98h] float v68; // [rsp+C0h] [rbp+8h] BYREF float v69; // [rsp+C4h] [rbp+Ch] __int64 v70; // [rsp+D0h] [rbp+18h] BYREF v3 = a2; 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 ) { if ( !a1->m_alwaysShowStreak ) cocos2d::CCMotionStreak::stopStroke(a1->m_regularTrail); if ( a1->m_fadeOutStreak ) { a1->m_fadeOutStreak = 0; if ( a1->m_playEffects ) v5 = 0.2; else v5 = 0.60000002; PlayerObject::fadeOutStreak2(a1, v5); } } LOBYTE(a2) = 1; a1->m_dashFireSprite->setVisible(a1->m_dashFireSprite, (bool)a2); m_hasNoEffects = 0; if ( v3 ) { a1->m_dashRing = v3; m_hasNoEffects = v3->m_hasNoEffects; a1->m_dashStartTime = a1->m_totalTime; v7 = ((double (__fastcall *)(DashRingObject *))v3->getObjectRotation)(v3); v8 = *(float *)&v7; if ( v3->isFlipX(v3) ) v8 = *(float *)&v7 + 180.0; v9 = ((double (__fastcall *)(DashRingObject *))v3->getRotationX)(v3); if ( fabs(*(float *)&v9 - v3->getRotationY(v3)) > 179.0 ) v8 = v8 + 180.0; v10 = fmodf(-v8, 360.0); v11 = v10; if ( v10 <= 180.0 ) { if ( v10 < -180.0 ) v11 = v10 + 360.0; } else { v11 = v10 + -360.0; } if ( a1->m_isPlatformer ) goto LABEL_61; v12 = 0.0; if ( a1->m_isSideways ) v12 = -90.0; if ( a1->m_isGoingLeft ) v12 = v12 + 180.0; if ( v12 != 0.0 ) { v11 = v11 + v12; if ( v11 <= 180.0 ) { if ( v11 < -180.0 ) v11 = v11 + 360.0; } else { v11 = v11 + -360.0; } } if ( fabs(v11) > 90.0 ) { if ( v11 <= 0.0 ) v13 = -180.0; else v13 = 180.0; v14 = v13 - v11; v11 = v14; if ( v14 <= 180.0 ) { if ( v14 < -180.0 ) v11 = v14 + 360.0; } else { v11 = v14 + -360.0; } } if ( v11 > 70.0 || v11 < -70.0 ) { if ( v11 <= 0.0 ) { if ( v11 < 70.0 && v11 > -180.0 ) { v11 = -70.0; goto LABEL_56; } } else if ( v11 <= 70.0 || v11 >= 180.0 ) { v11 = -70.0; goto LABEL_56; } v11 = 70.0; } LABEL_56: if ( v12 != 0.0 ) { v11 = v11 - v12; if ( v11 <= 180.0 ) { if ( v11 < -180.0 ) v11 = v11 + 360.0; } else { v11 = v11 + -360.0; } } LABEL_61: v15 = cocos2d::ccpForAngle((cocos2d *)&v70, v11 * 0.017453292); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator*)(v15, &v68); if ( a1->m_isSideways ) { v16 = v68; v17 = v69; v68 = v69; v69 = v16; } else { v16 = v69; v17 = v68; } v2 = v17; a1->m_dashX = v17; a1->m_dashY = v16; if ( a1->m_isPlatformer ) { if ( v2 >= 0.0 ) { if ( v2 > 0.0 ) PlayerObject::doReversePlayer(a1, 0); } else { PlayerObject::doReversePlayer(a1, 1); } } else { v18 = (float)(v16 / fabs(v17)); a1->m_dashY = v18; a1->m_dashX = fabs(v18); } a1->m_dashAngle = v11; } PlayerObject::updateDashArt(a1); cocos2d::CCNode::stopAllActions(a1->m_dashFireSprite); v19 = ((double (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleX)(a1->m_dashFireSprite); v20 = *(float *)&v19 * 1.1; v21 = ((double (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->getScaleY)(a1->m_dashFireSprite); v22 = *(float *)&v21 * 1.2; v23 = (float)(*(float *)&v21 * 1.2) * 1.2; ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite); v24 = cocos2d::CCScaleTo::create(0.1, v20 * 0.89999998, v23); v25 = cocos2d::CCEaseInOut::create(v24, 2.0); v26 = cocos2d::CCScaleTo::create(0.1, v20, v22); v27 = cocos2d::CCEaseInOut::create(v26, 2.0); v28 = cocos2d::CCSequence::create(v25, v27, 0); cocos2d::CCNode::runAction((CCLightFlash *)a1->m_dashFireSprite, (cocos2d::CCPoint)v28, v29, *(float *)&v2, v63); cocos2d::CCParticleSystem::resumeSystem(a1->m_dashParticles); v30 = 2698; if ( !a1->m_switchDashFireColor ) v30 = 2701; v31 = *(_WORD *)((char *)&a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v30); LOWORD(v68) = v31; v32 = *((_BYTE *)&a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v30 + 2); if ( v3 && a1->m_playEffects && !m_hasNoEffects ) { v33 = (CCLightFlash *)cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_boom2_001.png"); v34 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v70 = (__int64)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(v70); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v34 = qword_1406C2ED8; } (*(void (__fastcall **)(_QWORD, CCLightFlash *, __int64))(**(_QWORD **)(*(_QWORD *)(v34 + 520) + 4072LL) + 440LL))( *(_QWORD *)(*(_QWORD *)(v34 + 520) + 4072LL), v33, 40); v70 = 0x100000302LL; v35 = 1; ((void (__fastcall *)(cocos2d::CCNode **, __int64))v33->m_mainLayer->__vftable)(&v33->m_mainLayer, 0x100000302LL); ((void (__fastcall *)(CCLightFlash *))v33->setRotation)(v33); ((void (__fastcall *)(CCLightFlash *))v33->setScale_0)(v33); v36 = v33->__vftable; v37 = ((__int64 (__fastcall *)(DashRingObject *, __int64 *))v3->getRealPosition)(v3, &v70); v36->setPosition_0(v33, (const cocos2d::CCPoint *)v37); ((void (__fastcall *)(cocos2d::CCArray **, __int16 *))v33->m_lightStripArray->__vftable)( &v33->m_lightStripArray, &word_140529BAC); v39 = (cocos2d::CCArray *)cocos2d::CCArray::create(v38); do { v40 = cocos2d::CCString::createWithFormat("playerDash2_boom2_%03d.png", v35); CString = cocos2d::CCString::getCString(v40); v43 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v42); v44 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v43, CString); cocos2d::CCArray::addObject(v39, v44); ++v35; } while ( v35 <= 9 ); v45 = cocos2d::CCAnimation::createWithSpriteFrames(v39, 0.050000001); v46 = cocos2d::CCAnimate::create(v45); v47 = cocos2d::CCCallFunc::create(v33, sub_14003BE70); v48 = cocos2d::CCSequence::create(v46, v47, 0); cocos2d::CCNode::runAction(v33, (cocos2d::CCPoint)v48, v49, *(float *)&v2, v64); v50 = cocos2d::CCDelayTime::create(0.2); v51 = cocos2d::CCFadeOut::create(0.30000001); v52 = cocos2d::CCSequence::create(v50, v51, 0); cocos2d::CCNode::runAction(v33, (cocos2d::CCPoint)v52, v53, *(float *)&v2, v65); v54 = 0; v55 = -1; if ( v3->m_objectID != 1704 ) { v54 = -1; v55 = 0; } v56 = cocos2d::CCTintTo::create(0.30000001, v54, v55, v54); cocos2d::CCNode::runAction(v33, (cocos2d::CCPoint)v56, v57, *(float *)&v2, v66); *(_WORD *)&a1->m_flashMainColor.r = -1; a1->m_flashMainColor.b = -1; *(_WORD *)&a1->m_flashSecondColor.r = -1; a1->m_flashSecondColor.b = -1; ((void (__fastcall *)(cocos2d::CCRGBAProtocol *))a1->setColor)(&a1->cocos2d::CCRGBAProtocol); PlayerObject::setSecondColor(a1, &a1->m_flashSecondColor); a1->m_flashTime = a1->m_totalTime; a1->m_flashDuration = 0.2; a1->m_flashDelay = 0.1; a1->m_dashFireSprite->setColor( &a1->m_dashFireSprite->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&word_140529BAC); v58 = cocos2d::CCDelayTime::create(0.1); v59 = cocos2d::CCTintTo::create(0.2, v31, BYTE1(v68), v32); v60 = cocos2d::CCSequence::create(v58, v59, 0); cocos2d::CCNode::runAction((CCLightFlash *)a1->m_dashFireSprite, (cocos2d::CCPoint)v60, v61, *(float *)&v2, v67); } cocos2d::CCPoint::operator=(&a1->m_lastGroundedPos, &stru_1406C2450); 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