//
// PlayerObject::runBallRotation from 0x1004042d0 to 0x1004043e9 (281 bytes)
//
// 0 xrefs:
//
// 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; // xmm1_4
float v3; // xmm1_4
__m128 v4; // rt1
__int64 v5; // rax
int v6; // edx
int v7; // ecx
float v8; // xmm0_4
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.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;
}
else
{
v3 = 1.0;
}
v4.i32[0] = 1065353216;
v5 = _mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss((__m128)LODWORD(a1->m_vehicleSize), v4)) & 1;
v6 = 120;
if ( a1->m_isUpsideDown )
v6 = -120;
v7 = -v6;
if ( !a1->m_isGoingLeft )
v7 = v6;
v8 = (float)v7 / (float)(v3 * flt_10081B660[v5]);
a1->m_rotationSpeed = v8;
if ( a1->m_isSideways )
a1->m_rotationSpeed = -v8;
a1->m_isRotating = 1;
}
}