//
// PlayerObject::updateDashArt from 0x1403961c0 to 0x14039664e (1166 bytes)
//
// 14 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x140210798
// > GJBaseGameLayer::collisionCheckObjects @ 0x140214f40
// > PlayerObject::startDashing @ 0x140395d23
// > PlayerObject::rotateGameplay @ 0x14039a1a2
// > PlayerObject::toggleFlyMode @ 0x14039a806
// > PlayerObject::toggleBirdMode @ 0x14039aaf6
// > PlayerObject::toggleSwingMode @ 0x14039adaf
// > PlayerObject::toggleDartMode @ 0x14039b2c6
// > PlayerObject::toggleRollMode @ 0x14039b6d9
// > PlayerObject::toggleRobotMode @ 0x14039ba41
// > PlayerObject::toggleSpiderMode @ 0x14039bd37
// > ??> @ 0x140697cc4
// > ??> @ 0x140697cd4
// > ??> @ 0x1406d6380
//
// 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 PlayerObject::updateDashArt(PlayerObject *a1)
{
float v1; // xmm3_4
double v3; // xmm0_8
float v4; // xmm6_4
cocos2d::CCSprite_vtbl *v5; // rbx
const cocos2d::CCPoint *v6; // rax
GJRobotSprite *m_robotSprite; // rcx
const cocos2d::CCPoint *v8; // rax
GJSpiderSprite *m_spiderSprite; // rcx
const cocos2d::CCPoint *v10; // rax
double v11; // xmm0_8
float v12; // xmm6_4
float *v13; // rax
float v14; // xmm1_4
float v15; // xmm0_4
float v16; // xmm0_4
struct cocos2d::CCRotateBy *v17; // rax
struct cocos2d::CCRepeatForever *v18; // rbx
cocos2d::ccColor3B *v19; // r8
struct cocos2d::CCRotateBy *v20; // rax
struct cocos2d::CCRepeatForever *v21; // rbx
cocos2d::ccColor3B *v22; // r8
__int64 v23; // [rsp+20h] [rbp-48h] BYREF
__int64 v24; // [rsp+28h] [rbp-40h]
__int64 v25; // [rsp+30h] [rbp-38h]
__int64 v26; // [rsp+38h] [rbp-30h]
if ( !a1->m_isDashing )
return;
cocos2d::CCNode::stopActionByTag(a1->m_iconSprite, 12);
cocos2d::CCNode::stopActionByTag(a1->m_iconGlow, 12);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->setRotation)(a1->m_iconSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconGlow->setRotation)(a1->m_iconGlow);
v3 = (double)(a1->m_isSideways ? 0x5A : 0) - a1->m_dashAngle;
((void (__fastcall *)(PlayerObject *))a1->setRotation)(a1);
cocos2d::CCNode::stopAllActions(a1->m_dashFireSprite);
v4 = 1.0;
v5 = a1->m_dashFireSprite->__vftable;
if ( *(_WORD *)&a1->m_isShip )
goto LABEL_7;
if ( !a1->m_isRobot )
{
if ( a1->m_isSpider )
{
cocos2d::CCPoint::CCPoint(*(float *)&v3, 1.0);
v5->setPosition_0(a1->m_dashFireSprite, v8);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite);
m_spiderSprite = a1->m_spiderSprite;
v24 = 112;
v25 = 9;
v23 = 0x6F6F6C5F6C6C6166LL;
v26 = 15;
CCAnimatedSprite::runAnimation((__int64)m_spiderSprite, (__int64)&v23);
goto LABEL_8;
}
LABEL_7:
cocos2d::CCPoint::CCPoint(*(float *)&v3, 0.0);
v5->setPosition_0(a1->m_dashFireSprite, v10);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite);
goto LABEL_8;
}
cocos2d::CCPoint::CCPoint(*(float *)&v3, 1.0);
v5->setPosition_0(a1->m_dashFireSprite, v6);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleX)(a1->m_dashFireSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_dashFireSprite->setScaleY)(a1->m_dashFireSprite);
m_robotSprite = a1->m_robotSprite;
v24 = 112;
v25 = 9;
v23 = 0x6F6F6C5F6C6C6166LL;
v26 = 15;
CCAnimatedSprite::runAnimation((__int64)m_robotSprite, (__int64)&v23);
LABEL_8:
if ( !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing && !a1->m_isRobot && !a1->m_isSpider )
{
v11 = ((double (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->setScale_0)(a1->m_iconSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconGlow->setScale_0)(a1->m_iconGlow);
if ( a1->m_isSideways != a1->m_isUpsideDown )
v4 = -1.0;
v12 = (float)(v4 * 288.0) * a1->m_gravityMod;
if ( a1->m_isPlatformer )
{
cocos2d::CCPoint::CCPoint(*(float *)&v11, a1->m_dashX);
v14 = (float)(*v13 * *v13) + (float)(v13[1] * v13[1]);
if ( v14 < 0.0 )
v15 = sqrtf(v14);
else
v15 = fsqrt(v14);
if ( v15 <= 17.310005 )
v16 = (float)((float)(v15 / 17.310005) * 1.7) + 0.30000001;
else
v16 = 2.0;
v12 = v12 * v16;
}
v17 = cocos2d::CCRotateBy::create(0.30000001, v12);
v18 = cocos2d::CCRepeatForever::create(v17);
v18->setTag(v18, 12);
cocos2d::CCNode::runAction((CCLightFlash *)a1->m_iconSprite, (cocos2d::CCPoint)v18, v19, v1, *(float *)&v23);
v20 = cocos2d::CCRotateBy::create(0.30000001, v12);
v21 = cocos2d::CCRepeatForever::create(v20);
v21->setTag(v21, 12);
cocos2d::CCNode::runAction((CCLightFlash *)a1->m_iconGlow, (cocos2d::CCPoint)v21, v22, v1, *(float *)&v23);
}
}