//
// PlayerObject::updateCollide from 0x100223d3c to 0x100223ebc (384 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x1001e755c
// > GJBaseGameLayer::checkCollisions @ 0x1001e76b8
// > GJBaseGameLayer::checkCollisions @ 0x1001e776c
// > GJBaseGameLayer::checkCollisions @ 0x1001e78a4
// > PlayerObject::collidedWithSlopeInternal @ 0x100221304
// > PlayerObject::collidedWithSlopeInternal @ 0x1002213dc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall PlayerObject::updateCollide(PlayerObject *a1, PlayerCollisionDirection a2, GameObject *a3)
{
float v6; // s9
__int64 v7; // 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 *)(PlayerObject *))a1->getObjectRect)(a1) + 12);
v7 = ((__int64 (__fastcall *)(PlayerObject *))a1->getObjectRect)(a1);
if ( a2 > 1 )
{
v11 = *(float *)(v7 + 8) * 0.5;
if ( a2 == 2 )
{
v15 = *(float *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1) - v11;
PlayerObject::updateCollideLeft(a1, v15, a3);
}
else if ( a2 == 3 )
{
v12 = v11 + *(float *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
PlayerObject::updateCollideRight(a1, v12, a3);
}
}
else
{
v8 = v6 * 0.5;
if ( a2 )
{
if ( a2 == 1 )
{
v9 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
v10 = 1.0;
if ( a1->m_isUpsideDown )
v10 = -1.0;
PlayerObject::updateCollideBottom(a1, *(float *)(v9 + 4) - (float)(v8 * v10), a3);
}
}
else
{
v13 = ((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
v14 = 1.0;
if ( a1->m_isUpsideDown )
v14 = -1.0;
PlayerObject::updateCollideTop(a1, *(float *)(v13 + 4) + (float)(v8 * v14), a3);
}
}
}