//
// PlayerObject::stopDashing from 0x62c8d8 to 0x62ced8 (1536 bytes)
//
// 9 xrefs:
// > PlayerObject::playerDestroyed @ 0x62cf00
// > PlayerObject::collidedWithObjectInternal @ 0x62fae0
// > PlayerObject::collidedWithObjectInternal @ 0x630190
// > PlayerObject::resetObject @ 0x632500
// > PlayerObject::touchedObject @ 0x63acc8
// > PlayerObject::releaseButton @ 0x63aec4
// > PlayerObject::update @ 0x63f8cc
// > PlayerObject::playCompleteEffect @ 0xa26a84
// > ??> @ 0x9a218
//
// 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::stopDashing(PlayerObject *a1)
{
_BOOL4 m_isPlatformer; // w0
DashRingObject *m_dashRing; // x0
double m_dashY; // d2
double m_endBoost; // d1
float v6; // s0
cocos2d::CCSprite *m_dashFireSprite; // x2
float v8; // s8
float m_dashX; // s0
float v10; // s1
float v11; // s0
float v12; // s0
cocos2d::CCSprite *v13; // x21
GameManager *v14; // x0
cocos2d::CCSprite *v15; // x23
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
void (__fastcall *v17)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
const cocos2d::CCPoint *v18; // x26
const cocos2d::CCPoint *v19; // x0
void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // x25
float v21; // s0
void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // x25
float v23; // s0
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x25
const cocos2d::ccColor3B *v25; // x0
float m_dashAngle; // s0
float v27; // s9
cocos2d::CCSequence *v28; // x25
cocos2d::CCFiniteTimeAction *v29; // x0
cocos2d::CCAction *v30; // x0
cocos2d::CCMoveBy *v31; // x0
cocos2d::CCFadeTo *v32; // x0
cocos2d::CCFadeTo *v33; // x0
GJRobotSprite *m_robotSprite; // x22
void *v35; // x0
unsigned int *v36; // x2
int v37; // w1
__int64 v38; // [xsp+0h] [xbp+0h] BYREF
cocos2d::CCPoint *v39; // [xsp+68h] [xbp+68h]
cocos2d::CCPoint v40; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCPoint v41; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCPoint v42; // 0:s0.4,4:s1.4
if ( a1->m_isDashing )
{
m_isPlatformer = a1->m_isPlatformer;
a1->m_isDashing = 0;
a1->m_lastLandTime = 0.0;
if ( m_isPlatformer )
{
m_dashRing = a1->m_dashRing;
if ( m_dashRing )
{
m_dashY = a1->m_dashY;
m_endBoost = m_dashRing->m_endBoost;
v39 = &v40;
v6 = m_endBoost * a1->m_dashX;
*(float *)&m_endBoost = m_endBoost * m_dashY;
cocos2d::CCPoint::CCPoint(&v40, v6, *(float *)&m_endBoost);
cocos2d::CCPoint::CCPoint(&v41, v39);
PlayerObject::updatePlayerForce(a1, v42, (unsigned __int8)&v38 + 0x80);
if ( a1->m_dashRing->m_stopSlide )
PlayerObject::handlePlayerCommand(a1, 543);
}
}
m_dashFireSprite = a1->m_dashFireSprite;
a1->m_dashRing = nullptr;
m_dashFireSprite->setVisible(m_dashFireSprite, 0);
if ( a1->m_playEffects && !a1->m_maybeReducedEffects )
{
v13 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_001.png");
v14 = GameManager::sharedState();
v14->m_playLayer->m_objectLayer->addChild_0(v14->m_playLayer->m_objectLayer, v13, 40);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))v13->setBlendFunc)(v13, 0x100000302LL);
v15 = cocos2d::CCSprite::createWithSpriteFrameName("playerDash2_outline_001.png");
v13->addChild_0(v13, v15, 1);
((void (__fastcall *)(cocos2d::CCPoint *__return_ptr, cocos2d::CCSprite *))v13->getScaledContentSize)(&v40, v13);
setPosition = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v41, v40.x * 0.5, v40.y * 0.5);
setPosition(v15, &v41);
v15->setOpacity(v15, 4294967190LL);
v17 = v13->setPosition;
v18 = a1->getPosition(a1);
v19 = a1->m_dashFireSprite->getPosition(a1->m_dashFireSprite);
cocos2d::CCPoint::operator+(&v41, v18, v19);
v17(v13, &v41);
setScaleX = v13->setScaleX;
v21 = a1->m_dashFireSprite->getScaleX(a1->m_dashFireSprite);
setScaleX(v13, v21 * a1->m_vehicleSize);
setScaleY = v13->setScaleY;
v23 = a1->m_dashFireSprite->getScaleY(a1->m_dashFireSprite);
setScaleY(v13, v23 * a1->m_vehicleSize);
setColor = v13->setColor;
v25 = a1->m_dashFireSprite->getColor(a1->m_dashFireSprite);
setColor(v13, v25);
m_dashAngle = a1->m_dashAngle;
v13->setRotation(v13, -m_dashAngle);
v27 = v13->getScaleX(v13);
v13->getScaleY(v13);
v28 = (cocos2d::CCSequence *)cocos2d::CCScaleTo::create(0.2, v27 * 0.2);
v29 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v13, 520, 1);
v30 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v28, v29, 0);
cocos2d::CCNode::runAction(v13, v30);
cocos2d::CCPoint::CCPoint(&v41, -20.0, 0.0);
v31 = cocos2d::CCMoveBy::create(0.2, &v41);
cocos2d::CCNode::runAction(v13, v31);
v32 = cocos2d::CCFadeTo::create(0.2, 0);
cocos2d::CCNode::runAction(v13, v32);
v33 = cocos2d::CCFadeTo::create(0.2, 0);
cocos2d::CCNode::runAction(v15, v33);
}
cocos2d::CCParticleSystem::stopSystem(a1->m_dashParticles);
if ( !PlayerObject::isFlying(a1) && !a1->m_isRobot && !a1->m_isSpider )
{
v8 = a1->m_iconSprite->getRotation(a1->m_iconSprite);
a1->m_iconSprite->setScale(a1->m_iconSprite, 1.0);
cocos2d::CCNode::stopAllActions(a1->m_iconSprite);
a1->m_iconSprite->setRotation(a1->m_iconSprite, 0.0);
a1->m_iconGlow->setScale(a1->m_iconGlow, 1.0);
cocos2d::CCNode::stopAllActions(a1->m_iconGlow);
a1->m_iconGlow->setRotation(a1->m_iconGlow, 0.0);
a1->setRotation(a1, v8);
if ( a1->m_isPlatformer )
{
m_dashX = a1->m_dashX;
v10 = a1->m_dashY;
cocos2d::CCPoint::CCPoint(&v41, m_dashX, v10);
v11 = sqrtf((float)(v41.y * v41.y) + (float)(v41.x * v41.x));
if ( v11 > 17.31 )
v12 = 2.0;
else
v12 = (float)((float)(v11 / 17.31) * 1.5) + 0.5;
PlayerObject::runNormalRotation(a1, 1, v12);
}
}
if ( a1->m_isBall )
{
if ( !a1->m_isPlatformer || (PlayerObject::stopRotation(a1, 0, 5), a1->m_isBall) )
PlayerObject::runBallRotation(a1, 1.0);
}
if ( a1->m_isOnGround2 )
{
if ( a1->m_isRobot )
{
m_robotSprite = a1->m_robotSprite;
sub_D18D28(&v41, &a1->m_currentRobotAnimation);
CCAnimatedSprite::runAnimation((__int64)m_robotSprite, (__int64)&v41);
v35 = (void *)(*(_QWORD *)&v41 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v41 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v36 = (unsigned int *)(*(_QWORD *)&v41 - 8LL);
do
v37 = __ldaxr(v36);
while ( __stlxr(v37 - 1, v36) );
}
else
{
v37 = *(_DWORD *)(*(_QWORD *)&v41 - 8LL);
*(_DWORD *)(*(_QWORD *)&v41 - 8LL) = v37 - 1;
}
if ( v37 <= 0 )
operator delete(v35);
}
}
else if ( a1->m_isSpider )
{
PlayerObject::playDynamicSpiderRun(a1);
}
}
if ( a1->m_gameLayer )
PlayerObject::gameEventTriggered(a1, 24, 0);
}
}