//
// PlayerObject::resetPlayerIcon from 0x14039b2e0 to 0x14039b4d3 (499 bytes)
//
// 6 xrefs:
// > PlayerObject::toggleFlyMode @ 0x14039a7f1
// > PlayerObject::toggleBirdMode @ 0x14039aae1
// > PlayerObject::toggleSwingMode @ 0x14039ad60
// > PlayerObject::toggleDartMode @ 0x14039b27f
// > PlayerObject::toggleSpiderMode @ 0x14039bdd7
// > ??> @ 0x1406d65c0
//
// 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::resetPlayerIcon(PlayerObject *a1)
{
bool v2; // zf
cocos2d::CCParticleSystemQuad *m_trailingParticles; // rcx
cocos2d::CCParticleSystemQuad *v4; // rcx
cocos2d::ccColor3B *p_m_playerColor2; // rdx
float v6; // xmm1_4
cocos2d::CCMotionStreak *m_shipStreak; // rcx
__int128 v8; // [rsp+20h] [rbp-28h] BYREF
PlayerObject::stopPlatformerJumpAnimation(a1);
v2 = !a1->m_isLocked;
a1->m_width = 30.0;
a1->m_height = 30.0;
a1->m_unkAngle1 = 30.0;
if ( v2 && !a1->m_isDashing )
{
v2 = !a1->m_isBall;
*(_WORD *)&a1->m_isRotating = 0;
a1->m_isBallRotating = 0;
a1->m_rotationSpeed = 0.0;
if ( v2 )
PlayerObject::runNormalRotation(a1, 0, 1.0);
else
PlayerObject::runBallRotation(a1, 1.0);
}
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_iconSprite->setScale_0)(a1->m_iconSprite);
a1->m_iconSprite->setPosition_0(a1->m_iconSprite, &stru_1406C2450);
a1->m_vehicleSprite->setVisible(a1->m_vehicleSprite, 0);
a1->m_birdVehicle->setVisible(a1->m_birdVehicle, 0);
PlayerObject::updatePlayerGlow(a1);
cocos2d::CCParticleSystem::stopSystem(a1->m_trailingParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_shipClickParticles);
cocos2d::CCParticleSystem::stopSystem(a1->m_vehicleGroundParticles);
m_trailingParticles = a1->m_trailingParticles;
v8 = xmmword_140624100;
m_trailingParticles->setStartColor(m_trailingParticles, (const cocos2d::ccColor4F *)&v8);
v4 = a1->m_trailingParticles;
v8 = xmmword_1406240D0;
v4->setEndColor(v4, (const cocos2d::ccColor4F *)&v8);
p_m_playerColor2 = (cocos2d::ccColor3B *)&word_140529BAC;
if ( !a1->m_disableStreakTint )
p_m_playerColor2 = &a1->m_playerColor2;
a1->m_regularTrail->setColor(&a1->m_regularTrail->cocos2d::CCRGBAProtocol, p_m_playerColor2);
if ( !a1->m_alwaysShowStreak )
cocos2d::CCMotionStreak::stopStroke(a1->m_regularTrail);
if ( a1->m_fadeOutStreak )
{
v2 = !a1->m_playEffects;
a1->m_fadeOutStreak = 0;
if ( v2 )
v6 = 0.60000002;
else
v6 = 0.2;
PlayerObject::fadeOutStreak2(a1, v6);
}
m_shipStreak = a1->m_shipStreak;
if ( m_shipStreak )
m_shipStreak->setVisible(m_shipStreak, 0);
PlayerObject::updatePlayerScale(a1);
}