//
// GJBaseGameLayer::getMinPortalY from 0x100125670 to 0x10012574d (221 bytes)
//
// 3 xrefs:
// > DrawGridLayer::draw @ 0x1001026eb
// > PlayerObject::spiderTestJumpInternal @ 0x10040d840
// > PlayerObject::spiderTestJumpX @ 0x10040edab
//
// 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
//
float __fastcall GJBaseGameLayer::getMinPortalY(GJBaseGameLayer *a1)
{
float result; // xmm0_4
float y; // [rsp+0h] [rbp-Ch]
float v3; // [rsp+0h] [rbp-Ch]
if ( a1->m_gameState.m_unkPoint17.y == 0.0 || a1->m_gameState.m_unkBool1 )
return fmaxf(
(float)((float)((float)(*(float *)&a1->m_gameState.m_unkInt11 * -0.5) / a1->m_gameState.m_cameraZoom)
+ *(float *)&a1->m_gameState.m_unkInt14)
+ a1->m_gameState.m_cameraOffset.y,
90.0);
y = a1->m_gameState.m_cameraPosition2.y;
result = 90.0;
if ( (float)((float)((float)(*(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer)
+ 4)
+ -1.0)
/ a1->m_gameState.m_cameraZoom)
+ y) > 90.0 )
{
v3 = a1->m_gameState.m_cameraPosition2.y;
return (float)((float)(*(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->getPosition)(a1->m_groundLayer)
+ 4)
+ -1.0)
/ a1->m_gameState.m_cameraZoom)
+ v3;
}
return result;
}