//
// PlayerObject::preCollision from 0x10021e958 to 0x10021ea64 (268 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x1001e7338
//
// 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::preCollision(PlayerObject *a1)
{
_BOOL4 m_isOnGround2; // w8
GameObject *m_currentPotentialSlope; // x20
GameObject *m_currentSlope; // x20
int m_uniqueID; // [xsp+0h] [xbp-20h] BYREF
int *p_m_uniqueID; // [xsp+8h] [xbp-18h] BYREF
a1->m_ringJumpRelated = 0;
*(_OWORD *)&a1->m_collidedTopMinY = 0u;
*(_OWORD *)&a1->m_collidedLeftMaxX = 0u;
a1->m_wasOnSlope = a1->m_isOnSlope;
a1->m_isOnSlope = 0;
m_isOnGround2 = a1->m_isOnGround2;
a1->m_isOnGround4 = m_isOnGround2;
if ( m_isOnGround2 && !a1->m_platformerMovingLeft && !a1->m_platformerMovingRight && a1->m_maybeSlidingTime >= 1 )
{
a1->m_maybeSlidingTime = 0;
a1->m_maybeSlidingStartTime = a1->m_totalTime;
}
if ( a1->m_unk669 )
a1->m_currentPotentialSlope = nullptr;
else
a1->m_unk669 = 1;
sub_100018054(&a1->m_potentialSlopeMap.__table_.__bucket_list_.__ptr_.__value_);
m_currentPotentialSlope = a1->m_currentPotentialSlope;
if ( m_currentPotentialSlope )
{
m_uniqueID = m_currentPotentialSlope->m_uniqueID;
p_m_uniqueID = &m_uniqueID;
sub_100019F24((unsigned __int64)&a1->m_potentialSlopeMap, &m_uniqueID, (__int64)&unk_10063A946, &p_m_uniqueID)[3] = m_currentPotentialSlope;
}
m_currentSlope = a1->m_currentSlope;
if ( m_currentSlope )
{
m_uniqueID = m_currentSlope->m_uniqueID;
p_m_uniqueID = &m_uniqueID;
sub_100019F24((unsigned __int64)&a1->m_potentialSlopeMap, &m_uniqueID, (__int64)&unk_10063A946, &p_m_uniqueID)[3] = m_currentSlope;
}
}