//
// PlayerObject::runBallRotation from 0x624490 to 0x62459c (268 bytes)
//
// 4 xrefs:
// > PlayerObject::runRotateAction @ 0x625648
// > PlayerObject::stopDashing @ 0x62caf4
// > PlayerObject::collidedWithSlopeInternal @ 0x637b90
// > ??> @ 0xac920
//
// 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 v2; // s8
float m_vehicleSize; // s1
float m_playerSpeed; // s0
float v5; // s9
int v7; // w20
int v8; // w0
_BOOL4 m_isSideways; // w1
float v10; // s0
if ( a1->m_isDashing || a1->m_isPlatformer )
return;
v2 = 1.0;
m_vehicleSize = a1->m_vehicleSize;
a1->m_rotateSpeed = a2;
a1->m_isBallRotating = a2 != 1.0;
if ( m_vehicleSize == 1.0 )
{
m_playerSpeed = a1->m_playerSpeed;
if ( m_playerSpeed == 0.7 )
{
LABEL_5:
v5 = 1.2406;
goto LABEL_6;
}
}
else
{
m_playerSpeed = a1->m_playerSpeed;
v2 = 0.8;
if ( m_playerSpeed == 0.7 )
goto LABEL_5;
}
if ( m_playerSpeed == 1.1 )
{
v5 = 0.80424;
}
else if ( m_playerSpeed == 1.3 )
{
v5 = 0.66577;
}
else if ( m_playerSpeed == 1.6 )
{
v5 = 0.54094;
}
else
{
v5 = 1.0;
}
LABEL_6:
v7 = PlayerObject::flipMod(a1);
v8 = PlayerObject::reverseMod(a1);
m_isSideways = a1->m_isSideways;
v10 = (float)(120 * v7 * v8) / (float)((float)(v2 * 0.2) * v5);
a1->m_rotationSpeed = v10;
if ( m_isSideways )
a1->m_rotationSpeed = -v10;
a1->m_isRotating = 1;
}