//
// PlayerObject::updateRotation from 0x437608 to 0x437748 (320 bytes)
//
// 3 xrefs:
// > MenuGameLayer::update @ 0x492b38
// > GJBaseGameLayer::update @ 0x5be022
// > GJBaseGameLayer::update @ 0x5be034
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:48:19 +0000
//
float __fastcall PlayerObject::updateRotation(float this, float a2)
{
float v2; // r4
float v4; // s17
int (__fastcall *v5)(_DWORD, _DWORD); // r6
float v6; // r0
int v7; // r0
float v8; // r1
float v9; // r2
float *v10; // r0
v2 = this;
if ( *(_BYTE *)(LODWORD(this) + 2066) || *(_BYTE *)(LODWORD(this) + 1996) )
return this;
if ( !*(_BYTE *)(LODWORD(this) + 1955) )
{
if ( *(_BYTE *)(LODWORD(this) + 1944) )
{
this = COERCE_FLOAT(PlayerObject::updateSlopeRotation((PlayerObject *)LODWORD(this), a2));
goto LABEL_16;
}
if ( PlayerObject::isFlying((PlayerObject *)LODWORD(this)) )
{
this = PlayerObject::updateShipRotation(v2, a2);
goto LABEL_16;
}
this = COERCE_FLOAT(PlayerObject::isFlying((PlayerObject *)LODWORD(v2)));
if ( this == 0.0 && !*(_BYTE *)(LODWORD(v2) + 1955) )
{
if ( *(_BYTE *)(LODWORD(v2) + 2036) )
{
LODWORD(this) = PlayerObject::playerIsFalling((PlayerObject *)LODWORD(v2), -0.25);
if ( this == 0.0 && !*(_BYTE *)(LODWORD(v2) + 1944) && !*(_BYTE *)(LODWORD(v2) + 1945) )
{
if ( *(_BYTE *)(LODWORD(v2) + 2320) && *(_BYTE *)(LODWORD(v2) + 1480) )
goto LABEL_16;
PlayerObject::stopRotation((PlayerObject *)LODWORD(v2), 0, 2);
v7 = PlayerObject::convertToClosestRotation((PlayerObject *)LODWORD(v2), 0.0);
v8 = a2;
v9 = *(float *)&v7;
v10 = (float *)LODWORD(v2);
LABEL_28:
this = COERCE_FLOAT(PlayerObject::updateRotation(v10, v8, v9));
goto LABEL_16;
}
}
}
if ( (*(_BYTE *)(LODWORD(v2) + 1957) || *(_BYTE *)(LODWORD(v2) + 1958))
&& !*(_BYTE *)(LODWORD(v2) + 1944)
&& !*(_BYTE *)(LODWORD(v2) + 1945) )
{
v10 = (float *)LODWORD(v2);
v9 = 0.0;
v8 = a2 * 0.5;
goto LABEL_28;
}
}
LABEL_16:
if ( *(float *)(LODWORD(v2) + 1472) != 0.0 )
{
if ( *(_BYTE *)(LODWORD(v2) + 1392) && *(_BYTE *)(LODWORD(v2) + 1955) )
v4 = *(float *)(LODWORD(v2) + 1476);
else
v4 = 1.0;
v5 = *(int (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)LODWORD(v2) + 180);
v6 = COERCE_FLOAT((*(int (__fastcall **)(float))(*(_DWORD *)LODWORD(v2) + 184))(COERCE_FLOAT(LODWORD(v2))));
return COERCE_FLOAT(v5(LODWORD(v2), v6 + (float)((float)((float)(a2 / 60.0) * *(float *)(LODWORD(v2) + 1472)) * v4)));
}
return this;
}