//
// sub_1002C0960 from 0x1002c0960 to 0x1002c0ae0 (384 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x100282ef0
// > GJBaseGameLayer::checkCollisions @ 0x10028304c
// > GJBaseGameLayer::checkCollisions @ 0x100283100
// > GJBaseGameLayer::checkCollisions @ 0x100283238
// > PlayerObject::collidedWithSlopeInternal @ 0x1002bdf08
// > PlayerObject::collidedWithSlopeInternal @ 0x1002bdfe0
//
// This function is hookable on this platform (idp: arm, 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:02:30 +0000
//
__int64 __fastcall sub_1002C0960(_BYTE *a1, int a2, __int64 a3)
{
float v6; // s9
__int64 result; // x0
float v8; // s8
__int64 v9; // x0
float v10; // s1
float v11; // s8
float v12; // s0
__int64 v13; // x0
float v14; // s1
float v15; // s0
v6 = *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1328LL))(a1) + 12);
result = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1328LL))(a1);
if ( a2 > 1 )
{
v11 = *(float *)(result + 8) * 0.5;
if ( a2 == 2 )
{
v15 = *(float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 192LL))(a1) - v11;
return sub_1002C15D0(a1, a3, v15);
}
else if ( a2 == 3 )
{
v12 = v11 + *(float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 192LL))(a1);
return sub_1002C1554(a1, a3, v12);
}
}
else
{
v8 = v6 * 0.5;
if ( a2 )
{
if ( a2 == 1 )
{
v9 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 192LL))(a1);
v10 = 1.0;
if ( a1[2423] )
v10 = -1.0;
return sub_1002C1490(a1, a3, *(float *)(v9 + 4) - (float)(v8 * v10));
}
}
else
{
v13 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 192LL))(a1);
v14 = 1.0;
if ( a1[2423] )
v14 = -1.0;
return sub_1002C141C(a1, a3, *(float *)(v13 + 4) + (float)(v8 * v14));
}
}
return result;
}