//
// GJBaseGameLayer::updateMaxGameplayY from 0x5963d8 to 0x596466 (142 bytes)
//
// 2 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x404a12
// > LevelEditorLayer::onPlaytest @ 0x468244
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:09 +0000
//
float *__fastcall GJBaseGameLayer::updateMaxGameplayY(GJBaseGameLayer *this)
{
float *result; // r0
int v3; // r3
_DWORD *v4; // r2
int *v5; // r5
float v6; // s16
int *v7; // r6
int v8; // r7
int v9; // t1
result = *((float **)this + 521);
if ( result && (result = (float *)LevelSettingsObject::shouldUseYSection((LevelSettingsObject *)result)) != nullptr )
{
v3 = *((_DWORD *)this + 522);
if ( v3 && (v4 = *(_DWORD **)(v3 + 52), *v4) )
{
v5 = (int *)v4[3];
v6 = 1200.0;
v7 = &v5[*v4 - 1];
while ( v5 <= v7 )
{
v9 = *v5++;
v8 = v9;
if ( !v9 )
break;
result = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v8 + 96))(v8);
if ( result[1] > v6 )
{
result = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v8 + 96))(v8);
v6 = result[1];
}
}
}
else
{
v6 = 1200.0;
}
*((float *)this + 2858) = (float)(v6 + 90.0) + 300.0;
}
else
{
*((_DWORD *)this + 2858) = 1160667136;
}
return result;
}