//
// PlayerObject::limitDashRotation from 0x33d868 to 0x33d97c (276 bytes)
//
// 1 xrefs:
// > PlayerObject::startDashing @ 0x34286c
//
// 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::limitDashRotation(PlayerObject *a1, float *a2)
{
float v3; // s16
float v4; // s15
float v5; // s14
float v6; // s15
v3 = 0.0;
if ( a1->m_isSideways )
v3 = -90.0;
if ( a1->m_isGoingLeft )
v3 = v3 + 180.0;
if ( v3 != 0.0 )
{
*a2 = *a2 + v3;
snapRotation360(a2);
}
v4 = *a2;
if ( fabsf(*a2) > 90.0 )
{
if ( v4 <= 0.0 )
v5 = -180.0;
else
v5 = 180.0;
*a2 = v5 - v4;
snapRotation360(a2);
}
v6 = *a2;
if ( *a2 <= 70.0 )
{
if ( v6 >= -70.0 )
goto LABEL_22;
if ( v6 > 0.0 )
{
if ( v6 <= 70.0 )
goto LABEL_21;
goto LABEL_16;
}
LABEL_19:
if ( v6 >= 70.0 || v6 <= -180.0 )
goto LABEL_17;
goto LABEL_21;
}
if ( v6 <= 0.0 )
goto LABEL_19;
LABEL_16:
if ( v6 < 180.0 )
{
LABEL_17:
*a2 = 70.0;
goto LABEL_22;
}
LABEL_21:
*a2 = -70.0;
LABEL_22:
if ( v3 != 0.0 )
{
*a2 = *a2 - v3;
snapRotation360(a2);
}
}