//
// PlayerObject::switchedDirTo from 0x446a58 to 0x446b48 (240 bytes)
//
// 2 xrefs:
// > PlayerObject::pushButton @ 0x44a29e
// > PlayerObject::enablePlayerControls @ 0x44a338
//
// 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:30 +0000
//
int __fastcall PlayerObject::switchedDirTo(int a1, int a2, int a3)
{
int v5; // r6
int v6; // r0
double *v7; // r1
int v9[3]; // [sp+0h] [bp-Ch] BYREF
v9[0] = a1;
v9[1] = a2;
v9[2] = a3;
if ( !*(_BYTE *)(a1 + 2396) )
{
v5 = a1 + 2384;
v9[0] = 3;
*(_BYTE *)std::map::operator[](a1 + 2384, v9) = a2 == 3;
v9[0] = 2;
*(_BYTE *)std::map::operator[](v5, v9) = a2 == 2;
}
if ( !*(_BYTE *)(a1 + 2067) )
{
v6 = *(unsigned __int8 *)(a1 + 2233);
v7 = (double *)(a1 + 2200);
if ( a2 == 3 )
{
*(_BYTE *)(a1 + 2208) = 1;
*(_BYTE *)(a1 + 2210) = 0;
if ( v6 )
{
if ( *(_BYTE *)(a1 + 2299) )
{
*(_BYTE *)(a1 + 2233) = 0;
*(_QWORD *)(a1 + 2240) = 0;
}
}
if ( *v7 >= 0.0 )
return 1;
}
else
{
*(_BYTE *)(a1 + 2209) = 1;
*(_BYTE *)(a1 + 2210) = 1;
if ( v6 && !*(_BYTE *)(a1 + 2299) )
{
*(_BYTE *)(a1 + 2233) = 0;
*(_QWORD *)(a1 + 2240) = 0;
}
if ( *v7 <= 0.0 )
return 1;
}
*(_BYTE *)(a1 + 2296) = 0;
return 1;
}
return 0;
}