//
// PlayerObject::runBallRotation2 from 0x14038d480 to 0x14038d577 (247 bytes)
//
// 3 xrefs:
// > PlayerObject::ringJump @ 0x140399566
// > PlayerObject::ringJump @ 0x14039996b
// > PlayerObject::flipGravity @ 0x14039a409
//
// 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::runBallRotation2(PlayerObject *a1)
{
float v2; // xmm3_4
float v3; // xmm1_4
float m_playerSpeed; // xmm0_4
int v5; // ecx
int v6; // eax
double v7; // xmm1_8
if ( !a1->m_isDashing )
{
v2 = 1.0;
if ( a1->m_vehicleSize == 1.0 )
v3 = 1.0;
else
v3 = 0.80000001;
m_playerSpeed = a1->m_playerSpeed;
if ( m_playerSpeed == 0.69999999 )
{
v2 = 1.2405638;
}
else if ( m_playerSpeed == 1.1 )
{
v2 = 0.80424345;
}
else if ( m_playerSpeed == 1.3 )
{
v2 = 0.66576928;
}
else if ( m_playerSpeed == 1.6 )
{
v2 = 0.54093748;
}
v5 = 340;
if ( !a1->m_isUpsideDown )
v5 = -340;
a1->m_isBallRotating2 = 1;
v6 = -1;
v7 = v3;
if ( !a1->m_isGoingLeft )
v6 = 1;
a1->m_rotationSpeed = (float)((float)(v6 * v5) * a1->m_gravityMod) / (v7 * 0.8 * v2);
}
}