//
// PlayerObject::updateRotation from 0x10021d498 to 0x10021d5d8 (320 bytes)
//
// 3 xrefs:
// > PlayerObject::updateMove @ 0x10021c2dc
// > PlayerObject::updateSlopeRotation @ 0x100223f3c
// > PlayerObject::updateRotation_1 @ 0x100224454
//
// 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::updateRotation(PlayerObject *a1, float a2, float a3)
{
float v6; // s10
__n128 v7; // q0
__n128 v8; // q2
float v9; // s1
float v10; // s1
__n128 v11; // q0
if ( !a1->m_isDashing )
{
v6 = a3 * 0.017453;
v7.n128_f32[0] = ((float (__fastcall *)(PlayerObject *))a1->getRotation)(a1) * 0.017453;
v9 = a1->m_playerSpeed * 0.175;
if ( a1->m_isShip )
{
v9 = v9 * 0.5;
}
else if ( !a1->m_isBird
&& !a1->m_isDart
&& !a1->m_isSwing
&& !a1->m_isBall
&& a1->m_isOnGround2
&& !a1->m_isOnSlope
&& !a1->m_wasOnSlope )
{
v9 = v9 * 3.0;
}
v10 = v9 * a2;
if ( v10 >= a2 )
v8.n128_f32[0] = a2;
else
v8.n128_f32[0] = v10;
v11.n128_f32[0] = sub_1003B30B4(v7, v6, v8) * 57.296;
if ( a1->m_isPlatformer
&& (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing)
&& a1->m_isOnSlope
&& a1->m_reverseRelated > 0 )
{
v11.n128_f32[0] = a3;
}
((void (__fastcall *)(PlayerObject *, __n128))a1->setRotation)(a1, v11);
}
}