//
// PlayerObject::runBallRotation from 0x10021e6f4 to 0x10021e7f4 (256 bytes)
//
// 3 xrefs:
// > PlayerObject::stopDashing @ 0x10021cf70
// > PlayerObject::runRotateAction @ 0x10021d488
// > PlayerObject::collidedWithSlopeInternal @ 0x100221694
//
// 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 __fastcall PlayerObject::runBallRotation(PlayerObject *a1, float a2)
{
float m_playerSpeed; // s2
float v3; // s2
int v4; // w9
float v5; // s0
if ( !a1->m_isDashing && !a1->m_isPlatformer )
{
a1->m_isBallRotating = a2 != 1.0;
a1->m_rotateSpeed = a2;
m_playerSpeed = a1->m_playerSpeed;
if ( m_playerSpeed == 0.7 )
{
v3 = 1.2406;
}
else if ( m_playerSpeed == 1.1 )
{
v3 = 0.80424;
}
else if ( m_playerSpeed == 1.3 )
{
v3 = 0.66577;
}
else if ( m_playerSpeed == 1.6 )
{
v3 = 0.54094;
}
else
{
v3 = 1.0;
}
if ( a1->m_isUpsideDown )
v4 = -120;
else
v4 = 120;
if ( a1->m_isGoingLeft )
v4 = -v4;
v5 = (float)v4 / (float)(flt_10063A888[a1->m_vehicleSize == 1.0] * v3);
a1->m_rotationSpeed = v5;
if ( a1->m_isSideways )
a1->m_rotationSpeed = -v5;
a1->m_isRotating = 1;
}
}