//
// PlayerObject::updateDashArt from 0x100225cbc to 0x100226118 (1116 bytes)
//
// 11 xrefs:
// > PlayerObject::redirectDash @ 0x100225ca4
// > PlayerObject::startDashing @ 0x100226578
// > PlayerObject::rotateGameplay @ 0x100226f18
// > PlayerObject::toggleFlyMode @ 0x1002298f4
// > PlayerObject::modeDidChange @ 0x100229e14
// > PlayerObject::toggleBirdMode @ 0x10022a080
// > PlayerObject::toggleSwingMode @ 0x10022a4dc
// > PlayerObject::toggleDartMode @ 0x10022ac14
// > PlayerObject::toggleRollMode @ 0x10022af1c
// > PlayerObject::toggleRobotMode @ 0x10022b368
// > PlayerObject::toggleSpiderMode @ 0x10022b638
//
// 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::updateDashArt(PlayerObject *a1)
{
__n128 v2; // q0
double v3; // d1
__n128 v4; // q0
__n128 v5; // q1
cocos2d::CCSprite *m_dashFireSprite; // x20
__n128 v7; // q0
cocos2d::CCSprite *v8; // x20
__n128 v9; // q0
__n128 v10; // q1
__n128 v11; // q0
float v12; // s8
float v13; // s1
float v14; // s0
cocos2d::CCRotateBy *v15; // x0
cocos2d::CCRepeatForever *v16; // x20
cocos2d::CCRotateBy *v17; // x0
cocos2d::CCRepeatForever *v18; // x20
cocos2d::CCSprite *v19; // x20
GJRobotSprite *m_robotSprite; // x20
void *v21; // x0
cocos2d::CCSprite *v22; // x20
GJSpiderSprite *m_spiderSprite; // x20
__n128 v24; // q0
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v26; // [xsp+1Fh] [xbp-41h]
_QWORD v27[2]; // [xsp+20h] [xbp-40h] BYREF
char v28; // [xsp+37h] [xbp-29h]
float v29; // [xsp+38h] [xbp-28h] BYREF
float v30; // [xsp+3Ch] [xbp-24h]
if ( !a1->m_isDashing )
return;
cocos2d::CCNode::stopActionByTag(a1->m_iconSprite, 12);
cocos2d::CCNode::stopActionByTag(a1->m_iconGlow, 12);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconSprite->setRotation)(a1->m_iconSprite, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconGlow->setRotation)(a1->m_iconGlow, 0.0);
v3 = 90.0;
if ( !a1->m_isSideways )
v3 = 0.0;
v2.n128_f64[0] = v3 - a1->m_dashAngle;
v2.n128_f32[0] = v2.n128_f64[0];
if ( a1->m_isGoingLeft )
v2.n128_f32[0] = v2.n128_f32[0] + 180.0;
((void (__fastcall *)(PlayerObject *, __n128))a1->setRotation)(a1, v2);
cocos2d::CCNode::stopAllActions(a1->m_dashFireSprite);
if ( a1->m_isShip )
{
m_dashFireSprite = a1->m_dashFireSprite;
v4.n128_u32[0] = 0;
v5.n128_u32[0] = -2.0;
sub_100022980(v4, v5, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float *))m_dashFireSprite->setPosition)(m_dashFireSprite, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 1.0);
v7.n128_u32[0] = 1062836634;
((void (__fastcall *)(__n128))a1->m_dashFireSprite->setScaleY)(v7);
goto LABEL_10;
}
if ( a1->m_isBird )
{
v8 = a1->m_dashFireSprite;
v4.n128_u32[0] = 0;
v5.n128_u32[0] = 0;
sub_100022980(v4, v5, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v8->setPosition)(v8, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.95);
v9.n128_u32[0] = 1063675494;
((void (__fastcall *)(__n128))a1->m_dashFireSprite->setScaleY)(v9);
goto LABEL_10;
}
if ( a1->m_isRobot )
{
v19 = a1->m_dashFireSprite;
v4.n128_u32[0] = 1.0;
v5.n128_u32[0] = 0;
sub_100022980(v4, v5, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v19->setPosition)(v19, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.9);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite, 0.85);
m_robotSprite = a1->m_robotSprite;
sub_100009900(v27, "fall_loop");
CCAnimatedSprite::runAnimation(m_robotSprite, v27);
if ( (v28 & 0x80000000) == 0 )
goto LABEL_10;
v21 = (void *)v27[0];
LABEL_30:
operator delete(v21);
goto LABEL_10;
}
v22 = a1->m_dashFireSprite;
if ( !a1->m_isSpider )
{
v4.n128_u32[0] = 0;
v5.n128_u32[0] = 0;
sub_100022980(v4, v5, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v22->setPosition)(v22, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.9);
v24.n128_u32[0] = 1061997773;
((void (__fastcall *)(__n128))a1->m_dashFireSprite->setScaleY)(v24);
goto LABEL_10;
}
v4.n128_u32[0] = 1.0;
v5.n128_u32[0] = 0;
sub_100022980(v4, v5, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v22->setPosition)(v22, &v29);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite, 0.95);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite, 0.8);
m_spiderSprite = a1->m_spiderSprite;
sub_100009900(__p, "fall_loop");
CCAnimatedSprite::runAnimation(m_spiderSprite, __p);
if ( v26 < 0 )
{
v21 = __p[0];
goto LABEL_30;
}
LABEL_10:
if ( !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing && !a1->m_isRobot && !a1->m_isSpider )
{
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconSprite->setScale)(a1->m_iconSprite, 0.9);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_iconGlow->setScale)(a1->m_iconGlow, 0.9);
v11.n128_u32[0] = -1013972992;
if ( a1->m_isSideways == a1->m_isUpsideDown )
v11.n128_f32[0] = 288.0;
v12 = a1->m_gravityMod * v11.n128_f32[0];
if ( a1->m_isPlatformer )
{
v11.n128_u64[0] = *(_QWORD *)&a1->m_dashX;
v11.n128_f32[0] = v11.n128_f64[0];
v10.n128_u64[0] = *(_QWORD *)&a1->m_dashY;
v10.n128_f32[0] = v10.n128_f64[0];
sub_100022980(v11, v10, &v29);
v13 = sqrtf((float)(v30 * v30) + (float)(v29 * v29));
v14 = 2.0;
if ( v13 <= 17.31 )
v14 = (float)((float)(v13 / 17.31) * 1.7) + 0.3;
v12 = v12 * v14;
}
v15 = cocos2d::CCRotateBy::create_1(0.3, v12);
v16 = cocos2d::CCRepeatForever::create(v15);
((void (__fastcall *)(cocos2d::CCRepeatForever *, __int64))v16->setTag)(v16, 12);
cocos2d::CCNode::runAction(a1->m_iconSprite, v16);
v17 = cocos2d::CCRotateBy::create_1(0.3, v12);
v18 = cocos2d::CCRepeatForever::create(v17);
((void (__fastcall *)(cocos2d::CCRepeatForever *, __int64))v18->setTag)(v18, 12);
cocos2d::CCNode::runAction(a1->m_iconGlow, v18);
}
}