//
// PlayerObject::runBallRotation from 0x33e384 to 0x33e47e (250 bytes)
//
// 3 xrefs:
// > PlayerObject::runRotateAction @ 0x33f1a4
// > PlayerObject::stopDashing @ 0x34406a
// > PlayerObject::collidedWithSlopeInternal @ 0x34c354
//
// 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; // s17
float m_playerSpeed; // s15
float v5; // s16
int v6; // r5
int v7; // r0
_BOOL4 m_isSideways; // r2
float v9; // s15
if ( !a1->m_isDashing && !a1->m_isPlatformer )
{
v3 = 0.8;
a1->m_isBallRotating = a2 != 1.0;
a1->m_rotateSpeed = a2;
m_playerSpeed = a1->m_playerSpeed;
if ( a1->m_vehicleSize == 1.0 )
v3 = 1.0;
if ( m_playerSpeed == 0.7 )
{
v5 = 1.2406;
}
else if ( m_playerSpeed == 1.1 )
{
v5 = 0.80424;
}
else if ( m_playerSpeed == 1.3 )
{
v5 = 0.66577;
}
else
{
v5 = 0.54094;
if ( m_playerSpeed != 1.6 )
v5 = 1.0;
}
v6 = PlayerObject::flipMod(a1);
v7 = PlayerObject::reverseMod(a1);
m_isSideways = a1->m_isSideways;
v9 = (float)(v7 * 120 * v6) / (float)((float)(v3 * 0.2) * v5);
a1->m_rotationSpeed = v9;
if ( m_isSideways )
a1->m_rotationSpeed = -v9;
a1->m_isRotating = 1;
}
}