//
// GJBaseGameLayer::updateGradientLayers from 0x590cfc to 0x591d5c (4192 bytes)
//
// 6 xrefs:
// > PlayLayer::resetLevel @ 0x4128fc
// > LevelEditorLayer::updateArt @ 0x45fe22
// > LevelEditorLayer::onPlaytest @ 0x468524
// > LevelEditorLayer::updateEditor @ 0x4732c0
// > GJBaseGameLayer::update @ 0x5bd806
// > GJBaseGameLayer::update @ 0x5be348
//
// 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:06 +0000
//
int __fastcall GJBaseGameLayer::updateGradientLayers(GJEffectManager **this)
{
float v2; // s16
int v3; // r0
float v4; // s15
float v5; // s17
int result; // r0
int v7; // r3
int v8; // r4
_DWORD *v9; // r4
int v10; // r8
int v11; // r3
float v12; // r0
float v13; // s16
int active; // r0
int v15; // r1
char v16; // r3
GJEffectManager *v17; // r0
int v18; // r0
int MainColor; // r0
int v20; // r0
int SecondaryColor; // r0
float v22; // s17
float v23; // s16
float v24; // s19
float v25; // r7
float v26; // r0
int MainObject; // r7
int v28; // r6
int v29; // r10
int v30; // r11
void (__fastcall *v31)(_DWORD *, int); // r9
int v32; // r0
bool v33; // fnf
int v34; // r0
int v35; // r0
int v36; // r0
int v37; // r0
float v38; // s8
float v39; // s15
float v40; // s15
float v41; // s15
float v42; // s9
float v43; // s7
float v44; // s7
float v45; // s7
float v46; // s7
float v47; // s8
float v48; // s14
float v49; // s14
float v50; // s15
int v51; // r0
int v52; // r0
int v53; // r0
int v54; // r0
int v55; // r0
int v56; // r0
int v57; // r0
int v58; // r0
float v59; // s8
float v60; // s15
float v61; // s15
float v62; // s15
float v63; // s7
float v64; // s7
float v65; // s7
float v66; // s7
float v67; // s8
float v68; // s14
float v69; // s14
int v71; // r3
int v72; // r2
int v73; // r0
int v74; // [sp+Ch] [bp-40h]
__int16 v75; // [sp+3Ch] [bp-10h] BYREF
unsigned __int8 v76; // [sp+3Eh] [bp-Eh]
__int16 v77; // [sp+40h] [bp-Ch] BYREF
unsigned __int8 v78; // [sp+42h] [bp-Ah]
float v79; // [sp+44h] [bp-8h] BYREF
float v80; // [sp+48h] [bp-4h]
float v81; // [sp+4Ch] [bp+0h] BYREF
float v82; // [sp+50h] [bp+4h]
float v83; // [sp+54h] [bp+8h] BYREF
float v84; // [sp+58h] [bp+Ch]
float v85; // [sp+5Ch] [bp+10h] BYREF
float v86; // [sp+60h] [bp+14h]
_BYTE v87[8]; // [sp+64h] [bp+18h] BYREF
float v88; // [sp+6Ch] [bp+20h] BYREF
float v89; // [sp+70h] [bp+24h]
float v90; // [sp+74h] [bp+28h] BYREF
float v91; // [sp+78h] [bp+2Ch]
float v92[2]; // [sp+7Ch] [bp+30h] BYREF
float v93[2]; // [sp+84h] [bp+38h] BYREF
_BYTE v94[8]; // [sp+8Ch] [bp+40h] BYREF
_BYTE v95[8]; // [sp+94h] [bp+48h] BYREF
_BYTE v96[8]; // [sp+9Ch] [bp+50h] BYREF
float v97; // [sp+A4h] [bp+58h] BYREF
float v98; // [sp+A8h] [bp+5Ch]
float v99; // [sp+ACh] [bp+60h] BYREF
float v100; // [sp+B0h] [bp+64h]
float v101; // [sp+B4h] [bp+68h] BYREF
float v102; // [sp+B8h] [bp+6Ch]
float v103; // [sp+BCh] [bp+70h] BYREF
float v104; // [sp+C0h] [bp+74h]
_BYTE v105[8]; // [sp+C4h] [bp+78h] BYREF
_BYTE v106[8]; // [sp+CCh] [bp+80h] BYREF
float v107; // [sp+D4h] [bp+88h] BYREF
float v108; // [sp+D8h] [bp+8Ch]
float v109; // [sp+DCh] [bp+90h] BYREF
float v110; // [sp+E0h] [bp+94h]
_DWORD v111[2]; // [sp+E4h] [bp+98h] BYREF
_DWORD v112[2]; // [sp+ECh] [bp+A0h] BYREF
float v113; // [sp+F4h] [bp+A8h] BYREF
float v114; // [sp+F8h] [bp+ACh]
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v79);
v2 = 1.0 / COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609)));
v3 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, v3, LODWORD(v2));
cocos2d::CCPoint::operator-(&v81, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, v79, v80);
cocos2d::CCPoint::operator*(&v113, v112, LODWORD(v2));
cocos2d::CCPoint::operator+(&v83, &v81, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, v79, v80);
cocos2d::CCPoint::operator*(&v113, v112, LODWORD(v2));
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v85, (const cocos2d::CCPoint *)&v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, (const cocos2d::CCSize *)&v85);
cocos2d::CCPoint::operator*(&v113, v112, 1056964608);
cocos2d::CCPoint::operator+(v87, &v81, &v113);
v4 = sqrtf((float)(v86 * v86) + (float)(v85 * v85));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v4 * 0.5, v4 * 0.5);
cocos2d::CCPoint::operator-(&v88, v87, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v4 * 0.5, v4 * 0.5);
cocos2d::CCPoint::operator+(&v90, v87, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, (const cocos2d::CCPoint *)&unk_D2C400);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v93, v79, v80);
if ( *((float *)this + 177) != 0.0 )
{
v5 = sqrtf((float)(v80 * v80) + (float)(v79 * v79)) * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, (float)(v79 * 0.5) - v5, (float)(v80 * 0.5) - v5);
cocos2d::CCPoint::operator=(v92, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v5 + (float)(v79 * 0.5), v5 + (float)(v80 * 0.5));
cocos2d::CCPoint::operator=(v93, &v113);
}
v81 = v81 - 20.0;
v82 = v82 - 20.0;
v83 = v83 + 20.0;
v84 = v84 + 20.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, -20.0, -20.0);
result = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v95, v79 + 20.0, v80 + 20.0);
*(this + 2677) = nullptr;
v7 = (int)*(this + 2676);
if ( v7 )
{
v8 = *(_DWORD *)(v7 + 52);
if ( v8 )
v74 = *(_DWORD *)(v8 + 272);
else
v74 = 0;
while ( 1 )
{
if ( !v8 )
return result;
v9 = *(_DWORD **)(v8 + 260);
result = (*(int (__fastcall **)(_DWORD *))(*v9 + 256))(v9);
if ( !result )
goto LABEL_12;
v10 = v9[119];
if ( !v10 )
goto LABEL_12;
if ( *(_DWORD *)(v10 + 1656) != v9[123] )
{
result = (*(int (__fastcall **)(_DWORD *, _DWORD))(*v9 + 264))(v9, 0);
v9[119] = 0;
*((_BYTE *)v9 + 480) = 0;
goto LABEL_12;
}
v12 = COERCE_FLOAT((*((int (__fastcall **)(GJEffectManager **, _DWORD))*this + 151))(this, v9[119]));
v13 = v12;
if ( *((_BYTE *)this + 10612) && *(this + 357) != (GJEffectManager *)((char *)&dword_0 + 1) )
v13 = v12 * *(float *)(v10 + 1680);
active = GJEffectManager::activeColorForIndex(*(this + 381), v9[115]);
v15 = v9[116];
v16 = BYTE1(active);
LOBYTE(v75) = active;
v76 = BYTE2(active);
v17 = *(this + 381);
HIBYTE(v75) = v16;
v18 = GJEffectManager::activeColorForIndex(v17, v15);
v77 = v18;
v78 = BYTE2(v18);
MainColor = GameObject::getMainColor((GameObject *)v10);
if ( MainColor
&& (*(float *)(MainColor + 16) != flt_D2C408
|| *(float *)(MainColor + 20) != flt_D2C40C
|| *(float *)(MainColor + 24) != flt_D2C410
|| *(unsigned __int16 *)(MainColor + 28) != (unsigned __int16)word_D2C414) )
{
v20 = GameToolbox::transformColor(
(unsigned __int8 *)&v75,
*(float *)(MainColor + 16),
*(float *)(MainColor + 20),
*(float *)(MainColor + 24),
*(_DWORD *)(MainColor + 28));
v75 = v20;
v76 = BYTE2(v20);
}
SecondaryColor = GameObject::getSecondaryColor((GameObject *)v10);
if ( SecondaryColor
&& (*(float *)(SecondaryColor + 16) != flt_D2C408
|| *(float *)(SecondaryColor + 20) != flt_D2C40C
|| *(float *)(SecondaryColor + 24) != flt_D2C410
|| *(unsigned __int16 *)(SecondaryColor + 28) != (unsigned __int16)word_D2C414) )
{
v73 = GameToolbox::transformColor(
(unsigned __int8 *)&v77,
*(float *)(SecondaryColor + 16),
*(float *)(SecondaryColor + 20),
*(float *)(SecondaryColor + 24),
*(_DWORD *)(SecondaryColor + 28));
v77 = v73;
v78 = BYTE2(v73);
}
v22 = (float)(COERCE_FLOAT(GJEffectManager::activeOpacityForIndex(*(this + 381), v9[115])) * 255.0) * v13;
v23 = (float)(COERCE_FLOAT(GJEffectManager::activeOpacityForIndex(*(this + 381), v9[116])) * 255.0) * v13;
if ( v22 == 0.0 && v23 == 0.0
|| v9[121] == 1
&& !(_BYTE)v75
&& __PAIR16__(HIBYTE(v75), 0) == v76
&& !(_BYTE)v77
&& __PAIR16__(HIBYTE(v77), 0) == v78 )
{
LABEL_255:
result = (*(int (__fastcall **)(_DWORD *, _DWORD))(*v9 + 172))(v9, 0);
goto LABEL_12;
}
v24 = -(float)((*(float (__fastcall **)(int))(*(_DWORD *)v10 + 184))(v10) * 0.017453);
v25 = cosf(v24);
v26 = sinf(v24);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, v25, v26);
cocos2d::CCPoint::operator=(v9 + 117, v96);
MainObject = GJBaseGameLayer::tryGetMainObject(this, *(_DWORD *)(v10 + 1660));
v28 = GJBaseGameLayer::tryGetMainObject(this, *(_DWORD *)(v10 + 1664));
v29 = GJBaseGameLayer::tryGetMainObject(this, *(_DWORD *)(v10 + 1668));
v30 = GJBaseGameLayer::tryGetMainObject(this, *(_DWORD *)(v10 + 1672));
if ( !*(_BYTE *)(v10 + 1676) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v111, (const cocos2d::CCPoint *)&unk_D2C400);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v112, (const cocos2d::CCPoint *)&unk_D2C400);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, (const cocos2d::CCPoint *)&unk_D2C400);
cocos2d::CCLayerColor::setVertices(v9, v111, v112, &v113);
v31 = *(void (__fastcall **)(_DWORD *, int))(*v9 + 160);
v32 = (*(int (__fastcall **)(_DWORD *))(*v9 + 164))(v9);
v31(v9, v32);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v107);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v109);
if ( *((_BYTE *)v9 + 480) )
{
cocos2d::CCPoint::operator=(&v107, &v81);
cocos2d::CCPoint::operator=(&v109, &v83);
if ( v28 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v28 + 680))(&v113, v28);
v108 = v114;
}
if ( v29 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v29 + 680))(&v113, v29);
v107 = v113;
}
if ( MainObject )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)MainObject + 680))(&v113, MainObject);
v110 = v114;
}
if ( v30 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v30 + 680))(&v113, v30);
v109 = v113;
}
(*(void (__fastcall **)(_DWORD *, float *))(*v9 + 92))(v9, &v107);
(*(void (__fastcall **)(_DWORD *, _DWORD))(*v9 + 64))(v9, (float)(v109 - v107) / v79);
(*(void (__fastcall **)(_DWORD *, _DWORD))(*v9 + 72))(v9, (float)(v110 - v108) / v80);
if ( v107 > v90 || v108 > v91 || v109 < v88 )
goto LABEL_255;
v33 = v110 < v89;
}
else
{
cocos2d::CCPoint::operator=(&v107, v94);
cocos2d::CCPoint::operator=(&v109, v95);
if ( v28 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v28 + 680))(&v113, v28);
v108 = v114;
}
if ( v29 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v29 + 680))(&v113, v29);
v107 = v113;
}
if ( MainObject )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)MainObject + 680))(&v113, MainObject);
v110 = v114;
}
if ( v30 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v30 + 680))(&v113, v30);
v109 = v113;
}
v34 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v107, v34);
v35 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(v111, &v113, v35);
v36 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v109, v36);
v37 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(v112, &v113, v37);
if ( v28 )
v108 = *(float *)&v111[1];
if ( v29 )
v107 = *(float *)v111;
if ( MainObject )
v110 = *(float *)&v112[1];
if ( v30 )
v109 = *(float *)v112;
(*(void (__fastcall **)(_DWORD *, float *))(*v9 + 92))(v9, &v107);
(*(void (__fastcall **)(_DWORD *, _DWORD))(*v9 + 64))(v9, (float)(v109 - v107) / v79);
(*(void (__fastcall **)(_DWORD *, _DWORD))(*v9 + 72))(v9, (float)(v110 - v108) / v80);
if ( v107 > v79 || v108 > v80 || v109 < 0.0 )
goto LABEL_255;
v33 = v110 < 0.0;
}
goto LABEL_241;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v97);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v103);
if ( !*((_BYTE *)v9 + 480) )
{
cocos2d::CCPoint::operator=(&v97, v94);
cocos2d::CCPoint::operator=(&v99, v95);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v97, v100);
cocos2d::CCPoint::operator=(&v101, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v99, v98);
cocos2d::CCPoint::operator=(&v103, &v113);
if ( MainObject )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)MainObject + 680))(&v113, MainObject);
cocos2d::CCPoint::operator=(&v97, &v113);
}
if ( v28 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v28 + 680))(&v113, v28);
cocos2d::CCPoint::operator=(&v103, &v113);
}
if ( v29 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v29 + 680))(&v113, v29);
cocos2d::CCPoint::operator=(&v101, &v113);
}
if ( v30 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v30 + 680))(&v113, v30);
cocos2d::CCPoint::operator=(&v99, &v113);
}
v51 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v97, v51);
v52 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(v105, &v113, v52);
v53 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v103, v53);
v54 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(v106, &v113, v54);
v55 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v99, v55);
v56 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(&v107, &v113, v56);
v57 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 84))(*(this + 609));
cocos2d::CCPoint::operator*(&v113, &v101, v57);
v58 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 609) + 96))(*(this + 609));
cocos2d::CCPoint::operator+(&v109, &v113, v58);
if ( MainObject )
cocos2d::CCPoint::operator=(&v97, v105);
if ( v28 )
cocos2d::CCPoint::operator=(&v103, v106);
if ( v29 )
cocos2d::CCPoint::operator=(&v101, &v109);
if ( v30 )
cocos2d::CCPoint::operator=(&v99, &v107);
(*(void (__fastcall **)(_DWORD *, int))(*v9 + 80))(v9, 1065353216);
(*(void (__fastcall **)(_DWORD *, float *))(*v9 + 92))(v9, &v97);
cocos2d::CCPoint::operator-(v111, &v103, &v97);
cocos2d::CCPoint::operator-(v112, &v101, &v97);
cocos2d::CCPoint::operator-(&v113, &v99, &v97);
cocos2d::CCLayerColor::setVertices(v9, v111, v112, &v113);
v59 = v97;
if ( v101 > v99 )
{
if ( v103 > v99 )
goto LABEL_178;
}
else if ( v103 > v101 )
{
if ( v101 <= v99 )
{
v60 = v101;
goto LABEL_174;
}
LABEL_178:
if ( v97 > v99 )
{
v61 = v99;
goto LABEL_180;
}
LABEL_259:
v62 = v97;
goto LABEL_185;
}
v60 = v103;
LABEL_174:
if ( v97 <= v60 )
goto LABEL_259;
if ( v101 > v99 )
v61 = v99;
else
v61 = v101;
LABEL_180:
if ( v103 <= v61 )
{
v62 = v103;
}
else if ( v101 > v99 )
{
v62 = v99;
}
else
{
v62 = v101;
}
LABEL_185:
if ( v62 > v93[0] )
goto LABEL_255;
v42 = v98;
if ( v102 > v100 )
{
if ( v104 > v100 )
goto LABEL_196;
}
else if ( v104 > v102 )
{
if ( v102 <= v100 )
{
v63 = v102;
goto LABEL_192;
}
LABEL_196:
if ( v98 > v100 )
{
v64 = v100;
goto LABEL_198;
}
LABEL_260:
v65 = v98;
goto LABEL_203;
}
v63 = v104;
LABEL_192:
if ( v98 <= v63 )
goto LABEL_260;
if ( v102 > v100 )
v64 = v100;
else
v64 = v102;
LABEL_198:
if ( v104 <= v64 )
{
v65 = v104;
}
else if ( v102 > v100 )
{
v65 = v100;
}
else
{
v65 = v102;
}
LABEL_203:
if ( v65 > v93[1] )
goto LABEL_255;
if ( v101 < v99 )
{
if ( v103 < v99 )
goto LABEL_214;
}
else if ( v103 < v101 )
{
if ( v101 >= v99 )
{
v66 = v101;
goto LABEL_210;
}
LABEL_214:
if ( v97 < v99 )
{
v67 = v99;
goto LABEL_216;
}
goto LABEL_221;
}
v66 = v103;
LABEL_210:
if ( v97 < v66 )
{
if ( v101 < v99 )
v67 = v99;
else
v67 = v101;
LABEL_216:
if ( v103 >= v67 )
{
v59 = v103;
}
else if ( v101 < v99 )
{
v59 = v99;
}
else
{
v59 = v101;
}
}
LABEL_221:
if ( v59 < v92[0] )
goto LABEL_255;
if ( v102 < v100 )
{
if ( v104 < v100 )
goto LABEL_232;
}
else if ( v104 < v102 )
{
if ( v102 >= v100 )
{
v68 = v102;
goto LABEL_228;
}
LABEL_232:
if ( v98 < v100 )
{
v69 = v100;
goto LABEL_234;
}
goto LABEL_239;
}
v68 = v104;
LABEL_228:
if ( v98 < v68 )
{
if ( v102 < v100 )
v69 = v100;
else
v69 = v102;
LABEL_234:
if ( v104 >= v69 )
{
v42 = v104;
}
else if ( v102 < v100 )
{
v42 = v100;
}
else
{
v42 = v102;
}
}
LABEL_239:
v50 = v92[1];
goto LABEL_240;
}
cocos2d::CCPoint::operator=(&v97, &v81);
cocos2d::CCPoint::operator=(&v99, &v83);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v97, v100);
cocos2d::CCPoint::operator=(&v101, &v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v99, v98);
cocos2d::CCPoint::operator=(&v103, &v113);
if ( MainObject )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)MainObject + 680))(&v113, MainObject);
cocos2d::CCPoint::operator=(&v97, &v113);
}
if ( v28 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v28 + 680))(&v113, v28);
cocos2d::CCPoint::operator=(&v103, &v113);
}
if ( v29 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v29 + 680))(&v113, v29);
cocos2d::CCPoint::operator=(&v101, &v113);
}
if ( v30 )
{
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v30 + 680))(&v113, v30);
cocos2d::CCPoint::operator=(&v99, &v113);
}
(*(void (__fastcall **)(_DWORD *, int))(*v9 + 80))(v9, 1065353216);
(*(void (__fastcall **)(_DWORD *, float *))(*v9 + 92))(v9, &v97);
cocos2d::CCPoint::operator-(v111, &v103, &v97);
cocos2d::CCPoint::operator-(v112, &v101, &v97);
cocos2d::CCPoint::operator-(&v113, &v99, &v97);
cocos2d::CCLayerColor::setVertices(v9, v111, v112, &v113);
v38 = v97;
if ( v101 > v99 )
{
if ( v103 <= v99 )
{
LABEL_85:
v39 = v103;
goto LABEL_86;
}
}
else
{
if ( v103 <= v101 )
goto LABEL_85;
if ( v101 <= v99 )
{
v39 = v101;
LABEL_86:
if ( v97 <= v39 )
goto LABEL_257;
if ( v101 > v99 )
v40 = v99;
else
v40 = v101;
goto LABEL_92;
}
}
if ( v97 <= v99 )
{
LABEL_257:
v41 = v97;
goto LABEL_97;
}
v40 = v99;
LABEL_92:
if ( v103 <= v40 )
{
v41 = v103;
}
else if ( v101 > v99 )
{
v41 = v99;
}
else
{
v41 = v101;
}
LABEL_97:
if ( v41 > v90 )
goto LABEL_255;
v42 = v98;
if ( v102 > v100 )
{
if ( v104 <= v100 )
{
LABEL_103:
v43 = v104;
goto LABEL_104;
}
}
else
{
if ( v104 <= v102 )
goto LABEL_103;
if ( v102 <= v100 )
{
v43 = v102;
LABEL_104:
if ( v98 <= v43 )
goto LABEL_258;
if ( v102 > v100 )
v44 = v100;
else
v44 = v102;
goto LABEL_110;
}
}
if ( v98 <= v100 )
{
LABEL_258:
v45 = v98;
goto LABEL_115;
}
v44 = v100;
LABEL_110:
if ( v104 <= v44 )
{
v45 = v104;
}
else if ( v102 > v100 )
{
v45 = v100;
}
else
{
v45 = v102;
}
LABEL_115:
if ( v45 > v91 )
goto LABEL_255;
if ( v101 < v99 )
{
if ( v103 >= v99 )
{
LABEL_121:
v46 = v103;
goto LABEL_122;
}
}
else
{
if ( v103 >= v101 )
goto LABEL_121;
if ( v101 >= v99 )
{
v46 = v101;
LABEL_122:
if ( v97 >= v46 )
goto LABEL_133;
if ( v101 < v99 )
v47 = v99;
else
v47 = v101;
goto LABEL_128;
}
}
if ( v97 >= v99 )
goto LABEL_133;
v47 = v99;
LABEL_128:
if ( v103 >= v47 )
{
v38 = v103;
}
else if ( v101 < v99 )
{
v38 = v99;
}
else
{
v38 = v101;
}
LABEL_133:
if ( v38 < v88 )
goto LABEL_255;
if ( v102 < v100 )
{
if ( v104 >= v100 )
{
LABEL_139:
v48 = v104;
LABEL_140:
if ( v98 < v48 )
{
if ( v102 < v100 )
v49 = v100;
else
v49 = v102;
goto LABEL_146;
}
goto LABEL_151;
}
}
else
{
if ( v104 >= v102 )
goto LABEL_139;
if ( v102 >= v100 )
{
v48 = v102;
goto LABEL_140;
}
}
if ( v98 < v100 )
{
v49 = v100;
LABEL_146:
if ( v104 >= v49 )
{
v42 = v104;
}
else if ( v102 < v100 )
{
v42 = v100;
}
else
{
v42 = v102;
}
}
LABEL_151:
v50 = v89;
LABEL_240:
v33 = v42 < v50;
LABEL_241:
if ( v33 )
goto LABEL_255;
cocos2d::CCLayerGradient::setValues(
v9,
&v75,
(unsigned __int8)(unsigned int)v22,
&v77,
(unsigned __int8)(unsigned int)v23,
v9 + 117);
result = (*(int (__fastcall **)(_DWORD *, int))(*v9 + 172))(v9, 1);
*(this + 2677) = (GJEffectManager *)((char *)*(this + 2677) + 1);
if ( v9[121] == 3 )
{
result = (*(int (__fastcall **)(_DWORD *))(*v9 + 256))(v9);
if ( result )
{
v71 = (int)*(this + 2678);
if ( v71 )
{
if ( *(_BYTE *)(v71 + 950) )
{
v72 = v9[122];
if ( *(_DWORD *)(v71 + 940) <= v72 && *(_DWORD *)(v71 + 944) >= v72 && v72 <= 14 )
goto LABEL_255;
}
}
}
}
LABEL_12:
if ( v74 )
v11 = *(_DWORD *)(v74 + 272);
else
v11 = 0;
v8 = v74;
v74 = v11;
}
}
return result;
}