//
// GameObject::determineSlopeDirection from 0x140299320 to 0x14029955a (570 bytes)
//
// 12 xrefs:
// > EditorUI::addObjectsToSmartTemplate @ 0x1401b594e
// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6986
// > GameObject::getObjectDirection @ 0x140299569
// > GJBaseGameLayer::updateDebugDraw @ 0x140316e63
// > LevelEditorLayer::rotationForSlopeNearObject @ 0x1403f1112
// > LevelEditorLayer::addSpecial @ 0x1403f4ef4
// > LevelEditorLayer::onPlaytest @ 0x1403fec39
// > PlayerObject::rotateGameplayObject @ 0x1404ef984
// > PlayerObject::unrotateGameplayObject @ 0x1404efb98
// > PlayLayer::addObject @ 0x14050c6d5
// > RotateGameplayGameObject::updateStartValues @ 0x14066593e
// > ??> @ 0x14091d6f0
//
// 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:29:11 +0000
//
bool __fastcall GameObject::determineSlopeDirection(__int64 a1)
{
char v2; // si
char v3; // di
float v4; // xmm1_4
bool v5; // dl
bool v6; // cl
bool result; // al
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1272LL))(a1);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1280LL))(a1);
v4 = (float)((int)(*(float (__fastcall **)(__int64))(*(_QWORD *)a1 + 1424LL))(a1) % 360);
v5 = fabs(v4) == 180.0;
v6 = v4 == 90.0 || v4 == -270.0;
result = v4 == -90.0 || v4 == 270.0;
*(_BYTE *)(a1 + 1088) = 0;
if ( v2 )
{
if ( v3 )
{
if ( v5 )
goto LABEL_23;
if ( v4 == 0.0 )
{
LABEL_20:
*(_DWORD *)(a1 + 1092) = 3;
LABEL_50:
*(_BYTE *)(a1 + 1088) = 1;
return result;
}
}
else
{
if ( v5 )
goto LABEL_25;
if ( v4 == 0.0 )
goto LABEL_27;
}
if ( v3 && result )
goto LABEL_33;
if ( v3 && v6 )
goto LABEL_39;
if ( v3 )
return result;
if ( !v6 )
{
if ( !result )
return result;
goto LABEL_49;
}
goto LABEL_44;
}
if ( v3 )
{
if ( v4 != 0.0 )
{
if ( !v5 )
goto LABEL_28;
LABEL_27:
*(_DWORD *)(a1 + 1092) = 2;
return result;
}
LABEL_25:
*(_DWORD *)(a1 + 1092) = 1;
return result;
}
if ( v4 == 0.0 )
{
LABEL_23:
*(_DWORD *)(a1 + 1092) = 0;
goto LABEL_50;
}
if ( v5 )
goto LABEL_20;
LABEL_28:
if ( !v3 )
{
if ( !v6 )
{
if ( !result )
goto LABEL_45;
LABEL_39:
*(_DWORD *)(a1 + 1092) = 5;
return result;
}
LABEL_33:
*(_DWORD *)(a1 + 1092) = 4;
return result;
}
if ( result )
{
LABEL_44:
*(_DWORD *)(a1 + 1092) = 6;
goto LABEL_50;
}
LABEL_45:
if ( v3 && v6 )
{
LABEL_49:
*(_DWORD *)(a1 + 1092) = 7;
goto LABEL_50;
}
return result;
}