//
// PlayerObject::updateCollideTop from 0x10040d230 to 0x10040d2b3 (131 bytes)
//
// 4 xrefs:
// > PlayerObject::collidedWithObjectInternal @ 0x100409f79
// > PlayerObject::collidedWithObjectInternal @ 0x10040a1c3
// > PlayerObject::collidedWithObjectInternal @ 0x10040a475
// > PlayerObject::collidedWithObjectInternal @ 0x10040a628
//
// 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::updateCollideTop(PlayerObject *a1, float a2, GameObject *a3)
{
int m_uniqueID; // ecx
double m_collidedTopMinY; // xmm1_8
double v5; // xmm0_8
if ( a3 )
m_uniqueID = a3->m_uniqueID;
else
m_uniqueID = 0;
m_collidedTopMinY = a1->m_collidedTopMinY;
v5 = a2;
if ( m_collidedTopMinY != 0.0 )
{
if ( !a1->m_isUpsideDown )
{
a1->m_collidedTopMinY = fmin(v5, m_collidedTopMinY);
if ( !m_uniqueID )
return;
goto LABEL_8;
}
v5 = fmax(v5, m_collidedTopMinY);
}
a1->m_collidedTopMinY = v5;
if ( !m_uniqueID )
return;
LABEL_8:
if ( a1->m_lastCollisionTop != m_uniqueID )
{
a1->m_lastCollisionTop = m_uniqueID;
if ( a1->m_collisionLogTop )
cocos2d::CCDictionary::setObject(a1->m_collisionLogTop, a1->m_maybeLastGroundObject, m_uniqueID);
}
}