//
// GJBaseGameLayer::getMaxPortalY from 0x100125750 to 0x1001257f6 (166 bytes)
//
// 3 xrefs:
// > DrawGridLayer::draw @ 0x1001026fc
// > PlayerObject::spiderTestJumpInternal @ 0x10040d851
// > PlayerObject::spiderTestJumpX @ 0x10040edb8
//
// 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::getMaxPortalY(GJBaseGameLayer *a1)
{
float y; // [rsp-14h] [rbp-14h]
if ( a1->m_gameState.m_unkPoint17.y == 0.0 || a1->m_gameState.m_unkBool1 )
return (float)(*(float *)&a1->m_gameState.m_unkInt11 / a1->m_gameState.m_cameraZoom)
+ fmaxf(
(float)((float)((float)(-0.5 * *(float *)&a1->m_gameState.m_unkInt11) / 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;
return (float)((float)(*(float *)(((__int64 (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->getPosition)(a1->m_groundLayer2)
+ 4)
+ 1.0)
/ a1->m_gameState.m_cameraZoom)
+ y;
}