//
// PlayerObject::limitDashRotation from 0x74f3cc to 0x74f508 (316 bytes)
//
// 2 xrefs:
// > PlayerObject::startDashing @ 0x755c28
// > ??> @ 0x62530
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:52:54 +0000
//
float __fastcall PlayerObject::limitDashRotation(PlayerObject *this, float *a2)
{
float v2; // s8
float result; // s0
float v4; // s0
float *v5; // [xsp+28h] [xbp+28h]
float *v6; // [xsp+28h] [xbp+28h]
if ( *((_BYTE *)this + 2427) )
{
if ( *((_BYTE *)this + 2426) )
v2 = 90.0;
else
v2 = -90.0;
goto LABEL_4;
}
if ( *((_BYTE *)this + 2426) )
{
v2 = 180.0;
LABEL_4:
v5 = a2;
*a2 = *a2 + v2;
snapRotation360(a2);
a2 = v5;
goto LABEL_7;
}
v2 = 0.0;
LABEL_7:
result = *a2;
if ( fabsf(*a2) > 90.0 )
{
if ( result <= 0.0 )
v4 = -180.0 - result;
else
v4 = 180.0 - result;
v6 = a2;
*a2 = v4;
snapRotation360(a2);
a2 = v6;
result = *v6;
}
if ( result <= 70.0 && result >= -70.0 )
{
LABEL_17:
if ( v2 == 0.0 )
return result;
LABEL_24:
*a2 = *a2 - v2;
return snapRotation360(a2);
}
if ( result <= 0.0 )
{
if ( result >= 70.0 || result <= -180.0 )
goto LABEL_16;
}
else if ( result > 70.0 && result < 180.0 )
{
LABEL_16:
*a2 = 70.0;
goto LABEL_17;
}
*a2 = -70.0;
if ( v2 != 0.0 )
goto LABEL_24;
return result;
}