//
// GJBaseGameLayer::updateMaxGameplayY from 0x100202018 to 0x1002020ec (212 bytes)
//
// 2 xrefs:
// > PlayLayer::createObjectsFromSetupFinished @ 0x10011c230
// > LevelEditorLayer::onPlaytest @ 0x100362b40
//
// 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
//
void __fastcall GJBaseGameLayer::updateMaxGameplayY(GJBaseGameLayer *a1)
{
LevelSettingsObject *m_levelSettings; // x0
float v3; // s8
cocos2d::CCArray *m_objects; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCObject **arr; // x21
unsigned __int64 v8; // x22
float v9; // s8
cocos2d::CCObject *v10; // x20
m_levelSettings = a1->m_levelSettings;
v3 = 2790.0;
if ( m_levelSettings )
{
if ( LevelSettingsObject::shouldUseYSection(m_levelSettings) )
{
m_objects = a1->m_objects;
v3 = 1590.0;
if ( m_objects )
{
data = m_objects->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v8 = (unsigned __int64)&arr[num - 1];
v9 = 1200.0;
do
{
v10 = *arr;
if ( !*arr )
break;
if ( *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v10->__vftable[2].acceptVisitor)(*arr) + 4) > v9 )
v9 = *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v10->__vftable[2].acceptVisitor)(v10) + 4);
++arr;
}
while ( (unsigned __int64)arr <= v8 );
v3 = (float)(v9 + 90.0) + 300.0;
}
}
}
}
a1->m_maxGameplayY = v3;
}