//
// GJBaseGameLayer::updateCamera from 0x5b6a54 to 0x5b8232 (6110 bytes)
//
// 8 xrefs:
// > PlayLayer::setupHasCompleted @ 0x40a3f4
// > PlayLayer::setupHasCompleted @ 0x40a6c8
// > PlayLayer::switchToStartPosObject @ 0x412228
// > PlayLayer::resetLevel @ 0x4128ea
// > LevelEditorLayer::onPlaytest @ 0x4683ea
// > LevelEditorLayer::onPlaytest @ 0x468534
// > GJBaseGameLayer::checkCameraLimitAfterTeleport @ 0x5b82be
// > GJBaseGameLayer::update @ 0x5be0f8
//
// 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:39 +0000
//
int __fastcall GJBaseGameLayer::updateCamera(PlayerObject **this, float a2)
{
float v4; // s20
float v5; // s28
float v6; // s27
float v7; // s25
float v8; // s17
float v9; // s20
float v10; // s23
float v11; // s21
float v12; // s18
int CameraEdgeValue; // r5
float v14; // s15
int v15; // r3
int v16; // r0
unsigned __int8 *v17; // r3
int v18; // r8
_BOOL4 v19; // r1
_BOOL4 v20; // r2
float v21; // s15
float v22; // s23
float v23; // s23
float v24; // s18
float v25; // s23
float v26; // s18
int v27; // s24
int v28; // s23
const cocos2d::CCPoint *v29; // r0
int v30; // r5
char *LastPosition; // r0
int v32; // s15
float v33; // r1
float v34; // r2
_BOOL4 v35; // r3
float v36; // s15
float v37; // s12
float v38; // s13
float v39; // s12
float v40; // s14
int v41; // r5
float v42; // s17
float v43; // s17
float v44; // s15
_BOOL4 v45; // r9
float v46; // s15
_BOOL4 v47; // r10
float v48; // s15
int MainObject; // r0
PlayerObject **v50; // r1
float v51; // s14
float v52; // s15
float v53; // s14
float v54; // r3
float v55; // r3
float v56; // s15
float v57; // s15
float v58; // s12
float v59; // s14
float v60; // s11
float v61; // s14
float v62; // s13
float v63; // s15
float v64; // s14
float v65; // s15
float v66; // s15
int v67; // r9
float v68; // s15
float v69; // s11
float v70; // s13
float v71; // s14
float v72; // s12
float v73; // s12
float v74; // s14
float v75; // s15
float v76; // s15
float v77; // s14
float v78; // s15
int v79; // r10
float v80; // s14
float v81; // s13
float v82; // s13
float v83; // s14
float v84; // s14
float v85; // s14
float v86; // s15
float v87; // s15
float v88; // s15
float v89; // s14
float v90; // s17
float v91; // s15
float v92; // s14
float v93; // s15
float v94; // s14
float v95; // s15
float v96; // s14
float v97; // s14
float v98; // s15
float v99; // s15
float v100; // r3
float v101; // s15
float v102; // r3
float v103; // s15
float v104; // s14
float v105; // s15
float v106; // s14
float v107; // s15
float v108; // s14
float v109; // s14
float v110; // s15
float v111; // s15
float v112; // s14
float v113; // s15
float v114; // s15
float v115; // s14
float v116; // s15
float v117; // s15
float v118; // s14
float v119; // s15
float v120; // s14
float v121; // s15
float v122; // s15
float v123; // s14
float v124; // s15
float v125; // s14
float v126; // s15
float v127; // s15
int v128; // r5
float v129; // s14
float v130; // r1
unsigned int v131; // r1
PlayerObject *v132; // r3
float v133; // r1
unsigned int v134; // r3
float v135; // s15
PlayerObject *v136; // r3
int v137; // s15
float v138; // r2
float v139; // s15
float v140; // r3
unsigned int v141; // r1
float v142; // s15
GJGameState *v143; // r0
unsigned int v144; // r3
int v145; // s15
float v146; // r2
float v147; // r3
float v148; // r3
int v149; // r0
float v150; // s14
float v151; // s15
int v152; // r11
void (__fastcall *v153)(int, PlayerObject **); // r10
PlayerObject *v154; // r3
float v156; // s14
float v157; // s15
float v158; // s15
float v159; // s15
float v160; // s17
float v161; // s17
float v162; // s15
float v163; // s17
float v164; // s15
float v165; // s13
float v166; // s14
float v167; // s12
float v168; // s15
float v169; // s17
float v170; // s15
float v171; // s14
float v172; // s17
float v173; // s13
float v174; // s15
float v175; // s13
float v176; // s14
float v177; // s13
float v178; // s15
float v179; // s15
float v180; // s14
float v181; // s14
float v182; // s15
float v183; // s14
float v184; // s14
float v185; // s13
float v186; // s12
float v187; // s14
float v188; // s13
float v189; // s15
PlayerObject *v190; // r3
PlayerObject *v191; // r3
float v192; // s15
float v193; // s14
float v194; // s15
float v195; // s14
_BYTE *v196; // [sp+18h] [bp-D4h]
_BOOL4 v197; // [sp+1Ch] [bp-D0h]
int v198; // [sp+20h] [bp-CCh]
int v199; // [sp+24h] [bp-C8h]
int v200; // [sp+2Ch] [bp-C0h]
float v201; // [sp+44h] [bp-A8h] BYREF
float v202; // [sp+48h] [bp-A4h]
float v203[2]; // [sp+4Ch] [bp-A0h] BYREF
float v204[2]; // [sp+54h] [bp-98h] BYREF
float v205; // [sp+5Ch] [bp-90h] BYREF
float v206; // [sp+60h] [bp-8Ch]
float v207; // [sp+64h] [bp-88h] BYREF
float v208; // [sp+68h] [bp-84h]
float v209; // [sp+6Ch] [bp-80h] BYREF
float v210; // [sp+70h] [bp-7Ch]
float v211; // [sp+74h] [bp-78h] BYREF
float v212; // [sp+78h] [bp-74h]
float v213; // [sp+7Ch] [bp-70h] BYREF
float v214; // [sp+80h] [bp-6Ch]
float v215; // [sp+84h] [bp-68h] BYREF
float v216; // [sp+88h] [bp-64h]
float v217; // [sp+8Ch] [bp-60h] BYREF
float v218; // [sp+90h] [bp-5Ch]
_BYTE v219[8]; // [sp+94h] [bp-58h] BYREF
float v220[2]; // [sp+9Ch] [bp-50h] BYREF
float v221[2]; // [sp+A4h] [bp-48h] BYREF
float v222; // [sp+ACh] [bp-40h] BYREF
float v223; // [sp+B0h] [bp-3Ch]
float v224; // [sp+B4h] [bp-38h] BYREF
float v225; // [sp+B8h] [bp-34h]
_DWORD v226[2]; // [sp+BCh] [bp-30h] BYREF
float v227; // [sp+C4h] [bp-28h] BYREF
float v228; // [sp+C8h] [bp-24h]
float v229[2]; // [sp+CCh] [bp-20h] BYREF
float v230[2]; // [sp+D4h] [bp-18h] BYREF
PlayerObject *v231; // [sp+DCh] [bp-10h] BYREF
float v232; // [sp+E0h] [bp-Ch]
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v201);
v4 = *((float *)this + 82);
v5 = v201;
v6 = v202;
v7 = v201 / v4;
v8 = *((float *)this + 164);
v9 = v202 / v4;
if ( (int)*(this + 224) <= 0 )
v10 = -99999.0;
else
v10 = COERCE_FLOAT(GJBaseGameLayer::getCameraEdgeValue((GJBaseGameLayer *)this, 2)) - v7;
if ( (int)*(this + 223) <= 0 )
v11 = -99999.0;
else
v11 = COERCE_FLOAT(GJBaseGameLayer::getCameraEdgeValue((GJBaseGameLayer *)this, 1));
if ( (int)*(this + 225) <= 0 )
v12 = (float)(*((float *)this + 2858) - 150.0) - v9;
else
v12 = COERCE_FLOAT(GJBaseGameLayer::getCameraEdgeValue((GJBaseGameLayer *)this, 3)) - v9;
if ( COERCE_FLOAT(GJBaseGameLayer::getCameraEdgeValue((GJBaseGameLayer *)this, 4)) <= 0.0 )
CameraEdgeValue = 0;
else
CameraEdgeValue = GJBaseGameLayer::getCameraEdgeValue((GJBaseGameLayer *)this, 4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v203, (float)(int)*(this + 223), (float)(int)*(this + 226));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v204, (float)(int)*(this + 224), (float)(int)*(this + 225));
if ( *(this + 2708) )
{
v14 = (float)(*((float *)this + 2706) - (float)(v201 / *((float *)this + 82))) - *((float *)this + 84);
if ( v10 == -99999.0 || v14 < v10 )
{
v204[0] = 1.0;
v10 = v14;
}
}
v15 = (int)*(this + 521);
if ( (*(_BYTE *)(v15 + 348) || *((_BYTE *)this + 10838) && !*((_BYTE *)this + 10836))
&& !*(_BYTE *)(v15 + 349)
&& v11 <= 15.0 )
{
v11 = 15.0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v205, v10, v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v207, v11, *(float *)&CameraEdgeValue);
v16 = PlayerObject::isInBasicMode(*(this + 519));
v17 = (unsigned __int8 *)*(this + 519);
v18 = v17[1963];
v198 = v17[1962];
v199 = v17[1959];
v200 = v16;
if ( *((_BYTE *)this + 10829) || a2 == 0.0 )
{
v19 = 1;
v20 = 1;
}
else
{
if ( *((_BYTE *)this + 1280) )
v19 = 1;
else
v19 = *((float *)this + 120) != 0.0;
if ( *((_BYTE *)this + 1281) )
v20 = 1;
else
v20 = *((float *)this + 121) != 0.0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v209, (float)v19, (float)v20);
if ( *((unsigned __int8 *)this + 1004) != v18 && a2 > 0.0 )
{
if ( *((float *)this + 118) == 0.0 && v209 == 0.0 )
{
*((float *)this + 120) = 1.0;
*(this + 128) = nullptr;
*((float *)this + 122) = 1.0;
*((float *)this + 126) = 1.0;
*((float *)this + 124) = 2.0;
}
if ( *((float *)this + 119) == 0.0 && v210 == 0.0 )
{
*((float *)this + 121) = 1.0;
*(this + 129) = nullptr;
*((float *)this + 123) = 1.0;
*((float *)this + 127) = 1.0;
*((float *)this + 125) = 2.0;
}
}
if ( *((_BYTE *)this + 1280) || *((_BYTE *)this + 1281) )
{
*(this + 246) = nullptr;
*((_BYTE *)this + 1280) = 0;
*((_BYTE *)this + 1281) = 0;
}
v21 = 1.0;
v22 = -1.0;
if ( !v198 )
v22 = 1.0;
if ( v18 )
{
v26 = (float)(int)*(this + 147) * v22;
if ( !*((_BYTE *)this + 592) )
v21 = *((float *)this + 82);
v25 = 0.0;
v24 = v26 / v21;
}
else
{
v23 = (float)(int)*(this + 145) * v22;
if ( !*((_BYTE *)this + 584) )
v21 = *((float *)this + 82);
v24 = 0.0;
v25 = v23 / v21;
}
cocos2d::CCPoint::operator-(&v231, this + 212, this + 102);
*(float *)&v27 = 40.0;
cocos2d::CCPoint::operator=(this + 212, &v231);
cocos2d::CCPoint::operator-(v230, this + 84, this + 90);
cocos2d::CCPoint::operator+(&v231, this + 212, v230);
cocos2d::CCPoint::operator=(this + 212, &v231);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v211, v25, v24);
*(float *)&v28 = 70.0;
v29 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 519) + 96))(*(this + 519));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v29);
v30 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 519) + 96))(*(this + 519));
LastPosition = GameObject::getLastPosition(*(this + 519));
cocos2d::CCPoint::operator-(&v215, v30, LastPosition);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v217, (const cocos2d::CCPoint *)(this + 212));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v219, v201 * 0.5, v202 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v220, (float)(v201 * 0.5) - 2.0, (float)(v202 * 0.5) - 2.0);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v221,
(float)(v201 * 0.5) - (float)((float)(*((float *)this + 155) * (float)(v220[0] - 30.0)) + 30.0),
(float)(v202 * 0.5) - (float)((float)(*((float *)this + 155) * (float)(v220[1] - 30.0)) + 30.0));
cocos2d::CCPoint::operator*(&v231, v221, 1.0 / *((float *)this + 82));
cocos2d::CCPoint::operator=(v221, &v231);
if ( *((_BYTE *)this + 10614) )
{
*(float *)&v27 = 27.5;
*(float *)&v28 = 55.0;
}
if ( *((_BYTE *)*(this + 519) + 1959) )
{
v32 = v28;
v28 = v27;
v27 = v32;
}
if ( *((_BYTE *)this + 10614) )
v33 = 8.0;
else
v33 = 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v222, v33, 10.0);
if ( v18 )
{
v34 = v223;
v223 = v222;
v222 = v34;
LABEL_66:
v35 = 0;
goto LABEL_67;
}
if ( v199 )
goto LABEL_66;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (PlayerObject *)((char *)*(this + 519) + 2068));
if ( v232 != 105.0
|| *((float *)this + 164) >= *((float *)this + 82)
|| (unsigned __int8)PlayerObject::isFlying(*(this + 519)) == 1 )
{
goto LABEL_66;
}
v35 = v214 <= (float)(v9 - (float)(90.0 / *((float *)this + 82)));
LABEL_67:
v197 = v35;
if ( *((float *)this + 82) != *((float *)this + 164) )
{
v36 = (float)((float)((float)(v5 / v8) * 0.5) - (float)(v7 * 0.5)) + v217;
v217 = v36;
if ( !v35 )
v218 = v218 + (float)((float)((float)(v6 / v8) * 0.5) - (float)(v9 * 0.5));
if ( *((_BYTE *)this + 10614) )
{
if ( v18 )
{
v175 = *((float *)this + 139);
if ( v175 != 0.0 && *((float *)this + 119) == 0.0 )
{
v176 = *((float *)this + 137);
v177 = v176 / v175;
if ( v177 <= 1.0 )
{
if ( (v178 = v212 * v177, v176 >= 0.0) && v178 >= 0.0 || v176 < 0.0 && v178 < 0.0 )
{
v179 = v178 - v176;
*((float *)this + 137) = v176 + v179;
v218 = v218 + v179;
}
}
}
}
else
{
v37 = *((float *)this + 138);
if ( v37 != 0.0 && *((float *)this + 118) == 0.0 )
{
v38 = *((float *)this + 136);
v39 = v38 / v37;
if ( v39 <= 1.0 )
{
if ( (v40 = v211 * v39, v38 >= 0.0) && v40 >= 0.0 || v38 < 0.0 && v40 < 0.0 )
{
v156 = v40 - v38;
*((float *)this + 136) = v38 + v156;
v217 = v36 + v156;
}
}
}
}
}
}
v41 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v224, (const cocos2d::CCPoint *)&v217);
v196 = (char *)this + 10614;
while ( 1 )
{
v42 = v41 == 1 ? v9 : v7;
v43 = v42 * 0.5;
if ( v41 )
{
PlayerObject::getYVelocity(*(this + 519));
if ( *((float *)this + 119) != 0.0 )
{
v44 = *((float *)this + 115);
LABEL_89:
v45 = v44 != 0.0;
if ( v41 )
v46 = *((float *)this + 129);
else
v46 = *((float *)this + 128);
v47 = v46 != 0.0;
if ( !v45 && v46 == 0.0 )
{
if ( !v41 )
{
v222 = 1.0;
LABEL_119:
v57 = *((float *)this + 96);
LABEL_129:
v63 = v57 - v43;
if ( v41 )
v64 = *((float *)this + 85);
else
v64 = *((float *)this + 84);
v65 = v63 + v64;
LABEL_139:
if ( !v41 )
{
v224 = v65;
goto LABEL_289;
}
v225 = v65;
LABEL_291:
v113 = v206;
goto LABEL_292;
}
v223 = 1.0;
LABEL_121:
v57 = *((float *)this + 97);
if ( *((_BYTE *)this + 688) )
{
v58 = *((float *)this + 99);
v59 = (float)((float)(*((float *)this + 163) * 0.5) / *((float *)this + 82)) + 90.0;
if ( v58 < v59 )
{
v60 = *((float *)this + 95);
v61 = v59 - v58;
if ( v58 == v60 )
v62 = 0.0;
else
v62 = v58 - v57;
if ( v58 != v60 )
v62 = v62 / (float)(v58 - v60);
v57 = v57 + (float)(v61 * (float)(1.0 - v62));
}
}
goto LABEL_129;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v227);
if ( v45 )
{
if ( v41 )
v48 = *((float *)this + 117);
else
v48 = *((float *)this + 116);
MainObject = GJBaseGameLayer::tryGetMainObject(this, (int)v48);
(*(void (__fastcall **)(PlayerObject **, int))(*(_DWORD *)MainObject + 680))(&v231, MainObject);
v50 = &v231;
}
else
{
v50 = this + 98;
}
cocos2d::CCPoint::operator=(&v227, v50);
if ( v41 )
{
v53 = *((float *)this + 109);
v52 = v228;
if ( v53 >= 1.0 )
{
*((float *)this + 97) = v228;
goto LABEL_511;
}
if ( v47 )
{
LABEL_109:
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v229,
(float)((float)(*((float *)this + 104) * *((float *)this + 106)) / 3.0) + *((float *)this + 94),
(float)((float)(*((float *)this + 105) * *((float *)this + 107)) / 3.0) + *((float *)this + 95));
if ( v41 )
v54 = *((float *)this + 131);
else
v54 = *((float *)this + 130);
lerp((const cocos2d::CCPoint *)v230, (const cocos2d::CCPoint *)&v227, v229, v54);
if ( v41 )
v55 = *((float *)this + 109);
else
v55 = *((float *)this + 108);
cubicBezier(
(const cocos2d::CCPoint *)&v231,
(const cocos2d::CCPoint *)(this + 94),
(const cocos2d::CCPoint *)v229,
(const cocos2d::CCPoint *)v230,
&v227,
v55);
if ( v41 )
*((float *)this + 97) = v232;
else
*(this + 96) = v231;
if ( !v45 )
goto LABEL_116;
if ( !v41 )
{
LABEL_510:
v192 = *((float *)this + 112);
v193 = *((float *)this + 108);
goto LABEL_513;
}
LABEL_512:
v192 = *((float *)this + 113);
v193 = *((float *)this + 109);
LABEL_513:
if ( (float)(v192 * v193) > 1.0 )
{
if ( v41 )
{
v194 = *((float *)this + 113);
v195 = *((float *)this + 109);
}
else
{
v194 = *((float *)this + 112);
v195 = *((float *)this + 108);
}
v56 = v194 * v195;
goto LABEL_117;
}
LABEL_116:
v56 = 1.0;
LABEL_117:
if ( !v41 )
{
v222 = v56;
goto LABEL_119;
}
v223 = v56;
goto LABEL_121;
}
if ( v53 == *((float *)this + 111) )
{
LABEL_511:
if ( !v45 )
goto LABEL_116;
goto LABEL_512;
}
v181 = *((float *)this + 97);
}
else
{
v51 = *((float *)this + 108);
v52 = v227;
if ( v51 >= 1.0 )
{
*((float *)this + 96) = v227;
goto LABEL_518;
}
if ( v47 )
goto LABEL_109;
if ( v51 == *((float *)this + 110) )
{
LABEL_518:
if ( !v45 )
goto LABEL_116;
goto LABEL_510;
}
v181 = *((float *)this + 96);
}
v182 = v52 - v181;
if ( v41 )
v183 = *((float *)this + 111);
else
v183 = *((float *)this + 110);
v184 = 1.0 - v183;
if ( v41 )
{
v185 = *((float *)this + 109);
v186 = *((float *)this + 111);
}
else
{
v185 = *((float *)this + 108);
v186 = *((float *)this + 110);
}
v187 = v184 / (float)(v185 - v186);
if ( v41 )
v188 = *((float *)this + 97);
else
v188 = *((float *)this + 96);
v189 = v188 + (float)(v182 / v187);
if ( !v41 )
{
v190 = *(this + 108);
*((float *)this + 96) = v189;
*(this + 110) = v190;
goto LABEL_518;
}
v191 = *(this + 109);
*((float *)this + 97) = v189;
*(this + 111) = v191;
goto LABEL_511;
}
}
else if ( *((float *)this + 118) != 0.0 )
{
v44 = *((float *)this + 114);
goto LABEL_89;
}
if ( v41 != 1 )
{
if ( !v18 )
goto LABEL_251;
v67 = v199;
}
else
{
if ( v197 )
{
if ( v41 )
v66 = *((float *)this + 85);
else
v66 = *((float *)this + 84);
v65 = v66 + 0.0;
goto LABEL_139;
}
if ( v18 )
{
LABEL_251:
if ( v41 )
{
v101 = *((float *)this + 150);
v102 = v212;
*((float *)this + 139) = v212;
if ( v101 == 0.0 )
goto LABEL_255;
goto LABEL_265;
}
v99 = *((float *)this + 149);
v100 = v211;
*((float *)this + 138) = v211;
if ( v99 != 0.0 )
{
LABEL_263:
*((float *)this + 136) = v100;
goto LABEL_408;
}
LABEL_255:
if ( *((float *)this + 82) == *((float *)this + 164) )
goto LABEL_266;
if ( v41 )
{
if ( *((float *)this + 137) == *((float *)this + 141) )
goto LABEL_260;
}
else
{
if ( *((float *)this + 136) != *((float *)this + 140) )
{
LABEL_267:
v103 = *((float *)this + 136);
if ( v211 > v103 )
{
v104 = v215;
goto LABEL_271;
}
v103 = *((float *)this + 136);
v109 = v215;
LABEL_279:
v110 = v103 - fabsf(v109);
if ( !v41 )
{
v106 = v211;
if ( v110 >= v211 )
{
v111 = *((float *)this + 136);
v112 = v215;
goto LABEL_284;
}
LABEL_286:
*((float *)this + 136) = v106;
LABEL_408:
v157 = v209;
LABEL_409:
if ( v157 == 0.0 )
{
if ( v41 )
goto LABEL_415;
LABEL_414:
v158 = v213;
}
else
{
if ( !v41 )
{
*((float *)this + 136) = v211;
goto LABEL_414;
}
*((float *)this + 137) = v212;
LABEL_415:
v158 = v214;
}
v159 = v158 - v43;
if ( v41 )
v160 = *((float *)this + 137);
else
v160 = *((float *)this + 136);
v161 = v159 + v160;
if ( v41 )
v162 = *((float *)this + 85);
else
v162 = *((float *)this + 84);
v163 = v161 + v162;
if ( !v41 )
{
v224 = v163;
goto LABEL_289;
}
v225 = v163;
goto LABEL_291;
}
v106 = v212;
if ( v110 >= v212 )
{
v111 = *((float *)this + 137);
v112 = v216;
LABEL_284:
v106 = v111 - fabsf(v112);
goto LABEL_285;
}
goto LABEL_287;
}
LABEL_260:
if ( *((unsigned __int8 *)this + 1005) == v198 )
{
if ( !v41 )
{
v100 = v211;
goto LABEL_263;
}
v102 = v212;
LABEL_265:
*((float *)this + 137) = v102;
LABEL_424:
v157 = v210;
goto LABEL_409;
}
LABEL_266:
if ( !v41 )
goto LABEL_267;
}
v103 = *((float *)this + 137);
if ( v212 <= v103 )
{
v109 = v216;
goto LABEL_279;
}
v104 = v216;
LABEL_271:
v105 = v103 + fabsf(v104);
if ( v41 )
{
v106 = v212;
if ( v105 > v212 )
goto LABEL_287;
v107 = *((float *)this + 137);
v108 = v216;
}
else
{
v106 = v211;
if ( v105 > v211 )
goto LABEL_286;
v107 = *((float *)this + 136);
v108 = v215;
}
v106 = v107 + fabsf(v108);
LABEL_285:
if ( !v41 )
goto LABEL_286;
LABEL_287:
*((float *)this + 137) = v106;
goto LABEL_424;
}
v67 = v199 ^ 1;
}
if ( v200 )
{
if ( !v41 )
{
v69 = *(float *)&v27;
v68 = *(float *)&v28;
goto LABEL_155;
}
v68 = *(float *)&v27;
v70 = *(float *)&v28;
}
else
{
if ( v41 )
v68 = v221[1];
else
v68 = v221[0];
if ( !v41 )
{
v222 = *((float *)this + 156);
v69 = v68;
LABEL_155:
v71 = v213;
v70 = v68;
v72 = *((float *)this + 84);
v68 = v69;
goto LABEL_158;
}
v223 = *((float *)this + 156);
v70 = v68;
}
v71 = v214;
v72 = *((float *)this + 85);
LABEL_158:
v73 = v71 + v72;
if ( v41 )
v74 = v218;
else
v74 = v217;
if ( v73 <= (float)((float)(v74 + v43) + v70) )
{
if ( v41 )
{
v80 = v214;
v81 = *((float *)this + 85);
}
else
{
v80 = v213;
v81 = *((float *)this + 84);
}
v82 = v80 + v81;
if ( v41 )
v83 = v218;
else
v83 = v217;
if ( v82 >= (float)((float)(v83 + v43) - v68) )
{
v79 = 0;
}
else
{
if ( v41 )
v84 = v214;
else
v84 = v213;
v85 = (float)(v84 - v43) + v68;
if ( v41 )
v86 = *((float *)this + 85);
else
v86 = *((float *)this + 84);
v87 = v85 + v86;
if ( v41 )
v225 = v87;
else
v224 = v87;
v79 = v67;
}
}
else
{
if ( v41 )
v75 = v214;
else
v75 = v213;
v76 = (float)(v75 - v43) - v70;
if ( v41 )
v77 = *((float *)this + 85);
else
v77 = *((float *)this + 84);
v78 = v76 + v77;
if ( v41 )
v225 = v78;
else
v224 = v78;
v79 = v67 ^ 1;
}
if ( !*v196 || !v200 )
goto LABEL_288;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (PlayerObject *)((char *)*(this + 519) + 2068));
if ( v41 )
{
v88 = v232;
v89 = *((float *)this + 85);
if ( v79 )
goto LABEL_226;
}
else
{
v88 = *(float *)&v231;
v89 = *((float *)this + 84);
if ( v79 )
goto LABEL_225;
}
v90 = (float)(v88 - v43) + v89;
if ( v67 )
{
if ( !v41 )
{
if ( v90 <= v224 || v217 >= v90 || v213 < v88 )
goto LABEL_225;
goto LABEL_223;
}
if ( v90 > v225 && v218 < v90 && v214 >= v88 )
goto LABEL_224;
}
else
{
if ( !v41 )
{
if ( v90 >= v224 || v217 <= v90 || v213 > v88 )
goto LABEL_225;
LABEL_223:
v224 = v90;
v222 = 30.0;
LABEL_225:
v91 = v224;
v92 = v217;
goto LABEL_227;
}
if ( v90 < v225 && v218 > v90 && v214 <= v88 )
{
LABEL_224:
v225 = v90;
v223 = 30.0;
}
}
LABEL_226:
v91 = v225;
v92 = v218;
LABEL_227:
v93 = fabsf(v91 - v92);
v94 = v41 ? v223 : v222;
v95 = 30.0 - (float)((float)(v93 / 100.0) * 20.0);
if ( v95 < 30.0 )
{
if ( v94 < v95 )
goto LABEL_239;
}
else if ( v94 < 30.0 )
{
if ( v95 >= 30.0 )
v95 = 30.0;
LABEL_239:
if ( !v41 )
goto LABEL_240;
goto LABEL_241;
}
if ( !v41 )
{
v95 = v222;
LABEL_240:
v222 = v95;
v96 = *((float *)this + 247);
goto LABEL_242;
}
v95 = v223;
LABEL_241:
v223 = v95;
v96 = *((float *)this + 248);
LABEL_242:
if ( v95 < v96 )
{
if ( v41 )
{
v97 = *((float *)this + 248);
v98 = v223;
if ( a2 <= 0.0 )
{
v180 = v97 + (float)((float)(v223 - v97) / 10.0);
LABEL_250:
v223 = v180;
goto LABEL_291;
}
}
else
{
v97 = *((float *)this + 247);
v98 = v222;
if ( a2 <= 0.0 )
{
v180 = v97 + (float)((float)(v222 - v97) / 10.0);
LABEL_248:
v222 = v180;
goto LABEL_289;
}
}
v180 = v97 + (float)((float)(v98 - v97) / (float)(10.0 / a2));
if ( v41 )
goto LABEL_250;
goto LABEL_248;
}
LABEL_288:
if ( v41 )
goto LABEL_291;
LABEL_289:
v113 = v205;
LABEL_292:
if ( v113 == -99999.0 )
goto LABEL_305;
if ( v41 )
{
if ( v225 > v206 )
v225 = v206;
v114 = v204[1];
}
else
{
if ( v224 > v205 )
v224 = v205;
v114 = v204[0];
}
if ( (v114 > 0.0 || *v196)
&& (v41 ? (v115 = v225, v116 = v206) : (v115 = v224, v116 = v205), v115 > (float)(v116 - 60.0)) )
{
if ( v41 )
{
v118 = v225;
if ( v225 < *((float *)this + 89) && v225 < v218 )
goto LABEL_310;
v164 = v223;
if ( v223 >= 24.0 || v223 == 1.0 && *((float *)this + 119) != 0.0 )
goto LABEL_310;
v165 = v206;
}
else
{
v118 = v224;
if ( v224 < *((float *)this + 88) && v224 < v217 )
goto LABEL_306;
v164 = v222;
if ( v222 >= 24.0 || v222 == 1.0 && *((float *)this + 118) != 0.0 )
goto LABEL_306;
v165 = v205;
}
v166 = 1.0 - (float)((float)(v165 - v118) / 60.0);
if ( v41 )
v167 = v223;
else
v167 = v222;
v168 = v164 + (float)(v166 * (float)(24.0 - v167));
if ( v41 )
{
v223 = v168;
LABEL_310:
v117 = v208;
goto LABEL_311;
}
v222 = v168;
}
else
{
LABEL_305:
if ( v41 )
goto LABEL_310;
}
LABEL_306:
v117 = v207;
LABEL_311:
if ( v117 == -99999.0 )
goto LABEL_324;
if ( v41 )
{
if ( v225 < v208 )
v225 = v208;
v119 = v203[1];
}
else
{
if ( v224 < v207 )
v224 = v207;
v119 = v203[0];
}
if ( v119 <= 0.0 && !*v196 )
goto LABEL_324;
if ( v41 )
{
v120 = v225;
v121 = v208;
}
else
{
v120 = v224;
v121 = v207;
}
if ( v120 >= (float)(v121 + 60.0) )
goto LABEL_324;
if ( v41 )
break;
v169 = v224;
if ( v224 <= *((float *)this + 88) || v224 <= v217 )
{
v170 = v222;
if ( v222 < 24.0 && (v222 != 1.0 || *((float *)this + 118) == 0.0) )
{
v171 = v207;
goto LABEL_472;
}
}
LABEL_325:
v41 = 1;
}
v169 = v225;
if ( v225 > *((float *)this + 89) && v225 > v218 )
goto LABEL_324;
v170 = v223;
if ( v223 >= 24.0 || v223 == 1.0 && *((float *)this + 119) != 0.0 )
goto LABEL_324;
v171 = v208;
LABEL_472:
v172 = 1.0 - (float)((float)(v169 - v171) / 60.0);
if ( v41 )
v173 = v223;
else
v173 = v222;
v174 = v170 + (float)(v172 * (float)(24.0 - v173));
if ( !v41 )
{
v222 = v174;
goto LABEL_325;
}
v223 = v174;
LABEL_324:
if ( !v41 )
goto LABEL_325;
cocos2d::CCPoint::operator=(this + 88, &v224);
if ( v210 == 0.0 )
{
v122 = *((float *)this + 246);
if ( v122 > 0.0 )
{
v223 = 30.0;
*((float *)this + 246) = v122 - (float)(a2 / 60.0);
}
}
else
{
v223 = 1.0;
*(this + 246) = nullptr;
}
if ( v209 != 0.0 )
v222 = 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, (const cocos2d::CCPoint *)&v205);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (const cocos2d::CCPoint *)&v207);
limitCamera(&v224, v230, (float *)&v231);
v123 = v222;
v124 = v224;
if ( v222 > 1.0 )
{
if ( a2 > 0.0 )
v123 = v222 / a2;
v124 = v217 + (float)((float)(v224 - v217) / v123);
}
v125 = v223;
v217 = v124;
v126 = v225;
if ( v223 > 1.0 )
{
if ( a2 > 0.0 )
v125 = v223 / a2;
v126 = v218 + (float)((float)(v225 - v218) / v125);
}
v218 = v126;
cocos2d::CCPoint::operator=(this + 247, &v222);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, (const cocos2d::CCPoint *)&v205);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (const cocos2d::CCPoint *)&v207);
limitCamera(&v217, v230, (float *)&v231);
v127 = *((float *)this + 215);
if ( v127 == 1.0 )
{
if ( *((float *)this + 2700) != -1.0 )
*((_BYTE *)this + 10828) = 1;
*((float *)this + 2700) = -1.0;
(*((void (__fastcall **)(PlayerObject **, int))*this + 192))(this, 1);
}
else if ( v127 == 0.0 )
{
if ( *((float *)this + 2700) != 1.0 )
*((_BYTE *)this + 10828) = 1;
*((float *)this + 2700) = 1.0;
(*((void (__fastcall **)(PlayerObject **, _DWORD))*this + 192))(this, 0);
}
cocos2d::CCPoint::operator-(v226, this + 249, &v217);
v128 = 0;
if ( *((float *)this + 120) != 0.0 )
{
v129 = *((float *)this + 122);
v130 = *(float *)v226;
*(this + 120) = nullptr;
*((float *)this + 100) = v130;
if ( v129 > 0.0 )
{
if ( *((float *)this + 128) != 0.0 )
goto LABEL_351;
v143 = (GJGameState *)(this + 82);
v142 = *((float *)this + 126);
v144 = 12;
goto LABEL_377;
}
goto LABEL_368;
}
while ( 2 )
{
v139 = *((float *)this + 118);
LABEL_363:
v140 = 0.0;
if ( v139 == 0.0 )
{
if ( v128 )
{
if ( *((float *)this + 129) != 0.0 )
{
if ( *((float *)this + 109) < 1.0 )
goto LABEL_386;
*(this + 129) = nullptr;
goto LABEL_398;
}
}
else
{
if ( *((float *)this + 128) == 0.0 )
{
LABEL_366:
v128 = 1;
if ( *((float *)this + 121) != 0.0 )
{
v129 = *((float *)this + 123);
v130 = *(float *)&v226[1];
*(this + 121) = nullptr;
*((float *)this + 101) = v130;
if ( v129 > 0.0 )
{
if ( *((float *)this + 129) == 0.0 )
{
v142 = *((float *)this + 127);
v143 = (GJGameState *)(this + 82);
v144 = 13;
LABEL_377:
v145 = (int)v142;
if ( v128 )
v146 = *((float *)this + 125);
else
v146 = *((float *)this + 124);
GJGameState::tweenValue(v143, v130, 0.0, v144, v129, v145, v146, -1, -1);
}
else
{
LABEL_351:
if ( v128 )
v131 = 13;
else
v131 = 12;
GJGameState::stopTweenAction((unsigned int)(this + 82), v131);
if ( v128 )
{
v136 = *(this + 101);
*(this + 109) = nullptr;
v133 = *((float *)this + 123);
*(this + 133) = v136;
v134 = 22;
v135 = *((float *)this + 127);
}
else
{
v132 = *(this + 100);
*(this + 108) = nullptr;
v133 = *((float *)this + 122);
*(this + 132) = v132;
v134 = 21;
v135 = *((float *)this + 126);
}
v137 = (int)v135;
if ( v128 )
v138 = *((float *)this + 125);
else
v138 = *((float *)this + 124);
GJGameState::tweenValue((GJGameState *)(this + 82), 0.0, 1.0, v134, v133, v137, v138, -1, -1);
}
if ( !v128 )
continue;
}
else
{
LABEL_368:
if ( v128 )
v141 = 13;
else
v141 = 12;
GJGameState::stopTweenAction((unsigned int)(this + 82), v141);
if ( !v128 )
{
*(this + 100) = nullptr;
continue;
}
*(this + 101) = nullptr;
}
}
v139 = *((float *)this + 119);
goto LABEL_363;
}
if ( *((float *)this + 108) >= 1.0 )
{
*(this + 128) = nullptr;
goto LABEL_396;
}
LABEL_386:
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v229,
(float)((float)(*((float *)this + 104) * *((float *)this + 122)) / 3.0) + *((float *)this + 132),
(float)((float)(*((float *)this + 105) * *((float *)this + 123)) / 3.0) + *((float *)this + 133));
if ( v128 )
v147 = *((float *)this + 131);
else
v147 = *((float *)this + 130);
lerp((const cocos2d::CCPoint *)v230, (const cocos2d::CCPoint *)flt_D2C400, v229, v147);
if ( v128 )
v148 = *((float *)this + 109);
else
v148 = *((float *)this + 108);
cubicBezier(
(const cocos2d::CCPoint *)&v231,
(const cocos2d::CCPoint *)(this + 132),
(const cocos2d::CCPoint *)v229,
(const cocos2d::CCPoint *)v230,
flt_D2C400,
v148);
if ( !v128 )
{
v140 = *(float *)&v231;
LABEL_396:
*((float *)this + 100) = v140;
goto LABEL_366;
}
v140 = v232;
LABEL_398:
*((float *)this + 101) = v140;
}
}
break;
}
if ( !v128 )
goto LABEL_366;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v227, (const cocos2d::CCPoint *)&v217);
cocos2d::CCPoint::operator+(&v231, &v217, this + 100);
cocos2d::CCPoint::operator=(&v217, &v231);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, (const cocos2d::CCPoint *)&v205);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (const cocos2d::CCPoint *)&v207);
limitCamera(&v217, v230, (float *)&v231);
cocos2d::CCPoint::operator-(&v231, &v217, &v227);
cocos2d::CCPoint::operator=(this + 102, &v231);
cocos2d::CCPoint::operator=(this + 212, &v217);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v229, (const cocos2d::CCPoint *)(this + 212));
if ( *((_BYTE *)this + 1013) )
GJBaseGameLayer::applyShake((int)this, v229);
v149 = (int)*(this + 609);
v150 = *((float *)this + 2700);
if ( v150 == -1.0 )
v7 = (float)-v229[0] - v7;
v151 = v150 * *((float *)this + 82);
if ( v150 == -1.0 )
v229[0] = v7;
(*(void (__fastcall **)(int, float))(*(_DWORD *)v149 + 64))(v149, COERCE_FLOAT(LODWORD(v151)));
(*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 609) + 72))(*(this + 609), *(this + 82));
v152 = (int)*(this + 609);
v153 = *(void (__fastcall **)(int, PlayerObject **))(*(_DWORD *)v152 + 92);
cocos2d::CCPoint::operator-(v230, v229);
cocos2d::CCPoint::operator*(&v231, v230, *(this + 82));
v153(v152, &v231);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v231, (const cocos2d::CCPoint *)(this + 212));
GJBaseGameLayer::updateCameraBGArt((int)this, (int)&v231, *((float *)this + 82));
v154 = *(this + 82);
*((_BYTE *)this + 1004) = v18;
*(this + 164) = v154;
*((_BYTE *)this + 1005) = v198;
cocos2d::CCPoint::operator-(v230, this + 212, this + 249);
cocos2d::CCPoint::operator*(&v231, v230, 1131413504);
cocos2d::CCPoint::operator=(this + 92, &v231);
cocos2d::CCPoint::operator=(this + 249, this + 212);
*((float *)this + 168) = (float)(v218 + (float)(v9 * 0.5)) - *((float *)this + 85);
cocos2d::CCPoint::operator=(this + 90, this + 84);
cocos2d::CCPoint::operator=(this + 140, this + 138);
*(this + 149) = nullptr;
*(this + 150) = nullptr;
return GJBaseGameLayer::updateExtraGameLayers((GJBaseGameLayer *)this);
}