//
// GJBaseGameLayer::updateGradientLayers from 0x471260 to 0x4722c0 (4192 bytes)
//
// 6 xrefs:
// > PlayLayer::resetLevel @ 0x31fd20
// > LevelEditorLayer::updateArt @ 0x365e1a
// > LevelEditorLayer::onPlaytest @ 0x36ecfa
// > LevelEditorLayer::updateEditor @ 0x376336
// > GJBaseGameLayer::update @ 0x4971a4
// > GJBaseGameLayer::update @ 0x497cec
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::updateGradientLayers(GJBaseGameLayer *a1)
{
cocos2d::CCDirector *v2; // r0
float v3; // s16
const cocos2d::CCPoint *v4; // r0
float v5; // s15
float v6; // s17
int v7; // r2
bool v8; // r3
int v9; // r2
bool v10; // r3
cocos2d::CCDictionary *m_gradientLayers; // r3
cocos2d::CCDictElement *m_pElements; // r4
cocos2d::CCObject *m_pObject; // r4
int m_nLuaID; // r8
cocos2d::CCDictElement *v15; // r3
float v16; // r0
float v17; // s16
int v18; // r0
int m_unknown5; // r1
GLubyte v20; // r3
GJEffectManager *m_effectManager; // r0
GJSpriteColor *MainColor; // r0
GJSpriteColor *SecondaryColor; // r0
float v24; // s17
float v25; // s16
float v26; // s19
float v27; // r7
float v28; // r0
int v29; // r2
GameObject *MainObject; // r7
GameObject *v31; // r6
GameObject *v32; // r10
GameObject *v33; // r11
cocos2d::CCPoint v34; // r1
int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r9
int v36; // r0
int v37; // r2
int v38; // r2
bool v39; // r3
bool v40; // fnf
int v41; // r2
bool v42; // r3
int v43; // r0
const cocos2d::CCPoint *v44; // r0
int v45; // r0
const cocos2d::CCPoint *v46; // r0
int v47; // r2
int v48; // r2
bool v49; // r3
int v50; // r2
bool v51; // r3
int v52; // r2
bool v53; // r3
int v54; // r2
bool v55; // r3
int v56; // r2
bool v57; // r3
int v58; // r2
bool v59; // r3
int v60; // r2
bool v61; // r3
cocos2d::CCPoint v62; // r1
float v63; // s8
float v64; // s15
float v65; // s15
float v66; // s15
float y; // s9
float v68; // s7
float v69; // s7
float v70; // s7
float v71; // s7
float v72; // s8
float v73; // s14
float v74; // s14
float v75; // s15
int v76; // r2
bool v77; // r3
int v78; // r2
bool v79; // r3
int v80; // r2
bool v81; // r3
int v82; // r2
bool v83; // r3
int v84; // r2
bool v85; // r3
int v86; // r2
bool v87; // r3
int v88; // r2
bool v89; // r3
int v90; // r0
const cocos2d::CCPoint *v91; // r0
int v92; // r0
const cocos2d::CCPoint *v93; // r0
int v94; // r0
const cocos2d::CCPoint *v95; // r0
int v96; // r0
const cocos2d::CCPoint *v97; // r0
int v98; // r2
bool v99; // r3
cocos2d::CCPoint v100; // r1
float x; // s8
float v102; // s15
float v103; // s15
float v104; // s15
float v105; // s7
float v106; // s7
float v107; // s7
float v108; // s7
float v109; // s8
float v110; // s14
float v111; // s14
ShaderLayer *m_shaderLayer; // r3
int m_uAutoReleaseCount; // r2
float v115; // [sp+0h] [bp-4Ch]
cocos2d::CCPoint v116; // [sp+4h] [bp-48h]
cocos2d::CCDictElement *next; // [sp+Ch] [bp-40h]
cocos2d::ccColor3B v118; // [sp+3Ch] [bp-10h] BYREF
cocos2d::ccColor3B v119; // [sp+40h] [bp-Ch] BYREF
cocos2d::CCSize v120; // [sp+44h] [bp-8h] BYREF
float v121; // [sp+4Ch] [bp+0h] BYREF
float v122; // [sp+50h] [bp+4h]
float v123; // [sp+54h] [bp+8h] BYREF
float v124; // [sp+58h] [bp+Ch]
cocos2d::CCSize v125; // [sp+5Ch] [bp+10h] BYREF
_BYTE v126[8]; // [sp+64h] [bp+18h] BYREF
float v127; // [sp+6Ch] [bp+20h] BYREF
float v128; // [sp+70h] [bp+24h]
float v129; // [sp+74h] [bp+28h] BYREF
float v130; // [sp+78h] [bp+2Ch]
cocos2d::CCPoint v131; // [sp+7Ch] [bp+30h] BYREF
cocos2d::CCPoint v132; // [sp+84h] [bp+38h] BYREF
cocos2d::CCPoint v133; // [sp+8Ch] [bp+40h] BYREF
cocos2d::CCPoint v134; // [sp+94h] [bp+48h] BYREF
cocos2d::CCPoint v135; // [sp+9Ch] [bp+50h] BYREF
cocos2d::CCPoint v136; // [sp+A4h] [bp+58h] BYREF
cocos2d::CCPoint v137; // [sp+ACh] [bp+60h] BYREF
cocos2d::CCPoint v138; // [sp+B4h] [bp+68h] BYREF
cocos2d::CCPoint v139; // [sp+BCh] [bp+70h] BYREF
_BYTE v140[8]; // [sp+C4h] [bp+78h] BYREF
_BYTE v141[8]; // [sp+CCh] [bp+80h] BYREF
cocos2d::CCPoint v142; // [sp+D4h] [bp+88h] BYREF
cocos2d::CCPoint v143; // [sp+DCh] [bp+90h] BYREF
cocos2d::CCPoint v144; // [sp+E4h] [bp+98h] BYREF
cocos2d::CCPoint v145; // [sp+ECh] [bp+A0h] BYREF
cocos2d::CCPoint v146; // [sp+F4h] [bp+A8h] BYREF
cocos2d::CCPoint v147; // 0:kr00_8.8
cocos2d::CCPoint v148; // 0:kr08_8.8
cocos2d::CCPoint v149; // 0:kr10_8.8
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v120, v2);
v3 = 1.0 / COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer));
v4 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, v4, LODWORD(v3));
cocos2d::CCPoint::operator-(&v121, &v146);
cocos2d::CCPoint::CCPoint(&v145, v120.width, v120.height);
cocos2d::CCPoint::operator*(&v146, &v145, LODWORD(v3));
cocos2d::CCPoint::operator+(&v123, &v121, &v146);
cocos2d::CCPoint::CCPoint(&v145, v120.width, v120.height);
cocos2d::CCPoint::operator*(&v146, &v145, LODWORD(v3));
cocos2d::CCSize::CCSize(&v125, &v146);
cocos2d::CCPoint::CCPoint(&v145, &v125);
cocos2d::CCPoint::operator*(&v146, &v145, 1056964608);
cocos2d::CCPoint::operator+(v126, &v121, &v146);
v5 = sqrtf((float)(v125.height * v125.height) + (float)(v125.width * v125.width));
cocos2d::CCPoint::CCPoint(&v146, v5 * 0.5, v5 * 0.5);
cocos2d::CCPoint::operator-(&v127, v126, &v146);
cocos2d::CCPoint::CCPoint(&v146, v5 * 0.5, v5 * 0.5);
cocos2d::CCPoint::operator+(&v129, v126, &v146);
cocos2d::CCPoint::CCPoint(&v131, &stru_AC68C0);
cocos2d::CCPoint::CCPoint(&v132, v120.width, v120.height);
if ( a1->m_gameState.m_cameraAngle != 0.0 )
{
v6 = sqrtf((float)(v120.height * v120.height) + (float)(v120.width * v120.width)) * 0.5;
cocos2d::CCPoint::CCPoint(&v146, (float)(v120.width * 0.5) - v6, (float)(v120.height * 0.5) - v6);
cocos2d::CCPoint::operator=((PlayerObject *)&v131, COERCE_FLOAT(&v146), v7, v8);
cocos2d::CCPoint::CCPoint(&v146, v6 + (float)(v120.width * 0.5), v6 + (float)(v120.height * 0.5));
cocos2d::CCPoint::operator=((PlayerObject *)&v132, COERCE_FLOAT(&v146), v9, v10);
}
v121 = v121 - 20.0;
v122 = v122 - 20.0;
v123 = v123 + 20.0;
v124 = v124 + 20.0;
cocos2d::CCPoint::CCPoint(&v133, -20.0, -20.0);
cocos2d::CCPoint::CCPoint(&v134, v120.width + 20.0, v120.height + 20.0);
a1->m_activeGradients = 0;
m_gradientLayers = a1->m_gradientLayers;
if ( m_gradientLayers )
{
m_pElements = m_gradientLayers->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( 1 )
{
if ( !m_pElements )
return;
m_pObject = m_pElements->m_pObject;
if ( !((int (__fastcall *)(cocos2d::CCObject *))m_pObject->__vftable[6].~CCObject_0)(m_pObject) )
goto LABEL_12;
m_nLuaID = m_pObject[9].m_nLuaID;
if ( !m_nLuaID )
goto LABEL_12;
if ( *(_DWORD *)(m_nLuaID + 1644) != m_pObject[9].m_eObjType )
{
m_pObject->__vftable[6].acceptVisitor(m_pObject, nullptr);
m_pObject[9].m_nLuaID = 0;
LOBYTE(m_pObject[9].m_nTag) = 0;
goto LABEL_12;
}
v16 = COERCE_FLOAT(((int (__fastcall *)(GJBaseGameLayer *, int))a1->opacityForObject)(a1, m_pObject[9].m_nLuaID));
v17 = v16;
if ( a1->m_isEditor && a1->m_playbackMode != Playing )
v17 = v16 * *(float *)(m_nLuaID + 1668);
*(cocos2d::ccColor3B *)&v18 = GJEffectManager::activeColorForIndex(
a1->m_effectManager,
m_pObject[8].m_uOrderOfArrival);
m_unknown5 = m_pObject[8].m_unknown5;
v20 = BYTE1(v18);
v118.r = v18;
v118.b = BYTE2(v18);
m_effectManager = a1->m_effectManager;
v118.g = v20;
v119 = GJEffectManager::activeColorForIndex(m_effectManager, m_unknown5);
MainColor = GameObject::getMainColor((GameObject *)m_nLuaID);
if ( MainColor
&& (MainColor->m_hsv.h != flt_AC68C8
|| MainColor->m_hsv.s != flt_AC68CC
|| MainColor->m_hsv.v != flt_AC68D0
|| *(unsigned __int16 *)&MainColor->m_hsv.absoluteSaturation != (unsigned __int16)word_AC68D4) )
{
v118 = (cocos2d::ccColor3B)GameToolbox::transformColor(
&v118.r,
MainColor->m_hsv.h,
MainColor->m_hsv.s,
MainColor->m_hsv.v,
*(_DWORD *)&MainColor->m_hsv.absoluteSaturation);
}
SecondaryColor = GameObject::getSecondaryColor((GameObject *)m_nLuaID);
if ( SecondaryColor
&& (SecondaryColor->m_hsv.h != flt_AC68C8
|| SecondaryColor->m_hsv.s != flt_AC68CC
|| SecondaryColor->m_hsv.v != flt_AC68D0
|| *(unsigned __int16 *)&SecondaryColor->m_hsv.absoluteSaturation != (unsigned __int16)word_AC68D4) )
{
v119 = (cocos2d::ccColor3B)GameToolbox::transformColor(
&v119.r,
SecondaryColor->m_hsv.h,
SecondaryColor->m_hsv.s,
SecondaryColor->m_hsv.v,
*(_DWORD *)&SecondaryColor->m_hsv.absoluteSaturation);
}
v24 = (float)(GJEffectManager::activeOpacityForIndex(a1->m_effectManager, m_pObject[8].m_uOrderOfArrival) * 255.0)
* v17;
v25 = (float)(GJEffectManager::activeOpacityForIndex(a1->m_effectManager, m_pObject[8].m_unknown5) * 255.0) * v17;
if ( v24 == 0.0 && v25 == 0.0
|| m_pObject[9].m_uReference == 1 && !v118.r && !v118.g && !v118.b && !v119.r && !v119.g && !v119.b )
{
LABEL_257:
((void (__fastcall *)(cocos2d::CCObject *, _DWORD))m_pObject->__vftable[4].~CCObject)(m_pObject, 0);
goto LABEL_12;
}
v26 = -(float)((*(float (__fastcall **)(int))(*(_DWORD *)m_nLuaID + 176))(m_nLuaID) * 0.017453);
v27 = cosf(v26);
v28 = sinf(v26);
cocos2d::CCPoint::CCPoint(&v135, v27, v28);
cocos2d::CCPoint::operator=((PlayerObject *)&m_pObject[9], COERCE_FLOAT(&v135), v29, (_BYTE)m_pObject - 44);
MainObject = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_nLuaID + 1648));
v31 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_nLuaID + 1652));
v32 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_nLuaID + 1656));
v33 = GJBaseGameLayer::tryGetMainObject(a1, *(_DWORD *)(m_nLuaID + 1660));
if ( !*(_BYTE *)(m_nLuaID + 1664) )
{
cocos2d::CCPoint::CCPoint(&v144, &stru_AC68C0);
cocos2d::CCPoint::CCPoint(&v145, &stru_AC68C0);
cocos2d::CCPoint::CCPoint(&v146, &stru_AC68C0);
LODWORD(v34.y) = &v145;
LODWORD(v34.x) = &v144;
LODWORD(v147.x) = &v146;
v147.y = v115;
cocos2d::CCLayerColor::setVertices((cocos2d::CCLayerColor *)m_pObject, v34, v147, v116);
getTag = m_pObject->__vftable[3].getTag;
v36 = ((int (__fastcall *)(cocos2d::CCObject *))m_pObject->__vftable[3].setTag)(m_pObject);
((void (__fastcall *)(cocos2d::CCObject *, int))getTag)(m_pObject, v36);
cocos2d::CCPoint::CCPoint(&v142);
cocos2d::CCPoint::CCPoint(&v143);
if ( LOBYTE(m_pObject[9].m_nTag) )
{
cocos2d::CCPoint::operator=((PlayerObject *)&v142, COERCE_FLOAT(&v121), v37, m_pObject[9].m_nTag);
cocos2d::CCPoint::operator=((PlayerObject *)&v143, COERCE_FLOAT(&v123), v38, v39);
if ( v31 )
{
v31->getRealPosition(&v146, v31);
v142.y = v146.y;
}
if ( v32 )
{
v32->getRealPosition(&v146, v32);
v142.x = v146.x;
}
if ( MainObject )
{
MainObject->getRealPosition(&v146, MainObject);
v143.y = v146.y;
}
if ( v33 )
{
v33->getRealPosition(&v146, v33);
v143.x = v146.x;
}
m_pObject->__vftable[2].isEqual(m_pObject, (const cocos2d::CCObject *)&v142);
m_pObject->__vftable[1].encodeWithCoder(
m_pObject,
COERCE_DS_DICTIONARY_((float)(v143.x - v142.x) / v120.width));
((void (__fastcall *)(cocos2d::CCObject *, _DWORD))m_pObject->__vftable[1].getTag)(
m_pObject,
(float)(v143.y - v142.y) / v120.height);
if ( v142.x > v129 || v142.y > v130 || v143.x < v127 )
goto LABEL_257;
v40 = v143.y < v128;
}
else
{
cocos2d::CCPoint::operator=((PlayerObject *)&v142, COERCE_FLOAT(&v133), v37, 0);
cocos2d::CCPoint::operator=((PlayerObject *)&v143, COERCE_FLOAT(&v134), v41, v42);
if ( v31 )
{
v31->getRealPosition(&v146, v31);
v142.y = v146.y;
}
if ( v32 )
{
v32->getRealPosition(&v146, v32);
v142.x = v146.x;
}
if ( MainObject )
{
MainObject->getRealPosition(&v146, MainObject);
v143.y = v146.y;
}
if ( v33 )
{
v33->getRealPosition(&v146, v33);
v143.x = v146.x;
}
v43 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v142, v43);
v44 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(&v144, &v146, v44);
v45 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v143, v45);
v46 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(&v145, &v146, v46);
if ( v31 )
v142.y = v144.y;
if ( v32 )
v142.x = v144.x;
if ( MainObject )
v143.y = v145.y;
if ( v33 )
v143.x = v145.x;
m_pObject->__vftable[2].isEqual(m_pObject, (const cocos2d::CCObject *)&v142);
m_pObject->__vftable[1].encodeWithCoder(
m_pObject,
COERCE_DS_DICTIONARY_((float)(v143.x - v142.x) / v120.width));
((void (__fastcall *)(cocos2d::CCObject *, _DWORD))m_pObject->__vftable[1].getTag)(
m_pObject,
(float)(v143.y - v142.y) / v120.height);
if ( v142.x > v120.width || v142.y > v120.height || v143.x < 0.0 )
goto LABEL_257;
v40 = v143.y < 0.0;
}
goto LABEL_242;
}
cocos2d::CCPoint::CCPoint(&v136);
cocos2d::CCPoint::CCPoint(&v137);
cocos2d::CCPoint::CCPoint(&v138);
cocos2d::CCPoint::CCPoint(&v139);
if ( !LOBYTE(m_pObject[9].m_nTag) )
{
cocos2d::CCPoint::operator=((PlayerObject *)&v136, COERCE_FLOAT(&v133), v47, 0);
cocos2d::CCPoint::operator=((PlayerObject *)&v137, COERCE_FLOAT(&v134), v76, v77);
cocos2d::CCPoint::CCPoint(&v146, v136.x, v137.y);
cocos2d::CCPoint::operator=((PlayerObject *)&v138, COERCE_FLOAT(&v146), v78, v79);
cocos2d::CCPoint::CCPoint(&v146, v137.x, v136.y);
cocos2d::CCPoint::operator=((PlayerObject *)&v139, COERCE_FLOAT(&v146), v80, v81);
if ( MainObject )
{
MainObject->getRealPosition(&v146, MainObject);
cocos2d::CCPoint::operator=((PlayerObject *)&v136, COERCE_FLOAT(&v146), v82, v83);
}
if ( v31 )
{
v31->getRealPosition(&v146, v31);
cocos2d::CCPoint::operator=((PlayerObject *)&v139, COERCE_FLOAT(&v146), v84, v85);
}
if ( v32 )
{
v32->getRealPosition(&v146, v32);
cocos2d::CCPoint::operator=((PlayerObject *)&v138, COERCE_FLOAT(&v146), v86, v87);
}
if ( v33 )
{
v33->getRealPosition(&v146, v33);
cocos2d::CCPoint::operator=((PlayerObject *)&v137, COERCE_FLOAT(&v146), v88, v89);
}
v90 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v136, v90);
v91 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(v140, &v146, v91);
v92 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v139, v92);
v93 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(v141, &v146, v93);
v94 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v137, v94);
v95 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(&v142, &v146, v95);
v96 = ((int (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScale)(a1->m_objectLayer);
cocos2d::CCPoint::operator*(&v146, &v138, v96);
v97 = a1->m_objectLayer->getPosition(a1->m_objectLayer);
cocos2d::CCPoint::operator+(&v143, &v146, v97);
if ( MainObject )
cocos2d::CCPoint::operator=((PlayerObject *)&v136, COERCE_FLOAT(v140), v98, (bool)v140);
if ( v31 )
cocos2d::CCPoint::operator=((PlayerObject *)&v139, COERCE_FLOAT(v141), v98, v99);
if ( v32 )
cocos2d::CCPoint::operator=((PlayerObject *)&v138, COERCE_FLOAT(&v143), v98, v99);
if ( v33 )
cocos2d::CCPoint::operator=((PlayerObject *)&v137, COERCE_FLOAT(&v142), v98, v99);
m_pObject->__vftable[2].copyWithZone(m_pObject, (cocos2d::CCZone *)1065353216);
m_pObject->__vftable[2].isEqual(m_pObject, (const cocos2d::CCObject *)&v136);
cocos2d::CCPoint::operator-(&v144, &v139, &v136);
cocos2d::CCPoint::operator-(&v145, &v138, &v136);
cocos2d::CCPoint::operator-(&v146, &v137, &v136);
LODWORD(v100.x) = &v144;
LODWORD(v100.y) = &v145;
LODWORD(v149.x) = &v146;
v149.y = v115;
cocos2d::CCLayerColor::setVertices((cocos2d::CCLayerColor *)m_pObject, v100, v149, v116);
x = v136.x;
if ( v138.x > v137.x )
{
if ( v139.x > v137.x )
goto LABEL_179;
}
else if ( v139.x > v138.x )
{
if ( v138.x <= v137.x )
{
v102 = v138.x;
goto LABEL_175;
}
LABEL_179:
if ( v136.x > v137.x )
{
v103 = v137.x;
goto LABEL_181;
}
LABEL_261:
v104 = v136.x;
goto LABEL_186;
}
v102 = v139.x;
LABEL_175:
if ( v136.x <= v102 )
goto LABEL_261;
if ( v138.x > v137.x )
v103 = v137.x;
else
v103 = v138.x;
LABEL_181:
if ( v139.x <= v103 )
{
v104 = v139.x;
}
else if ( v138.x > v137.x )
{
v104 = v137.x;
}
else
{
v104 = v138.x;
}
LABEL_186:
if ( v104 > v132.x )
goto LABEL_257;
y = v136.y;
if ( v138.y > v137.y )
{
if ( v139.y > v137.y )
goto LABEL_197;
}
else if ( v139.y > v138.y )
{
if ( v138.y <= v137.y )
{
v105 = v138.y;
goto LABEL_193;
}
LABEL_197:
if ( v136.y > v137.y )
{
v106 = v137.y;
goto LABEL_199;
}
LABEL_262:
v107 = v136.y;
goto LABEL_204;
}
v105 = v139.y;
LABEL_193:
if ( v136.y <= v105 )
goto LABEL_262;
if ( v138.y > v137.y )
v106 = v137.y;
else
v106 = v138.y;
LABEL_199:
if ( v139.y <= v106 )
{
v107 = v139.y;
}
else if ( v138.y > v137.y )
{
v107 = v137.y;
}
else
{
v107 = v138.y;
}
LABEL_204:
if ( v107 > v132.y )
goto LABEL_257;
if ( v138.x < v137.x )
{
if ( v139.x < v137.x )
goto LABEL_215;
}
else if ( v139.x < v138.x )
{
if ( v138.x >= v137.x )
{
v108 = v138.x;
goto LABEL_211;
}
LABEL_215:
if ( v136.x < v137.x )
{
v109 = v137.x;
goto LABEL_217;
}
goto LABEL_222;
}
v108 = v139.x;
LABEL_211:
if ( v136.x < v108 )
{
if ( v138.x < v137.x )
v109 = v137.x;
else
v109 = v138.x;
LABEL_217:
if ( v139.x >= v109 )
{
x = v139.x;
}
else if ( v138.x < v137.x )
{
x = v137.x;
}
else
{
x = v138.x;
}
}
LABEL_222:
if ( x < v131.x )
goto LABEL_257;
if ( v138.y < v137.y )
{
if ( v139.y < v137.y )
goto LABEL_233;
}
else if ( v139.y < v138.y )
{
if ( v138.y >= v137.y )
{
v110 = v138.y;
goto LABEL_229;
}
LABEL_233:
if ( v136.y < v137.y )
{
v111 = v137.y;
goto LABEL_235;
}
goto LABEL_240;
}
v110 = v139.y;
LABEL_229:
if ( v136.y < v110 )
{
if ( v138.y < v137.y )
v111 = v137.y;
else
v111 = v138.y;
LABEL_235:
if ( v139.y >= v111 )
{
y = v139.y;
}
else if ( v138.y < v137.y )
{
y = v137.y;
}
else
{
y = v138.y;
}
}
LABEL_240:
v75 = v131.y;
goto LABEL_241;
}
cocos2d::CCPoint::operator=((PlayerObject *)&v136, COERCE_FLOAT(&v121), v47, m_pObject[9].m_nTag);
cocos2d::CCPoint::operator=((PlayerObject *)&v137, COERCE_FLOAT(&v123), v48, v49);
cocos2d::CCPoint::CCPoint(&v146, v136.x, v137.y);
cocos2d::CCPoint::operator=((PlayerObject *)&v138, COERCE_FLOAT(&v146), v50, v51);
cocos2d::CCPoint::CCPoint(&v146, v137.x, v136.y);
cocos2d::CCPoint::operator=((PlayerObject *)&v139, COERCE_FLOAT(&v146), v52, v53);
if ( MainObject )
{
MainObject->getRealPosition(&v146, MainObject);
cocos2d::CCPoint::operator=((PlayerObject *)&v136, COERCE_FLOAT(&v146), v54, v55);
}
if ( v31 )
{
v31->getRealPosition(&v146, v31);
cocos2d::CCPoint::operator=((PlayerObject *)&v139, COERCE_FLOAT(&v146), v56, v57);
}
if ( v32 )
{
v32->getRealPosition(&v146, v32);
cocos2d::CCPoint::operator=((PlayerObject *)&v138, COERCE_FLOAT(&v146), v58, v59);
}
if ( v33 )
{
v33->getRealPosition(&v146, v33);
cocos2d::CCPoint::operator=((PlayerObject *)&v137, COERCE_FLOAT(&v146), v60, v61);
}
m_pObject->__vftable[2].copyWithZone(m_pObject, (cocos2d::CCZone *)1065353216);
m_pObject->__vftable[2].isEqual(m_pObject, (const cocos2d::CCObject *)&v136);
cocos2d::CCPoint::operator-(&v144, &v139, &v136);
cocos2d::CCPoint::operator-(&v145, &v138, &v136);
cocos2d::CCPoint::operator-(&v146, &v137, &v136);
LODWORD(v62.x) = &v144;
LODWORD(v62.y) = &v145;
LODWORD(v148.x) = &v146;
v148.y = v115;
cocos2d::CCLayerColor::setVertices((cocos2d::CCLayerColor *)m_pObject, v62, v148, v116);
v63 = v136.x;
if ( v138.x > v137.x )
{
if ( v139.x <= v137.x )
{
LABEL_86:
v64 = v139.x;
goto LABEL_87;
}
}
else
{
if ( v139.x <= v138.x )
goto LABEL_86;
if ( v138.x <= v137.x )
{
v64 = v138.x;
LABEL_87:
if ( v136.x <= v64 )
goto LABEL_259;
if ( v138.x > v137.x )
v65 = v137.x;
else
v65 = v138.x;
goto LABEL_93;
}
}
if ( v136.x <= v137.x )
{
LABEL_259:
v66 = v136.x;
goto LABEL_98;
}
v65 = v137.x;
LABEL_93:
if ( v139.x <= v65 )
{
v66 = v139.x;
}
else if ( v138.x > v137.x )
{
v66 = v137.x;
}
else
{
v66 = v138.x;
}
LABEL_98:
if ( v66 > v129 )
goto LABEL_257;
y = v136.y;
if ( v138.y > v137.y )
{
if ( v139.y <= v137.y )
{
LABEL_104:
v68 = v139.y;
goto LABEL_105;
}
}
else
{
if ( v139.y <= v138.y )
goto LABEL_104;
if ( v138.y <= v137.y )
{
v68 = v138.y;
LABEL_105:
if ( v136.y <= v68 )
goto LABEL_260;
if ( v138.y > v137.y )
v69 = v137.y;
else
v69 = v138.y;
goto LABEL_111;
}
}
if ( v136.y <= v137.y )
{
LABEL_260:
v70 = v136.y;
goto LABEL_116;
}
v69 = v137.y;
LABEL_111:
if ( v139.y <= v69 )
{
v70 = v139.y;
}
else if ( v138.y > v137.y )
{
v70 = v137.y;
}
else
{
v70 = v138.y;
}
LABEL_116:
if ( v70 > v130 )
goto LABEL_257;
if ( v138.x < v137.x )
{
if ( v139.x >= v137.x )
{
LABEL_122:
v71 = v139.x;
goto LABEL_123;
}
}
else
{
if ( v139.x >= v138.x )
goto LABEL_122;
if ( v138.x >= v137.x )
{
v71 = v138.x;
LABEL_123:
if ( v136.x >= v71 )
goto LABEL_134;
if ( v138.x < v137.x )
v72 = v137.x;
else
v72 = v138.x;
goto LABEL_129;
}
}
if ( v136.x >= v137.x )
goto LABEL_134;
v72 = v137.x;
LABEL_129:
if ( v139.x >= v72 )
{
v63 = v139.x;
}
else if ( v138.x < v137.x )
{
v63 = v137.x;
}
else
{
v63 = v138.x;
}
LABEL_134:
if ( v63 < v127 )
goto LABEL_257;
if ( v138.y < v137.y )
{
if ( v139.y >= v137.y )
{
LABEL_140:
v73 = v139.y;
LABEL_141:
if ( v136.y < v73 )
{
if ( v138.y < v137.y )
v74 = v137.y;
else
v74 = v138.y;
goto LABEL_147;
}
goto LABEL_152;
}
}
else
{
if ( v139.y >= v138.y )
goto LABEL_140;
if ( v138.y >= v137.y )
{
v73 = v138.y;
goto LABEL_141;
}
}
if ( v136.y < v137.y )
{
v74 = v137.y;
LABEL_147:
if ( v139.y >= v74 )
{
y = v139.y;
}
else if ( v138.y < v137.y )
{
y = v137.y;
}
else
{
y = v138.y;
}
}
LABEL_152:
v75 = v128;
LABEL_241:
v40 = y < v75;
LABEL_242:
if ( v40 )
goto LABEL_257;
cocos2d::CCLayerGradient::setValues(
(cocos2d::CCLayerGradient *)m_pObject,
&v118,
(unsigned int)v24,
&v119,
(unsigned int)v25,
(const cocos2d::CCPoint *)&m_pObject[9]);
((void (__fastcall *)(cocos2d::CCObject *, int))m_pObject->__vftable[4].~CCObject)(m_pObject, 1);
++a1->m_activeGradients;
if ( m_pObject[9].m_uReference == 3 )
{
if ( ((int (__fastcall *)(cocos2d::CCObject *))m_pObject->__vftable[6].~CCObject_0)(m_pObject) )
{
m_shaderLayer = a1->m_shaderLayer;
if ( m_shaderLayer )
{
if ( m_shaderLayer->m_state.m_usesShaders )
{
m_uAutoReleaseCount = m_pObject[9].m_uAutoReleaseCount;
if ( m_shaderLayer->m_state.m_minBlendingLayer <= m_uAutoReleaseCount
&& m_shaderLayer->m_state.m_maxBlendingLayer >= m_uAutoReleaseCount
&& m_uAutoReleaseCount <= 14 )
{
goto LABEL_257;
}
}
}
}
}
LABEL_12:
if ( next )
v15 = (cocos2d::CCDictElement *)next->hh.next;
else
v15 = nullptr;
m_pElements = next;
next = v15;
}
}
}