//
// GJBaseGameLayer::updateMaxGameplayY from 0x100138290 to 0x10013837a (234 bytes)
//
// 2 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x1000844c6
// > LevelEditorLayer::onPlaytest @ 0x1000c5b00
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:24:51 +0000
//
void __fastcall GJBaseGameLayer::updateMaxGameplayY(__int64 a1)
{
__int64 v2; // rdi
float v3; // xmm0_4
__int64 v4; // rax
unsigned int *v5; // rax
_QWORD *v6; // r15
unsigned __int64 v7; // r12
float v8; // xmm0_4
__int64 v9; // r14
v2 = *(_QWORD *)(a1 + 3272);
v3 = 2790.0;
if ( v2 )
{
v3 = 2790.0;
if ( LevelSettingsObject::shouldUseYSection(v2) )
{
v4 = *(_QWORD *)(a1 + 3280);
v3 = 1590.0;
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((_QWORD **)v5 + 2);
v7 = (unsigned __int64)&v6[*v5 - 1];
v8 = 1200.0;
do
{
v9 = *v6;
if ( !*v6 )
break;
if ( *(float *)((*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v9 + 192LL))(*v6) + 4) > v8 )
v8 = *(float *)((*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 192LL))(v9, v8) + 4);
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
v3 = (float)(v8 + 90.0) + 300.0;
}
}
}
}
*(float *)(a1 + 13640) = v3;
}