//
// GJBaseGameLayer::flipGravity from 0x140319e20 to 0x140319f32 (274 bytes)
//
// 11 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x14031c055
// > GJBaseGameLayer::collisionCheckObjects @ 0x14031c113
// > GJBaseGameLayer::collisionCheckObjects @ 0x14031c1d9
// > GJBaseGameLayer::collisionCheckObjects @ 0x14031cd83
// > PlayerObject::ringJump @ 0x1404f7316
// > PlayerObject::ringJump @ 0x1404f73cd
// > PlayerObject::ringJump @ 0x1404f7658
// > PlayerObject::ringJump @ 0x1404f7718
// > PlayerObject::ringJump @ 0x1404f78bb
// > PlayerObject::ringJump @ 0x1404f797b
// > ??> @ 0x14091eb84
//
// 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 11:30:19 +0000
//
__int64 __fastcall GJBaseGameLayer::flipGravity(__int64 a1, __int64 a2, unsigned __int8 a3)
{
__int64 result; // rax
unsigned __int8 *v7; // r9
__int64 v8; // rcx
if ( *(_BYTE *)(a2 + 2503) != a3 )
{
result = PlayerObject::flipGravity(a2, a3);
if ( !*(_BYTE *)(a1 + 2144) )
{
if ( *(_BYTE *)(a1 + 1058) )
{
result = *(_QWORD *)(a1 + 3528);
if ( !*(_BYTE *)(result + 340) )
{
v7 = *(unsigned __int8 **)(a1 + 3520);
v8 = *(_QWORD *)(a1 + 3512);
result = v7[2497];
if ( *(_BYTE *)(v8 + 2497) == (_BYTE)result )
{
result = v7[2499];
if ( *(_BYTE *)(v8 + 2499) == (_BYTE)result )
{
result = v7[2498];
if ( *(_BYTE *)(v8 + 2498) == (_BYTE)result )
{
result = v7[2502];
if ( *(_BYTE *)(v8 + 2502) == (_BYTE)result )
{
result = v7[2501];
if ( *(_BYTE *)(v8 + 2501) == (_BYTE)result )
{
result = v7[2508];
if ( *(_BYTE *)(v8 + 2508) == (_BYTE)result )
{
if ( *(_DWORD *)(a2 + 924) == *(_DWORD *)(v8 + 924) )
v8 = *(_QWORD *)(a1 + 3520);
return PlayerObject::flipGravity(v8, a3 ^ 1u);
}
}
}
}
}
}
}
}
}
}
return result;
}