//
// PlayerObject::updateRotation_1 from 0x1003f9cd0 to 0x1003f9e8f (447 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::update @ 0x100130515
// > GJBaseGameLayer::update @ 0x10013052f
// > MenuGameLayer::update @ 0x1004f9c53
//
// This function is hookable on this platform (idp: pc, 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:29:59 +0000
//
void __fastcall PlayerObject::updateRotation_1(__int64 a1, __m128 a2)
{
__int64 v2; // rbx
float v3; // xmm1_4
float v4; // xmm0_4
__int32 v5; // xmm2_4
double v6; // xmm0_8
bool v7; // cc
float v8; // xmm1_4
__m128 v9; // xmm0
double v10; // xmm1_8
float v11; // [rsp+4h] [rbp-Ch]
if ( *(_BYTE *)(a1 + 2530) || *(_BYTE *)(a1 + 2460) )
return;
v11 = a2.f32[0];
if ( !*(_BYTE *)(a1 + 2419) )
{
if ( *(_BYTE *)(a1 + 2408) == 1 )
{
v2 = a1;
PlayerObject::updateSlopeRotation((int *)a1, a2);
LABEL_11:
a1 = v2;
goto LABEL_12;
}
if ( *(_BYTE *)(a1 + 2417) || *(_BYTE *)(a1 + 2418) || *(_BYTE *)(a1 + 2420) || *(_BYTE *)(a1 + 2428) == 1 )
{
v2 = a1;
PlayerObject::updateShipRotation(a1, a2.f32[0]);
goto LABEL_11;
}
if ( *(_BYTE *)(a1 + 2500) == 1
&& ((v5 = a2.i32[0], v6 = *(double *)(a1 + 2392), *(_BYTE *)(a1 + 2423) != 1)
? (v7 = v6 >= -0.25)
: (v7 = v6 <= 0.25),
(a2.i32[0] = v5, v7) && !*(_BYTE *)(a1 + 2409)) )
{
if ( *(_BYTE *)(a1 + 2832) != 1 || !*(_BYTE *)(a1 + 1784) )
{
*(_WORD *)(a1 + 1784) = 0;
*(_BYTE *)(a1 + 1640) = 0;
*(_DWORD *)(a1 + 1776) = 0;
v2 = a1;
*(_QWORD *)&v10 = PlayerObject::convertToClosestRotation((_BYTE *)a1, (__m128)0LL).u64[0];
v9 = (__m128)LODWORD(v11);
goto LABEL_31;
}
}
else if ( (*(_BYTE *)(a1 + 2421) || *(_BYTE *)(a1 + 2422) == 1) && !*(_BYTE *)(a1 + 2409) )
{
v8 = a2.f32[0];
v9 = (__m128)0x3F000000u;
v9.f32[0] = 0.5 * v8;
v10 = 0.0;
v2 = a1;
LABEL_31:
PlayerObject::updateRotation((int *)a1, v9, v10);
goto LABEL_11;
}
}
LABEL_12:
if ( *(float *)(a1 + 1776) != 0.0 )
{
v3 = 1.0;
if ( *(_BYTE *)(a1 + 1640) == 1 && *(_BYTE *)(a1 + 2419) == 1 )
v3 = *(float *)(a1 + 1780);
v4 = (*(float (**)(void))(*(_QWORD *)a1 + 368LL))();
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)a1 + 360LL))(
a1,
v4 + (float)((float)((float)(v11 / 60.0) * *(float *)(a1 + 1776)) * v3));
}
}