//
// PlayerObject::collidedWithObjectInternal from 0x43c190 to 0x43d5ca (5178 bytes)
//
// 4 xrefs:
// > PlayerObject::preSlopeCollision @ 0x440ee2
// > PlayerObject::preSlopeCollision @ 0x441072
// > PlayerObject::handleRotatedCollisionInternal @ 0x442796
// > PlayerObject::collidedWithObject @ 0x4428c2
//
// 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:24 +0000
//
int __fastcall PlayerObject::collidedWithObjectInternal(int a1, float a2, GameObject *a3, cocos2d::CCRect *a4, char a5)
{
int v8; // r3
int v9; // r3
unsigned __int8 *v10; // r5
const cocos2d::CCRect *v11; // r0
const cocos2d::CCRect *v12; // r1
double v13; // d13
double v14; // d10
double v15; // d8
const cocos2d::CCPoint *LastPosition; // r0
int (__fastcall *v17)(int); // r3
float v18; // s16
float v19; // s17
float v20; // s18
float v21; // s15
cocos2d::CCRect *v22; // r3
bool v23; // fzf
bool v24; // fnf
float v25; // s16
double v26; // d9
int v27; // r11
int v28; // r3
float v29; // s15
int (__fastcall *v30)(int); // r3
float *v31; // r0
float *v32; // r3
float v33; // s15
int v34; // r0
float v35; // s30
int v36; // r0
float v37; // s18
double v38; // d15
float v39; // s22
double v40; // d11
_BOOL4 v41; // r3
float v42; // s28
float v43; // r0
double v44; // d9
float v45; // s29
double v46; // d12
int v47; // r3
_BOOL4 v48; // r9
_DWORD *v49; // r10
int v50; // r7
GameObject *v51; // r8
cocos2d::CCRect *v52; // r0
float v53; // s14
cocos2d::CCRect *v54; // r0
float v55; // s14
int v56; // r0
int v57; // r2
int v58; // r3
_BOOL4 v59; // r10
int v60; // r9
int v61; // r8
double v62; // d10
double v63; // d15
GJBaseGameLayer *v64; // r9
const cocos2d::CCPoint *v65; // r0
int v66; // r0
float v67; // s22
float v68; // s20
int v69; // r0
float v70; // s29
float v71; // s28
const cocos2d::CCPoint *v72; // r0
int (__fastcall *v73)(int); // r3
float v74; // s23
float v75; // s16
float v76; // s21
float v77; // s15
_BOOL4 v78; // r11
_BOOL4 v79; // r10
float v80; // s16
float v81; // s16
double v82; // d10
double v83; // d13
int v84; // r0
float v85; // s21
float v86; // s20
_BOOL4 v87; // r7
int v88; // r6
float v89; // r0
float v90; // r6
int v92; // r3
int v93; // r2
double v94; // d10
GJBaseGameLayer *v95; // r0
void (__fastcall *v96)(int, float *); // r7
float *v97; // r0
float v98; // s15
int v99; // r2
double v100; // r0
double v101; // r0
double v102; // r2
void (__fastcall *v103)(int, float *); // r7
float *v104; // r0
float v105; // s15
char v106; // r2
double v107; // r0
double v108; // r0
double v109; // r2
GJBaseGameLayer *v110; // r7
void (__fastcall *v111)(int, float *); // r7
float *v112; // r0
float v113; // s15
double v114; // r0
int v115; // r2
cocos2d::CCDictionary *v116; // r0
float v117; // r1
cocos2d::CCDictionary *v118; // r0
float v119; // r1
double v120; // r0
void (__fastcall *v121)(int, float *); // r7
float *v122; // r0
float v123; // s15
double v124; // r0
int v125; // r2
float v126; // r1
cocos2d::CCDictionary *v127; // r0
double *v128; // r3
int v129; // r2
void (__fastcall *v130)(int, float *); // r6
double v131; // d7
float v132; // s16
int v133; // r0
int v134; // r3
int v135; // r3
void (__fastcall *v136)(int, float *); // r6
double v137; // d7
float v138; // s16
int v139; // r0
int v140; // r3
int v141; // r3
void (__fastcall *v142)(int, float *); // r8
float v143; // r1
float v144; // s15
float *v145; // r3
float v146; // s16
GJBaseGameLayer *v147; // r0
int v148; // r5
int v149; // r0
float *v150; // r0
float v151; // s15
int v152; // r2
double v153; // r0
double v154; // r0
double v155; // r2
float v156; // s15
float *v157; // r0
float v158; // s15
char isFlying; // r2
double v160; // r0
double v161; // r0
double v162; // r2
cocos2d::CCDictionary *v163; // r0
float v164; // r1
cocos2d::CCRect *v165; // [sp+Ch] [bp-C0h]
int v166; // [sp+10h] [bp-BCh]
int v167; // [sp+14h] [bp-B8h]
_BOOL4 v168; // [sp+18h] [bp-B4h]
int v169; // [sp+1Ch] [bp-B0h]
int v170; // [sp+1Ch] [bp-B0h]
void (__fastcall *v171)(int, float *); // [sp+1Ch] [bp-B0h]
float v172; // [sp+1Ch] [bp-B0h]
int v173; // [sp+20h] [bp-ACh]
_BOOL4 v174; // [sp+24h] [bp-A8h]
int v175; // [sp+24h] [bp-A8h]
int v176; // [sp+28h] [bp-A4h]
int v177; // [sp+2Ch] [bp-A0h]
double v178; // [sp+30h] [bp-9Ch]
double v179; // [sp+38h] [bp-94h]
int v180; // [sp+38h] [bp-94h]
double v181; // [sp+40h] [bp-8Ch]
void (__fastcall *v182)(int, float *); // [sp+40h] [bp-8Ch]
float v183; // [sp+48h] [bp-84h]
float v185; // [sp+50h] [bp-7Ch]
float v186; // [sp+54h] [bp-78h]
float v187; // [sp+58h] [bp-74h]
float v188; // [sp+5Ch] [bp-70h]
int v189; // [sp+60h] [bp-6Ch]
float v190; // [sp+64h] [bp-68h]
float v191; // [sp+68h] [bp-64h]
_BYTE v192[8]; // [sp+74h] [bp-58h] BYREF
float v193; // [sp+7Ch] [bp-50h] BYREF
float v194; // [sp+80h] [bp-4Ch]
float v195; // [sp+84h] [bp-48h] BYREF
float v196; // [sp+88h] [bp-44h]
float v197; // [sp+8Ch] [bp-40h]
float v198; // [sp+90h] [bp-3Ch]
float v199[4]; // [sp+94h] [bp-38h] BYREF
float v200; // [sp+A4h] [bp-28h] BYREF
float v201; // [sp+A8h] [bp-24h]
float v202; // [sp+B4h] [bp-18h] BYREF
float v203; // [sp+B8h] [bp-14h]
v176 = *(unsigned __int8 *)(a1 + 2209);
v177 = *(unsigned __int8 *)(a1 + 2208);
if ( *(_BYTE *)(a1 + 2209) && *(_BYTE *)(a1 + 2208) )
{
v8 = *(unsigned __int8 *)(a1 + 2209);
if ( !*(_BYTE *)(a1 + 2210) )
v8 = 0;
v176 = v8;
v9 = *(unsigned __int8 *)(a1 + 2208);
if ( *(_BYTE *)(a1 + 2210) )
v9 = 0;
v177 = v9;
}
if ( cocos2d::CCRect::equals(a4, (const cocos2d::CCRect *)&unk_D2B83C) )
v10 = (unsigned __int8 *)a3;
else
v10 = nullptr;
v11 = (const cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 664))(a1);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v195, v11);
if ( v10 )
v12 = (const cocos2d::CCRect *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v10 + 664))(v10);
else
v12 = a4;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v199, v12);
if ( !*(_BYTE *)(a1 + 2320) || *(_BYTE *)(a1 + 1945) )
{
v13 = 10.0;
}
else
{
v13 = 10.0;
if ( !*(_BYTE *)(a1 + 1944) )
v13 = 5.0;
}
if ( *(int *)(a1 + 2196) > 0 )
v13 = 15.0;
v14 = v13 * (double)PlayerObject::flipMod((PlayerObject *)a1);
if ( PlayerObject::isFlying((PlayerObject *)a1) && !*(_BYTE *)(a1 + 2320) )
v14 = (float)((float)PlayerObject::flipMod((PlayerObject *)a1) * 6.0);
if ( *(_BYTE *)(a1 + 1945) )
{
v15 = *(double *)(a1 + 1408);
v14 = v14 + v15 * (double)PlayerObject::flipMod((PlayerObject *)a1);
}
if ( v10 )
v166 = v10[1113];
else
v166 = 0;
if ( a3 )
{
if ( a2 <= 0.0 )
goto LABEL_62;
LastPosition = (const cocos2d::CCPoint *)GameObject::getLastPosition(a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193, LastPosition);
(*(void (__fastcall **)(float *, GameObject *))(*(_DWORD *)a3 + 680))(&v200, a3);
v17 = *(int (__fastcall **)(int))(*(_DWORD *)a1 + 96);
v18 = v194;
v19 = v201;
if ( *(_BYTE *)(a1 + 1963) )
{
v19 = v200;
v18 = v193;
v20 = *(float *)v17(a1);
}
else
{
v20 = *(float *)(v17(a1) + 4);
}
if ( *(_BYTE *)(a1 + 1963) )
{
GameObject::getScalePosDelta((GameObject *)&v202);
v21 = v202;
}
else
{
GameObject::getScalePosDelta((GameObject *)&v202);
v21 = v203;
}
if ( v21 != 0.0 )
{
if ( v20 >= v19 )
v18 = v18 - v21;
else
v18 = v18 + v21;
}
if ( v200 == v193 && v201 == v194 )
{
LABEL_62:
v25 = 0.0;
v27 = 0;
v165 = nullptr;
v168 = 0;
}
else
{
v22 = (cocos2d::CCRect *)*(unsigned __int8 *)(a1 + 1959);
v23 = v18 == v19;
v24 = v18 < v19;
if ( *(_BYTE *)(a1 + 1959) )
{
if ( v24 || v23 )
{
v25 = 0.0;
v27 = v24;
v22 = nullptr;
goto LABEL_58;
}
}
else if ( v18 >= v19 )
{
v27 = !v24 && !v23;
v25 = 0.0;
LABEL_58:
v165 = v22;
v168 = (_BOOL4)v22;
goto LABEL_63;
}
v25 = (float)(v19 - v18) / a2;
v26 = fabsf(v25);
v168 = v26 > 5.0;
v14 = v14 + v26 * (double)PlayerObject::flipMod((PlayerObject *)a1);
if ( *(_BYTE *)(a1 + 2320) )
{
v27 = 0;
}
else
{
v27 = *(unsigned __int8 *)(a1 + 2320);
*(double *)(a1 + 1336) = v25;
}
v165 = (cocos2d::CCRect *)(&dword_0 + 1);
}
}
else
{
v25 = 0.0;
v27 = 0;
v165 = nullptr;
v168 = 0;
}
LABEL_63:
v28 = *(unsigned __int8 *)(a1 + 2320);
v29 = 0.0;
if ( *(_BYTE *)(a1 + 2320) )
v29 = 5.0;
v183 = v29;
if ( *(int *)(a1 + 2332) > 0 || *(_BYTE *)(a1 + 2320) || *(int *)(a1 + 2336) > 0 )
v28 = (unsigned __int8)v166 ^ 1;
v173 = v28;
v30 = *(int (__fastcall **)(int))(*(_DWORD *)a1 + 96);
if ( *(_BYTE *)(a1 + 1963) )
{
v31 = (float *)v30(a1);
v32 = (float *)(a1 + 1060);
v33 = *v31;
}
else
{
v34 = v30(a1);
v32 = (float *)(a1 + 1064);
v33 = *(float *)(v34 + 4);
}
v35 = *v32;
(*(void (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v36 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v37 = v198 * 0.5;
v38 = (float)(v33 - v35);
v39 = *(float *)(v36 + 4);
v40 = (float)(v39 - (float)(v37 * (float)PlayerObject::flipMod((PlayerObject *)a1))) + v14;
v178 = v40 - v38;
v187 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1) + 4);
v188 = v198;
v189 = PlayerObject::flipMod((PlayerObject *)a1);
(*(void (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
if ( *(_BYTE *)(a1 + 1959) )
v41 = v38 < 0.0;
else
v41 = v38 > 0.0;
v174 = v41;
v185 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)v199));
v186 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v199));
v42 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v199));
v43 = COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)v199));
v44 = v42;
v190 = v199[0];
v191 = v199[2];
v45 = v43;
v46 = v43;
if ( *(_BYTE *)(a1 + 1956) && *(int *)(a1 + 2328) <= 0 )
{
v64 = (GJBaseGameLayer *)(&dword_0 + 1);
v61 = 0;
goto LABEL_156;
}
if ( *(_BYTE *)(a1 + 1944) || *(_BYTE *)(a1 + 1945) )
{
v48 = 1;
goto LABEL_82;
}
v47 = *(_DWORD *)(a1 + 1464);
if ( v47 )
{
v48 = v10 == nullptr;
LABEL_82:
v49 = *(_DWORD **)(a1 + 1460);
v50 = 0;
v167 = 0;
v169 = 0;
while ( 1 )
{
if ( !v49 )
goto LABEL_110;
v51 = (GameObject *)v49[3];
if ( !v48 && v51 != *(GameObject **)(a1 + 1400) )
{
v52 = (cocos2d::CCRect *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)v51 + 664))(v49[3]);
v53 = COERCE_FLOAT(cocos2d::CCRect::getMinX(v52));
if ( v53 >= *(float *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v10 + 96))(v10) )
goto LABEL_103;
v54 = (cocos2d::CCRect *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)v51 + 664))(v51);
v55 = COERCE_FLOAT(cocos2d::CCRect::getMaxX(v54));
if ( v55 <= *(float *)(*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v10 + 96))(v10) )
goto LABEL_103;
}
(*(void (__fastcall **)(float *, GameObject *, int, int))(*(_DWORD *)v51 + 668))(
&v200,
v51,
1067030938,
1066192077);
if ( !cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v199, (const cocos2d::CCRect *)&v200) )
goto LABEL_103;
(*(void (__fastcall **)(float *, GameObject *, int, int))(*(_DWORD *)v51 + 668))(
&v202,
v51,
1067030938,
1066192077);
if ( !cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v195, (const cocos2d::CCRect *)&v202) )
goto LABEL_103;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v202, (const cocos2d::CCRect *)v199);
v179 = COERCE_DOUBLE(GameObject::slopeYPos(v51, &v202));
v56 = GameObject::slopeFloorTop(v51);
if ( v179 + 2.0 >= v44 )
{
if ( v56 )
{
v57 = v169;
if ( *(GameObject **)(a1 + 1400) == v51 )
v57 = 1;
v58 = v57;
}
else
{
v58 = 1;
}
v169 = v58;
}
if ( v179 - 2.0 > v46 || !v56 && *(GameObject **)(a1 + 1400) != v51 )
break;
if ( v169 )
{
v47 = 1;
v167 = 1;
goto LABEL_109;
}
v50 = 1;
v167 = 1;
LABEL_105:
v49 = (_DWORD *)*v49;
}
v50 = 1;
LABEL_103:
if ( v169 && v167 )
goto LABEL_110;
goto LABEL_105;
}
v167 = 0;
v169 = 0;
LABEL_109:
v50 = v47;
LABEL_110:
if ( v10 )
v59 = (*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v10 + 900))(v10) == 21;
else
v59 = 0;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v200, v195 + (float)(v183 * 0.5), v196, v197 - v183, v198);
v180 = PlayerObject::isInNormalMode((PlayerObject *)a1);
if ( *(_BYTE *)(a1 + 1959) )
{
if ( PlayerObject::isFlying((PlayerObject *)a1) || *(_BYTE *)(a1 + 1955) )
v60 = (unsigned __int8)v166 ^ 1;
else
v60 = *(unsigned __int8 *)(a1 + 1955);
}
else
{
v60 = 1;
}
if ( *(_BYTE *)(a1 + 1959) )
{
if ( v40 < v44 && v178 < v44 )
goto LABEL_125;
}
else if ( v40 > v46 && v178 > v46 )
{
LABEL_125:
v61 = 0;
goto LABEL_129;
}
if ( *(_BYTE *)(a1 + 2320) && v59 && v174 )
{
v61 = 1;
if ( !*(_BYTE *)(a1 + 1910) )
{
v175 = 1;
goto LABEL_133;
}
}
else
{
v61 = 1;
}
LABEL_129:
v175 = 0;
LABEL_133:
if ( *(_BYTE *)(a1 + 2320) )
{
if ( *(_BYTE *)(a1 + 1944) || *(_BYTE *)(a1 + 1945) )
{
if ( v61 )
{
if ( !*(_BYTE *)(a1 + 1952) )
v50 = 0;
}
else if ( *(_BYTE *)(a1 + 1952) )
{
v50 = 0;
}
}
if ( !a5 && !cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v200, (const cocos2d::CCRect *)v199) )
goto LABEL_210;
}
v62 = (float)(v187 - (float)((float)(v188 * 0.5) * (float)-v189)) - v14;
v63 = v62 - v38;
if ( !v60 && !v173 )
goto LABEL_149;
if ( !*(_BYTE *)(a1 + 1959) )
{
if ( v40 < v44 && v178 < v44 )
goto LABEL_149;
goto LABEL_300;
}
if ( v62 >= v44 || v63 >= v44 )
{
if ( *(_BYTE *)(a1 + 1954) && v59 && !*(_BYTE *)(a1 + 2320) )
{
(*(void (__fastcall **)(float *, int, int, int))(*(_DWORD *)a1 + 668))(&v202, a1, 1050253722, 1050253722);
if ( cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v199, (const cocos2d::CCRect *)&v202) )
goto LABEL_231;
LABEL_389:
v64 = nullptr;
goto LABEL_150;
}
LABEL_300:
v181 = *(double *)(a1 + 1928);
if ( v181 > 0.0 && !*(_BYTE *)(a1 + 1945) && !v168 || v50 && v169 )
{
if ( *(_BYTE *)(a1 + 1959) )
{
if ( v61 && v27 )
{
v156 = v181;
v182 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v172 = v156;
v157 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v158 = v44 + (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v157, v158);
v182(a1, &v202);
isFlying = *(_BYTE *)(a1 + 1959);
if ( isFlying )
isFlying = PlayerObject::isFlying((PlayerObject *)a1);
PlayerObject::hitGroundNoJump((PlayerObject *)a1, (GameObject *)v10, isFlying);
if ( !v59 && !v166 )
PlayerObject::updateCollideTop((cocos2d::CCDictionary *)a1, v42, (GameObject *)v10);
LODWORD(v160) = a1;
PlayerObject::setYVelocity(v160, v172, 27);
LODWORD(v161) = a1;
v162 = *(double *)(a1 + 1928) < *(double *)(a1 + 1336) + 1.0
? *(double *)(a1 + 1336) + 1.0
: *(double *)(a1 + 1928);
PlayerObject::setYVelocity(v161, v162, 28);
PlayerObject::didHitHead((int *)a1);
if ( v175 )
{
v64 = *(GJBaseGameLayer **)(a1 + 2440);
*(_BYTE *)(a1 + 1910) = 1;
if ( !v64 )
{
GameObject::destroyObject((GameObject *)v10);
goto LABEL_150;
}
GJBaseGameLayer::destroyObject(v64, (GameObject *)v10);
}
}
}
else if ( !v61 && v165 )
{
v171 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v150 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v151 = v44 + (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v150, v151);
v171(a1, &v202);
v152 = *(unsigned __int8 *)(a1 + 1959);
if ( *(_BYTE *)(a1 + 1959) )
v152 = PlayerObject::isFlying((PlayerObject *)a1);
PlayerObject::hitGround((PlayerObject *)a1, (GameObject *)v10, v152);
PlayerObject::updateCollideBottom((cocos2d::CCDictionary *)a1, v42, (GameObject *)v10);
PlayerObject::updateLastGroundObject((_DWORD *)a1, a3);
LODWORD(v153) = a1;
*(double *)(a1 + 1336) = v25;
PlayerObject::setYVelocity(v153, v181, 25);
LODWORD(v154) = a1;
if ( *(double *)(a1 + 1928) < *(double *)(a1 + 1336) )
v155 = *(double *)(a1 + 1336);
else
v155 = *(double *)(a1 + 1928);
PlayerObject::setYVelocity(v154, v155, 26);
}
goto LABEL_389;
}
if ( v61 && v181 * (double)PlayerObject::flipMod((PlayerObject *)a1) > 0.0 && *(_DWORD *)(a1 + 2440) )
PlayerObject::gameEventTriggered((PlayerObject *)a1, 6, 0);
v121 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v122 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v123 = v44 + (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v122, v123);
v121(a1, &v202);
if ( v180 )
PlayerObject::checkSnapJumpToObject(a1, (GameObject *)v10);
if ( !v173 || v60 )
{
v125 = *(unsigned __int8 *)(a1 + 1959);
if ( *(_BYTE *)(a1 + 1959) )
v125 = PlayerObject::isFlying((PlayerObject *)a1);
if ( v61 )
PlayerObject::hitGroundNoJump((PlayerObject *)a1, (GameObject *)v10, v125);
else
PlayerObject::hitGround((PlayerObject *)a1, (GameObject *)v10, v125);
}
else
{
LODWORD(v124) = a1;
PlayerObject::setYVelocity(v124, 0.0, 23);
}
if ( *(_BYTE *)(a1 + 1959) )
{
if ( !v61 )
{
v127 = (cocos2d::CCDictionary *)a1;
v126 = v45;
goto LABEL_314;
}
if ( !v59 && !v166 )
{
v164 = v42;
v163 = (cocos2d::CCDictionary *)a1;
goto LABEL_404;
}
}
else
{
if ( !v61 )
{
v126 = v42;
v127 = (cocos2d::CCDictionary *)a1;
LABEL_314:
PlayerObject::updateCollideBottom(v127, v126, (GameObject *)v10);
PlayerObject::updateLastGroundObject((_DWORD *)a1, a3);
*(double *)(a1 + 1336) = v25;
goto LABEL_315;
}
if ( !v59 && !v166 )
{
v163 = (cocos2d::CCDictionary *)a1;
v164 = v45;
LABEL_404:
PlayerObject::updateCollideTop(v163, v164, (GameObject *)v10);
}
}
if ( *(_BYTE *)(a1 + 2320) )
PlayerObject::exitPlatformerAnimateJump((cocos2d::CCNode **)a1);
LABEL_315:
if ( v180 && *(int *)(a1 + 2324) > 0 && *(_BYTE *)(a1 + 1600) )
*(_BYTE *)(a1 + 1901) = 0;
if ( PlayerObject::isFlying((PlayerObject *)a1) && v165 )
{
if ( !v61 )
goto LABEL_319;
v128 = (double *)(a1 + 1336);
v129 = 24;
goto LABEL_322;
}
LABEL_317:
if ( !v61 )
{
LABEL_319:
if ( !v175 )
{
LABEL_260:
LODWORD(v90) = 1;
return LODWORD(v90);
}
*(_BYTE *)(a1 + 1910) = 1;
LABEL_231:
v95 = *(GJBaseGameLayer **)(a1 + 2440);
if ( v95 )
GJBaseGameLayer::destroyObject(v95, (GameObject *)v10);
else
GameObject::destroyObject((GameObject *)v10);
goto LABEL_260;
}
LABEL_318:
PlayerObject::didHitHead((int *)a1);
goto LABEL_319;
}
LABEL_149:
v64 = (GJBaseGameLayer *)(&dword_0 + 1);
LABEL_150:
if ( *(_BYTE *)(a1 + 1959) || (PlayerObject::isFlying((PlayerObject *)a1) || *(_BYTE *)(a1 + 1955)) && !v166 )
{
v92 = 1;
}
else
{
if ( !v173 )
goto LABEL_156;
v92 = 0;
}
v170 = v92;
if ( !v64 )
goto LABEL_258;
if ( *(_BYTE *)(a1 + 1959) )
{
v62 = v40;
v63 = v178;
}
if ( v10 )
v93 = *((_DWORD *)v10 + 195);
else
v93 = 0;
if ( v62 <= v46 || v63 <= v46 )
{
if ( *(_BYTE *)(a1 + 1959) )
goto LABEL_221;
}
else
{
if ( *(_BYTE *)(a1 + 1959) )
{
if ( v93 != *(_DWORD *)(a1 + 1280) )
{
LABEL_210:
v64 = (GJBaseGameLayer *)(&dword_0 + 1);
goto LABEL_156;
}
LABEL_221:
v94 = *(double *)(a1 + 1928);
if ( v94 < 0.0 && (!*(_BYTE *)(a1 + 2320) || *(double *)(a1 + 1344) <= 0.0) && !*(_BYTE *)(a1 + 1945) && !v168
|| v50 && v167 )
{
if ( *(_BYTE *)(a1 + 1959) )
{
if ( !v61 && v165 )
{
v96 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v97 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v98 = v46 - (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v97, v98);
v96(a1, &v202);
v99 = *(unsigned __int8 *)(a1 + 1959);
if ( *(_BYTE *)(a1 + 1959) )
v99 = PlayerObject::isFlying((PlayerObject *)a1);
PlayerObject::hitGround((PlayerObject *)a1, (GameObject *)v10, v99);
PlayerObject::updateCollideBottom((cocos2d::CCDictionary *)a1, v45, (GameObject *)v10);
PlayerObject::updateLastGroundObject((_DWORD *)a1, a3);
LODWORD(v100) = a1;
*(double *)(a1 + 1336) = v25;
PlayerObject::setYVelocity(v100, v94, 31);
LODWORD(v101) = a1;
if ( *(double *)(a1 + 1928) > *(double *)(a1 + 1336) )
v102 = *(double *)(a1 + 1336);
else
v102 = *(double *)(a1 + 1928);
PlayerObject::setYVelocity(v101, v102, 32);
}
}
else if ( v61 && v27 )
{
v103 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v104 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v105 = v46 - (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v104, v105);
v103(a1, &v202);
v106 = *(_BYTE *)(a1 + 1959);
if ( v106 )
v106 = PlayerObject::isFlying((PlayerObject *)a1);
PlayerObject::hitGroundNoJump((PlayerObject *)a1, (GameObject *)v10, v106);
if ( !v59 && !v166 )
PlayerObject::updateCollideTop((cocos2d::CCDictionary *)a1, v45, (GameObject *)v10);
LODWORD(v107) = a1;
PlayerObject::setYVelocity(v107, v94, 33);
LODWORD(v108) = a1;
if ( *(double *)(a1 + 1928) > *(double *)(a1 + 1336) - 1.0 )
v109 = *(double *)(a1 + 1336) - 1.0;
else
v109 = *(double *)(a1 + 1928);
PlayerObject::setYVelocity(v108, v109, 34);
PlayerObject::didHitHead((int *)a1);
if ( v175 )
{
v110 = *(GJBaseGameLayer **)(a1 + 2440);
*(_BYTE *)(a1 + 1910) = 1;
if ( v110 )
GJBaseGameLayer::destroyObject(v110, (GameObject *)v10);
else
GameObject::destroyObject((GameObject *)v10);
}
}
goto LABEL_258;
}
if ( v61 && v94 * (double)PlayerObject::flipMod((PlayerObject *)a1) > 0.0 && *(_DWORD *)(a1 + 2440) )
PlayerObject::gameEventTriggered((PlayerObject *)a1, 6, 0);
v111 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v112 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v113 = v46 - (float)(v198 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, *v112, v113);
v111(a1, &v202);
if ( v180 )
PlayerObject::checkSnapJumpToObject(a1, (GameObject *)v10);
if ( v173 && !v170 )
{
LODWORD(v114) = a1;
PlayerObject::setYVelocity(v114, 0.0, 29);
}
else
{
if ( *(_BYTE *)(a1 + 1959) )
v115 = 0;
else
v115 = PlayerObject::isFlying((PlayerObject *)a1);
if ( v61 )
PlayerObject::hitGroundNoJump((PlayerObject *)a1, (GameObject *)v10, v115);
else
PlayerObject::hitGround((PlayerObject *)a1, (GameObject *)v10, v115);
}
if ( *(_BYTE *)(a1 + 1959) )
{
if ( v61 )
{
if ( !v59 && !v166 )
{
v117 = v42;
v116 = (cocos2d::CCDictionary *)a1;
goto LABEL_286;
}
LABEL_289:
if ( *(_BYTE *)(a1 + 2320) )
PlayerObject::exitPlatformerAnimateJump((cocos2d::CCNode **)a1);
LABEL_291:
if ( v180 && *(int *)(a1 + 2324) > 0 && *(_BYTE *)(a1 + 1600) )
*(_BYTE *)(a1 + 1901) = 0;
if ( PlayerObject::isFlying((PlayerObject *)a1) && v165 )
{
if ( !v61 )
goto LABEL_319;
v128 = (double *)(a1 + 1336);
v129 = 30;
LABEL_322:
LODWORD(v120) = a1;
PlayerObject::setYVelocity(v120, *v128, v129);
goto LABEL_318;
}
goto LABEL_317;
}
v119 = v45;
v118 = (cocos2d::CCDictionary *)a1;
}
else
{
if ( v61 )
{
if ( !v59 && !v166 )
{
v116 = (cocos2d::CCDictionary *)a1;
v117 = v45;
LABEL_286:
PlayerObject::updateCollideTop(v116, v117, (GameObject *)v10);
goto LABEL_289;
}
goto LABEL_289;
}
v118 = (cocos2d::CCDictionary *)a1;
v119 = v42;
}
PlayerObject::updateCollideBottom(v118, v119, (GameObject *)v10);
PlayerObject::updateLastGroundObject((_DWORD *)a1, a3);
*(double *)(a1 + 1336) = v25;
goto LABEL_291;
}
if ( v93 != *(_DWORD *)(a1 + 1284) )
goto LABEL_210;
}
if ( !*(_BYTE *)(a1 + 1954) || !v59 || *(_BYTE *)(a1 + 2320) )
goto LABEL_221;
(*(void (__fastcall **)(float *, int, int, int))(*(_DWORD *)a1 + 668))(&v202, a1, 1050253722, 1050253722);
if ( cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v199, (const cocos2d::CCRect *)&v202) )
goto LABEL_231;
LABEL_258:
v64 = nullptr;
LABEL_156:
if ( *(_BYTE *)(a1 + 2320) )
{
v65 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v65);
(*(void (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
(*(void (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v66 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v67 = v198;
v68 = *(float *)(v66 + 4);
v69 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v70 = v198;
v71 = *(float *)(v69 + 4);
if ( a3 )
{
if ( a2 <= 0.0 )
{
v81 = 0.0;
v79 = 0;
v78 = 0;
}
else
{
v72 = (const cocos2d::CCPoint *)GameObject::getLastPosition(a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193, v72);
(*(void (__fastcall **)(float *, GameObject *))(*(_DWORD *)a3 + 680))(&v200, a3);
v73 = *(int (__fastcall **)(int))(*(_DWORD *)a1 + 96);
if ( *(_BYTE *)(a1 + 1963) )
v74 = *(float *)v73(a1);
else
v74 = *(float *)(v73(a1) + 4);
if ( *(_BYTE *)(a1 + 1963) )
{
v75 = v194;
v76 = v201;
GameObject::getScalePosDelta((GameObject *)&v202);
v77 = v203;
}
else
{
v75 = v193;
v76 = v200;
GameObject::getScalePosDelta((GameObject *)&v202);
v77 = v202;
}
v78 = (float)((float)(v76 - v75) + v77) < 0.0;
v79 = (float)((float)(v76 - v75) - v77) > 0.0;
if ( v74 >= v76 )
v80 = v75 - v77;
else
v80 = v75 + v77;
v81 = (float)(v76 - v80) / a2;
}
}
else
{
v81 = 0.0;
v79 = 0;
v78 = 0;
}
if ( *(_BYTE *)(a1 + 1944) || *(_BYTE *)(a1 + 1945) || *(double *)(a1 + 2128) - *(double *)(a1 + 2288) < 0.200000003 )
{
v84 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v85 = v198 * 0.5;
v86 = *(float *)(v84 + 4);
v82 = (float)(v86 + (float)(v85 * (float)PlayerObject::flipMod((PlayerObject *)a1)));
v83 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1) + 4);
}
else
{
v82 = (float)(v68 + (float)(v67 * 0.5)) - v13;
v83 = (float)(v71 - (float)(v70 * 0.5)) + v13;
}
if ( a3 )
{
v87 = a3 == *(GameObject **)(a1 + 1312);
if ( a3 == *(GameObject **)(a1 + 1316) )
{
v88 = 1;
goto LABEL_181;
}
}
else
{
v87 = 0;
}
v88 = 0;
LABEL_181:
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v202, v195, v196 + (float)(v183 * 0.5), v197, v198 - v183);
if ( !v166
&& (cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v202, (const cocos2d::CCRect *)v199) || v87 || v88)
&& (v82 < v44 && v82 > v46 || v83 < v44 && v83 > v46) )
{
*(double *)(a1 + 1368) = v81;
if ( v87
|| *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1) > (float)(v190 + (float)(v191 * 0.5)) && !v88 )
{
PlayerObject::updateCollideLeft((double *)a1, v186, (GameObject *)v10);
v136 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v137 = v186 + (float)(v197 * 0.5);
v139 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v138 = v137;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v200, v138, *(float *)(v139 + 4));
v136(a1, &v200);
if ( *(double *)(a1 + 2200) < 0.0 && (!v176 || !v78) )
*(_QWORD *)(a1 + 2200) = 0;
if ( *(_BYTE *)(a1 + 1996) )
{
v140 = *(_DWORD *)(a1 + 1224);
if ( !v140 || !*(_BYTE *)(v140 + 1664) )
{
PlayerObject::stopDashing((char *)a1);
*(_BYTE *)(a1 + 1901) = 0;
}
}
v135 = *(unsigned __int8 *)(a1 + 2297);
}
else
{
PlayerObject::updateCollideRight((double *)a1, v185, (GameObject *)v10);
v130 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
v131 = v185 - (float)(v197 * 0.5);
v133 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 96))(a1);
v132 = v131;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v200, v132, *(float *)(v133 + 4));
v130(a1, &v200);
if ( *(double *)(a1 + 2200) > 0.0 && (!v177 || !v79) )
*(_QWORD *)(a1 + 2200) = 0;
if ( *(_BYTE *)(a1 + 1996) )
{
v134 = *(_DWORD *)(a1 + 1224);
if ( !v134 || !*(_BYTE *)(v134 + 1664) )
{
PlayerObject::stopDashing((char *)a1);
*(_BYTE *)(a1 + 1901) = 0;
}
}
v135 = *(unsigned __int8 *)(a1 + 2298);
}
if ( v135 )
*(_DWORD *)(a1 + 2268) = 0;
}
if ( !v64 || *(_BYTE *)(a1 + 2320) )
goto LABEL_196;
goto LABEL_190;
}
if ( !v64 )
goto LABEL_196;
LABEL_190:
if ( v166 )
goto LABEL_196;
(*(void (__fastcall **)(float *, int, int, int))(*(_DWORD *)a1 + 668))(&v202, a1, 1050253722, 1050253722);
v89 = COERCE_FLOAT(cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v199, (const cocos2d::CCRect *)&v202));
v90 = v89;
if ( v89 == 0.0 )
goto LABEL_196;
if ( v61 && (LODWORD(v89) = PlayerObject::isSafeFlip((PlayerObject *)a1, 0.1), v89 != 0.0) )
{
v141 = *(_DWORD *)a1;
v142 = *(void (__fastcall **)(int, float *))(*(_DWORD *)a1 + 92);
if ( *(_BYTE *)(a1 + 1959) )
{
v145 = (float *)(*(int (__fastcall **)(int))(v141 + 96))(a1);
v144 = v44 + (float)(v198 * 0.5);
v143 = *v145;
}
else
{
v143 = *(float *)(*(int (__fastcall **)(int))(v141 + 96))(a1);
v144 = v46 - (float)(v198 * 0.5);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v200, v143, v144);
v142(a1, &v200);
PlayerObject::hitGround((PlayerObject *)a1, (GameObject *)v10, 1);
*(_BYTE *)(a1 + 2036) = 0;
}
else if ( !*(_BYTE *)(a1 + 1958)
|| (v146 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v199)),
v89 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)&v202)),
v146 >= v89)
|| (LODWORD(v89) = PlayerObject::isSafeSpiderFlip((PlayerObject *)a1, 0.04), v89 == 0.0) )
{
if ( v10 )
{
v89 = COERCE_FLOAT((*(int (__fastcall **)(unsigned __int8 *))(*(_DWORD *)v10 + 900))(v10));
if ( LODWORD(v89) == 21 )
{
v147 = *(GJBaseGameLayer **)(a1 + 2440);
if ( v147 )
GJBaseGameLayer::destroyObject(v147, (GameObject *)v10);
else
GameObject::destroyObject((GameObject *)v10);
return LODWORD(v90);
}
}
v148 = *(unsigned __int8 *)(a1 + 1605);
if ( !*(_BYTE *)(a1 + 1605) )
{
v149 = GameManager::sharedState((GameManager *)LODWORD(v89));
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(v149 + 404) + 648))(*(_DWORD *)(v149 + 404), a1, v148);
return LODWORD(v90);
}
if ( !*(_BYTE *)(a1 + 2464) )
{
*(_BYTE *)(a1 + 1900) = 1;
return LODWORD(v90);
}
LABEL_196:
v90 = 0.0;
}
return LODWORD(v90);
}