//
// PlayerObject::checkSnapJumpToObject from 0x435f1c to 0x436204 (744 bytes)
//
// 2 xrefs:
// > PlayerObject::collidedWithObjectInternal @ 0x43ce94
// > PlayerObject::collidedWithObjectInternal @ 0x43cfee
//
// 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:48:19 +0000
//
int __fastcall PlayerObject::checkSnapJumpToObject(int this, GameObject *a2)
{
float *v2; // r4
_DWORD *v4; // r0
double *v5; // r7
float v6; // s14
float v7; // s18
float v8; // s17
float v9; // s16
float v10; // s15
int v11; // r3
float v12; // s16
bool v13; // zf
double v14; // d9
double v15; // d7
double v16; // d6
void (__fastcall *v17)(float *, _BYTE *); // r9
int v18; // r0
float v19; // s15
float v20; // [sp+4h] [bp-20h] BYREF
float v21; // [sp+8h] [bp-1Ch]
float v22; // [sp+Ch] [bp-18h] BYREF
float v23; // [sp+10h] [bp-14h]
_BYTE v24[8]; // [sp+14h] [bp-10h] BYREF
v2 = (float *)this;
if ( a2 )
{
v4 = *(_DWORD **)(this + 1720);
v5 = (double *)(v2 + 422);
if ( !v4 || v4[195] == *((_DWORD *)a2 + 195) || (*(int (__fastcall **)(_DWORD *))(*v4 + 900))(v4) )
{
LABEL_12:
v11 = *(_DWORD *)v2;
*((_DWORD *)v2 + 430) = a2;
v12 = *(float *)(*(int (__fastcall **)(float *))(v11 + 96))(v2);
this = (*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 96))(a2);
*v5 = (float)(v12 - *(float *)this);
return this;
}
(*(void (__fastcall **)(float *))(**((_DWORD **)v2 + 430) + 680))(&v20);
(*(void (__fastcall **)(float *, GameObject *))(*(_DWORD *)a2 + 680))(&v22, a2);
v6 = v2[503];
if ( v6 == 0.9 )
{
v7 = 90.0;
v8 = 150.0;
v9 = 1.0;
if ( v2[502] != 1.0 )
{
v10 = 90.0;
goto LABEL_8;
}
goto LABEL_23;
}
if ( v6 == 0.7 )
{
v9 = 1.0;
v7 = 60.0;
v8 = 120.0;
v10 = 90.0;
goto LABEL_8;
}
if ( v6 == 1.1 )
{
v9 = 2.0;
v7 = 120.0;
v8 = 195.0;
v13 = v2[502] == 1.0;
v10 = 150.0;
}
else
{
if ( v6 != 1.3 )
{
v9 = 1.0;
v7 = 90.0;
v8 = 150.0;
LABEL_23:
v10 = 120.0;
LABEL_8:
if ( fabsf(v22 - (float)(v10 + v20)) <= v9
&& fabsf(v23 - (float)(v21 + (float)((float)PlayerObject::flipMod((PlayerObject *)v2) * 30.0))) <= v9
|| fabsf(v22 - (float)(v8 + v20)) <= v9
&& fabsf(v23 - (float)(v21 + (float)((float)PlayerObject::flipMod((PlayerObject *)v2) * -30.0))) <= v9
|| fabsf(v22 - (float)(v7 + v20)) <= v9
&& fabsf(v23 - (float)(v21 + (float)((float)PlayerObject::flipMod((PlayerObject *)v2) * 60.0))) <= v9 )
{
v14 = *(float *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)a2 + 96))(a2) + *v5;
v15 = v9;
v16 = *(float *)(*(int (__fastcall **)(float *))(*(_DWORD *)v2 + 96))(v2);
if ( fabs(v14 - v16) > v9 )
{
if ( v14 <= v16 )
v14 = v16 - v15;
else
v14 = v16 + v15;
}
v17 = *(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v2 + 92);
v18 = (*(int (__fastcall **)(float *))(*(_DWORD *)v2 + 96))(v2);
v19 = v14;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, v19, *(float *)(v18 + 4));
v17(v2, v24);
}
goto LABEL_12;
}
v9 = 2.0;
v7 = 135.0;
v8 = 225.0;
v10 = 180.0;
v13 = v2[502] == 1.0;
}
if ( !v13 )
v10 = 90.0;
goto LABEL_8;
}
return this;
}