//
// GJBaseGameLayer::updateMaxGameplayY from 0x140344e20 to 0x140344ef9 (217 bytes)
//
// 5 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x1403fe9d6
// > PlayLayer::createObjectsFromSetupFinished @ 0x14050c546
// > ??> @ 0x1408b7b2c
// > ??> @ 0x1408b7b84
// > ??> @ 0x14091fe2c
//
// 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 11:30:41 +0000
//
__int64 __fastcall GJBaseGameLayer::updateMaxGameplayY(__int64 a1)
{
__int64 result; // rax
float v3; // xmm6_4
unsigned int *v4; // rbx
_QWORD *v5; // rbx
_QWORD *i; // rsi
result = *(_QWORD *)(a1 + 3528);
if ( result && (*(_BYTE *)(result + 341) || *(_BYTE *)(result + 461)) )
{
result = *(_QWORD *)(a1 + 3536);
v3 = 1200.0;
if ( result )
{
v4 = *(unsigned int **)(result + 56);
result = *v4;
if ( (_DWORD)result )
{
v5 = *((_QWORD **)v4 + 2);
for ( i = &v5[result - 1]; v5 <= i; v3 = fmaxf(*(float *)(result + 4), v3) )
{
if ( !*v5 )
break;
result = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v5 + 200LL))(*v5);
++v5;
}
}
}
*(float *)(a1 + 14248) = (float)(v3 + 90.0) + 300.0;
}
else
{
*(_DWORD *)(a1 + 14248) = 1160667136;
}
return result;
}