//
// PlayerObject::runBallRotation from 0x14038d350 to 0x14038d473 (291 bytes)
//
// 11 xrefs:
// > PlayerObject::updateJump @ 0x14038c417
// > PlayerObject::postCollision @ 0x14038db5e
// > PlayerObject::collidedWithSlopeInternal @ 0x140390b5b
// > PlayerObject::stopDashing @ 0x140396c95
// > PlayerObject::doReversePlayer @ 0x14039863c
// > PlayerObject::rotateGameplay @ 0x14039a0c0
// > PlayerObject::resetPlayerIcon @ 0x14039b36a
// > PlayerObject::hitGround @ 0x14039c506
// > PlayerObject::propellPlayer @ 0x14039f964
// > PlayerObject::togglePlayerScale @ 0x1403a0cff
// > PlayerObject::updateTimeMod @ 0x1403a1099
//
// 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::runBallRotation(PlayerObject *a1, float a2)
{
float v3; // xmm2_4
float m_vehicleSize; // xmm0_4
float v5; // xmm1_4
float m_playerSpeed; // xmm0_4
float v7; // xmm1_4
int v8; // ecx
int v9; // eax
bool v10; // zf
float v11; // xmm0_4
if ( !a1->m_isDashing && !a1->m_isPlatformer )
{
v3 = 1.0;
a1->m_isBallRotating = a2 != 1.0;
m_vehicleSize = a1->m_vehicleSize;
a1->m_rotateSpeed = a2;
if ( m_vehicleSize == 1.0 )
v5 = 1.0;
else
v5 = 0.80000001;
m_playerSpeed = a1->m_playerSpeed;
if ( m_playerSpeed == 0.69999999 )
{
v3 = 1.2405638;
}
else if ( m_playerSpeed == 1.1 )
{
v3 = 0.80424345;
}
else if ( m_playerSpeed == 1.3 )
{
v3 = 0.66576928;
}
else if ( m_playerSpeed == 1.6 )
{
v3 = 0.54093748;
}
v7 = v5 * 0.2;
v8 = -120;
if ( !a1->m_isUpsideDown )
v8 = 120;
v9 = -1;
if ( !a1->m_isGoingLeft )
v9 = 1;
v10 = !a1->m_isSideways;
v11 = (float)(v9 * v8) / (float)(v7 * v3);
a1->m_rotationSpeed = v11;
if ( !v10 )
a1->m_rotationSpeed = v11 * -1.0;
a1->m_isRotating = 1;
}
}