//
// PlayerObject::runBallRotation2 from 0x10021e7f4 to 0x10021e8e4 (240 bytes)
//
// 3 xrefs:
// > PlayerObject::flipGravity @ 0x10021e2e8
// > PlayerObject::ringJump @ 0x10022875c
// > PlayerObject::ringJump @ 0x100228ad0
//
// 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::runBallRotation2(PlayerObject *a1)
{
float v1; // s0
float m_playerSpeed; // s1
double v3; // d1
int v4; // w8
float v5; // s0
if ( !a1->m_isDashing )
{
v1 = 0.8;
if ( a1->m_vehicleSize == 1.0 )
v1 = 1.0;
m_playerSpeed = a1->m_playerSpeed;
if ( m_playerSpeed == 0.7 )
{
v3 = 1.24056375;
}
else if ( m_playerSpeed == 1.1 )
{
v3 = 0.804243445;
}
else if ( m_playerSpeed == 1.3 )
{
v3 = 0.665769279;
}
else if ( m_playerSpeed == 1.6 )
{
v3 = 0.540937483;
}
else
{
v3 = 1.0;
}
if ( a1->m_isUpsideDown )
v4 = 340;
else
v4 = -340;
if ( a1->m_isGoingLeft )
v4 = -v4;
v5 = (float)(a1->m_gravityMod * (float)v4) / (v1 * 0.8 * v3);
a1->m_rotationSpeed = v5;
a1->m_isBallRotating2 = 1;
}
}