//
// MenuGameLayer::tryJump from 0x491f00 to 0x4920f0 (496 bytes)
//
// 0 xrefs:
//
// 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:49:38 +0000
//
int __fastcall MenuGameLayer::tryJump(PlayerObject **this, float a2)
{
float v3; // s16
_BYTE *v4; // r0
float *v5; // r0
float v6; // s16
cocos2d::CCDirector *v7; // r0
float *v8; // r0
float v9; // s17
cocos2d::CCDirector *v10; // r0
int v11; // r0
int v12; // r2
PlayerObject *v13; // r0
float *v14; // r0
float v15; // s16
cocos2d::CCDirector *v16; // r0
_BYTE *v17; // r0
_BYTE v19[4]; // [sp+4h] [bp-10h] BYREF
float v20; // [sp+8h] [bp-Ch]
v3 = 0.2;
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v19);
v4 = *(this + 85);
if ( *((_BYTE *)this + 324) )
v3 = 0.4;
if ( v4[1953] )
{
v5 = (float *)(*(int (__fastcall **)(_BYTE *))(*(_DWORD *)v4 + 96))(v4);
v6 = v5[1];
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v5);
if ( v6 < (float)((float)((float)(COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v7)) + 90.0) + 15.0) + 100.0) )
{
v3 = 0.3;
goto LABEL_16;
}
goto LABEL_5;
}
if ( v4[1955] || v4[1958] )
{
v3 = -1.0;
goto LABEL_16;
}
if ( v4[1954] )
{
v14 = (float *)(*(int (__fastcall **)(_BYTE *))(*(_DWORD *)v4 + 96))(v4);
v15 = v14[1];
v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v14);
if ( v15 < (float)((float)((float)(COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v16)) + 90.0) + 15.0) + 200.0) )
{
v3 = 0.4;
goto LABEL_16;
}
goto LABEL_5;
}
if ( !v4[1956] )
{
if ( !v4[1964] )
goto LABEL_16;
if ( !v4[1959] && *(float *)((*(int (__fastcall **)(_BYTE *))(*(_DWORD *)v4 + 96))(v4) + 4) < 150.0
|| (v17 = *(this + 85), v17[1959])
&& *(float *)((*(int (__fastcall **)(_BYTE *))(*(_DWORD *)v17 + 96))(v17) + 4) > 210.0 )
{
v3 = 0.9;
goto LABEL_16;
}
LABEL_5:
v3 = 0.0;
goto LABEL_16;
}
v8 = (float *)(*(int (__fastcall **)(_BYTE *))(*(_DWORD *)v4 + 96))(v4);
v9 = v8[1];
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v8);
if ( v9 < (float)((float)(COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v10)) + 90.0) + 75.0) )
{
v3 = 1.0;
}
else
{
v11 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 85) + 96))(*(this + 85));
v3 = 0.5;
if ( *(float *)(v11 + 4) > (float)(v20 - 75.0) )
v3 = 0.0;
}
LABEL_16:
if ( vcvts_n_f32_s32(rand(), 0x1Fu) <= v3
&& ((v13 = *(this + 85), *((_BYTE *)v13 + 2036)) || PlayerObject::isFlying(v13)) )
{
return PlayerObject::pushButton(*(this + 85), 1, v12);
}
else
{
return PlayerObject::releaseButton((int)*(this + 85), 1, v12);
}
}