//
// LevelEditorLayer::updateDebugDraw from 0x47f8c8 to 0x480d26 (5214 bytes)
//
// 0 xrefs:
//
// 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:49:22 +0000
//
GameManager *__fastcall LevelEditorLayer::updateDebugDraw(LevelEditorLayer *this)
{
GameManager *updated; // r0
GameManager *v3; // r0
double v4; // r0
float v5; // s14
GameManager *v6; // r0
GameManager *v7; // r0
GameManager *v8; // r0
GameManager *v9; // r0
GameManager *v10; // r0
cocos2d::CCArray **v11; // r8
unsigned int v12; // r7
float v13; // s18
float v14; // s19
int v15; // r5
float v16; // s16
int v17; // r0
float v18; // s21
const cocos2d::CCPoint *v19; // r0
float v20; // s23
int *v21; // r6
float v22; // s17
float v23; // s16
float v24; // s24
float v25; // s16
float v26; // s24
float v27; // s16
int v28; // r0
int v29; // r6
int v30; // r3
int v31; // r10
int v32; // r8
char *v33; // r5
int v34; // r6
int v35; // r7
int v36; // r9
cocos2d::CCArray *v37; // r6
_BYTE *v38; // r0
int v39; // r3
EffectGameObject *ActiveTraceInObject; // r7
EffectGameObject *ActiveTraceOutObject; // r5
_DWORD *v42; // r3
_DWORD *v43; // r7
int v44; // r5
int v45; // r11
int v46; // r0
int v47; // r1
_DWORD *v48; // r2
int v49; // r3
int v50; // r6
const cocos2d::CCRect *v51; // r0
float *v52; // r1
int v53; // r6
_DWORD *v54; // r8
int v55; // r3
int v56; // r1
int v57; // r6
cocos2d::CCArray *Group; // r0
cocos2d::CCArray *v59; // r5
cocos2d::CCPoint **v60; // r11
GameManager *result; // r0
GameManager *v62; // r0
_DWORD *v63; // r10
int v64; // r2
int v65; // r3
int v66; // r6
GameManager *v67; // r0
const cocos2d::CCPoint *v68; // r6
const cocos2d::CCPoint *v69; // r9
int *v70; // r4
int v71; // r11
const cocos2d::CCPoint *v72; // r0
float v73; // s16
float v74; // s17
int v75; // r0
int v76; // r0
int KeyframeCommand; // r6
unsigned int i; // r10
int v79; // r2
int v80; // r1
int v81; // r7
double v82; // d7
float v83; // s20
char *v84; // r0
cocos2d::CCPoint *v85; // r11
cocos2d::CCPoint *v86; // r9
int v87; // r9
float v88; // s16
double v89; // d8
double v90; // d11
float v91; // s15
float v92; // s14
int v93; // r0
unsigned int j; // r7
int v95; // r0
int v96; // r2
int v97; // r1
int v98; // r2
int v99; // r0
int v100; // r6
int v101; // s17
int v102; // s18
int v103; // s16
float v104; // r8
float v105; // r0
_DWORD *v106; // r3
float v107; // r9
int *v108; // r7
int v109; // r5
int v110; // s17
int v111; // s18
int v112; // s19
int v113; // r1
int v114; // r0
int v115; // r0
bool v116; // zf
int v117; // r0
bool v118; // zf
int v119; // r0
int v120; // r0
bool v121; // zf
int v122; // r0
bool v123; // zf
int v124; // r0
int v125; // r0
bool v126; // zf
int v127; // r0
bool v128; // zf
int v129; // r7
int v130; // r5
int v131; // r6
cocos2d::CCRect *v132; // r3
int *v133; // r8
_BOOL4 v134; // r2
int v135; // r7
int v136; // r5
int v137; // r9
cocos2d::CCRect *v138; // r3
int v139; // r1
int v140; // r0
int v141; // r2
cocos2d::CCRect *v142; // r3
cocos2d::CCPoint *v143; // r1
int v144; // r0
int v145; // r2
float v146; // [sp+28h] [bp-CCh]
cocos2d::CCRect *v147; // [sp+28h] [bp-CCh]
cocos2d::CCRect *v148; // [sp+28h] [bp-CCh]
int v149; // [sp+2Ch] [bp-C8h]
int k; // [sp+2Ch] [bp-C8h]
float v151; // [sp+2Ch] [bp-C8h]
_BOOL4 v152; // [sp+2Ch] [bp-C8h]
cocos2d::CCPoint *v153; // [sp+30h] [bp-C4h]
int v154; // [sp+30h] [bp-C4h]
cocos2d::CCPoint *MinY; // [sp+30h] [bp-C4h]
cocos2d::CCPoint *v156; // [sp+30h] [bp-C4h]
int m; // [sp+34h] [bp-C0h]
cocos2d::CCRect *v158; // [sp+34h] [bp-C0h]
cocos2d::CCRect *v159; // [sp+38h] [bp-BCh]
cocos2d::CCRect *v160; // [sp+38h] [bp-BCh]
cocos2d::CCRect *v161; // [sp+38h] [bp-BCh]
GameManager *GameVariable; // [sp+3Ch] [bp-B8h]
int v163; // [sp+3Ch] [bp-B8h]
int v164; // [sp+3Ch] [bp-B8h]
int v165; // [sp+3Ch] [bp-B8h]
int v166; // [sp+3Ch] [bp-B8h]
int v167; // [sp+3Ch] [bp-B8h]
int v168; // [sp+3Ch] [bp-B8h]
int v169; // [sp+3Ch] [bp-B8h]
int v170; // [sp+3Ch] [bp-B8h]
int v171; // [sp+3Ch] [bp-B8h]
int v172; // [sp+3Ch] [bp-B8h]
int v173; // [sp+3Ch] [bp-B8h]
int v174; // [sp+3Ch] [bp-B8h]
int v175; // [sp+3Ch] [bp-B8h]
int v176; // [sp+40h] [bp-B4h]
char *v177; // [sp+44h] [bp-B0h]
int v178; // [sp+50h] [bp-A4h]
_DWORD *v179; // [sp+54h] [bp-A0h]
_BOOL4 v180; // [sp+58h] [bp-9Ch]
int v181; // [sp+60h] [bp-94h]
int v182; // [sp+64h] [bp-90h]
float v183; // [sp+74h] [bp-80h] BYREF
float v184; // [sp+78h] [bp-7Ch]
float v185; // [sp+7Ch] [bp-78h] BYREF
float v186; // [sp+80h] [bp-74h]
float v187; // [sp+84h] [bp-70h] BYREF
float v188; // [sp+88h] [bp-6Ch]
char v189[4]; // [sp+8Ch] [bp-68h] BYREF
float v190; // [sp+90h] [bp-64h]
float v191; // [sp+94h] [bp-60h] BYREF
float v192; // [sp+98h] [bp-5Ch]
float v193; // [sp+9Ch] [bp-58h] BYREF
float v194; // [sp+A0h] [bp-54h]
float v195; // [sp+A4h] [bp-50h] BYREF
float v196; // [sp+A8h] [bp-4Ch]
_BYTE v197[16]; // [sp+ACh] [bp-48h] BYREF
_BYTE v198[16]; // [sp+BCh] [bp-38h] BYREF
float v199; // [sp+CCh] [bp-28h] BYREF
float v200; // [sp+D0h] [bp-24h]
float v201; // [sp+D4h] [bp-20h]
int v202; // [sp+D8h] [bp-1Ch]
float v203; // [sp+DCh] [bp-18h] BYREF
float v204; // [sp+E0h] [bp-14h]
float v205; // [sp+E4h] [bp-10h]
float v206; // [sp+E8h] [bp-Ch]
updated = (GameManager *)GJBaseGameLayer::updateDebugDraw(this);
v3 = (GameManager *)GameManager::sharedState(updated);
byte_D2B8C8 = GameManager::getGameVariable(v3, "0181");
LODWORD(v4) = clock_gettime(0, (struct timespec *)&v203);
dbl_D2B8D0 = (double)SLODWORD(v203) + (double)SLODWORD(v204) / 1000000000.0;
if ( byte_D2B8C8 )
{
dbl_D2B8C0 = 0.519999981;
}
else
{
v4 = fmod((double)SLODWORD(v203) + (double)SLODWORD(v204) / 1000000000.0, 2.0);
v5 = v4 * 0.5;
dbl_D2B8C0 = (float)(1.0 - v5);
}
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v4));
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v183);
v146 = 0.25 / (*(float (__fastcall **)(_DWORD))(**((_DWORD **)this + 609) + 84))(*((_DWORD *)this + 609));
v6 = (GameManager *)cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v197,
(const cocos2d::CCRect *)(*((_DWORD *)this + 2894) + 312));
v7 = (GameManager *)GameManager::sharedState(v6);
GameVariable = (GameManager *)GameManager::getGameVariable(v7, "0121");
v8 = (GameManager *)GameManager::sharedState(GameVariable);
v176 = GameManager::getGameVariable(v8, "0209");
cocos2d::CCDrawNode::enableDrawArea(*((cocos2d::CCDrawNode **)this + 2894), (cocos2d::CCRect *)v197);
v9 = (GameManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 2937));
if ( v9 )
{
v11 = (cocos2d::CCArray **)((char *)this + 11748);
v12 = 0;
v13 = v183 + v183;
v14 = v184 + v184;
while ( 1 )
{
v9 = (GameManager *)cocos2d::CCArray::count(*v11);
if ( v12 >= (unsigned int)v9 )
break;
v15 = cocos2d::CCArray::objectAtIndex(*v11, v12);
v16 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
v17 = (*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v198,
v16 - (float)(v13 * 0.5),
*(float *)(v17 + 4) - (float)(v14 * 0.5),
v13,
v14);
if ( *(_DWORD *)(v15 + 892) == 2016
&& cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v197, (const cocos2d::CCRect *)v198)
&& ((!GameVariable || !*(_BYTE *)(v15 + 1114)) && (!v176 || !*(_BYTE *)(v15 + 1095)) || *(_BYTE *)(v15 + 989)) )
{
v18 = *(float *)(v15 + 1672);
if ( v18 > 0.0 )
{
v19 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v185, v19);
v20 = *(float *)(v15 + 1560);
if ( v20 > 3.0 )
{
v20 = 3.0;
}
else if ( v20 <= 0.4 )
{
v20 = 0.4;
}
else if ( v20 > 3.0 )
{
v20 = 3.0;
}
v21 = (int *)((char *)this + 11576);
v22 = v183 / v20;
v23 = v184;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, (const cocos2d::CCPoint *)(v15 + 1308));
v24 = 320.0 / v20;
v25 = v23 / v20;
if ( (float)(480.0 / v20) != v22 || v25 != v24 )
{
v72 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v15 + 96))(v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191, v72);
v73 = v25 * 0.5;
v74 = v22 * 0.5;
if ( (float)(v192 - v73) < 0.0 )
v192 = v73 + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193, (float)(v191 - v74) + v187, (float)(v192 - v73) + v188);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, (float)(v74 + v191) + v187, (float)(v73 + v192) + v188);
v203 = 1.0;
v199 = 0.0;
v200 = 0.0;
v75 = *v21;
v201 = 0.0;
v202 = 0;
v204 = 0.5;
v205 = 0.0;
v206 = v18;
cocos2d::CCDrawNode::drawRect(v75, (int)&v193, (int)&v195, (int)&v199, v146, (int)&v203, 0);
}
v26 = v24 * 0.5;
v27 = (float)(480.0 / v20) * 0.5;
if ( (float)(v186 - v26) < 0.0 )
v186 = v26 + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v189, (float)(v185 - v27) + v187, (float)(v186 - v26) + v188);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191, (float)(v27 + v185) + v187, (float)(v26 + v186) + v188);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193, v185 - (float)((float)*((int *)this + 145) / v20), v186);
v199 = 0.0;
v200 = 0.0;
v28 = *v21;
v201 = 0.0;
v202 = 0;
v203 = 0.0;
v204 = 1.0;
v205 = 0.0;
v206 = v18;
cocos2d::CCDrawNode::drawRect(v28, (int)v189, (int)&v191, (int)&v199, v146, (int)&v203, 0);
v29 = *v21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, v193, v190);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v199, v193, v192);
v203 = 1.0;
v205 = 0.0;
v204 = 1.0;
v206 = v18;
cocos2d::CCDrawNode::drawSegment(v29, &v195, &v199, LODWORD(v146), &v203);
}
}
++v12;
}
}
v10 = (GameManager *)GameManager::sharedState(v9);
if ( !GameManager::getGameVariable(v10, "0182") )
{
v30 = *((_DWORD *)this + 2808);
if ( v30 )
{
v31 = *(_DWORD *)(v30 + 52);
v149 = v31 ? *(_DWORD *)(v31 + 272) : 0;
v32 = 0;
v33 = nullptr;
while ( v31 )
{
if ( ++v32 > 5 )
{
v32 = 0;
LABEL_41:
v34 = 50;
v35 = 255;
LABEL_42:
v36 = v34;
}
else
{
switch ( v32 )
{
case 2:
v34 = 50;
v35 = 150;
goto LABEL_36;
case 3:
v34 = 255;
v36 = 0;
v35 = 255;
break;
case 4:
v34 = 0;
v35 = 255;
LABEL_36:
v36 = 255;
break;
case 5:
v34 = 255;
v35 = 0;
goto LABEL_42;
default:
goto LABEL_41;
}
}
v202 = 1065353216;
v199 = (float)v36 / 255.0;
v200 = (float)v35 / 255.0;
v201 = (float)v34 / 255.0;
v37 = *(cocos2d::CCArray **)(v31 + 260);
if ( v37 && cocos2d::CCArray::count(*(cocos2d::CCArray **)(v31 + 260)) > 1u )
{
if ( ((v38 = (_BYTE *)cocos2d::CCArray::objectAtIndex(v37, 0), !GameVariable) || !v38[1114])
&& (!v176 || !v38[1095])
|| v38[989] )
{
v76 = *((_DWORD *)this + 381);
v203 = 0.0;
v204 = 0.0;
v205 = 0.0;
KeyframeCommand = GJEffectManager::createKeyframeCommand(
v76,
0,
v37,
0,
0,
0,
1,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
(int)&v203);
std::__vector_base::~__vector_base((char **)&v203);
if ( KeyframeCommand )
{
if ( *(_DWORD *)(KeyframeCommand + 436) != *(_DWORD *)(KeyframeCommand + 440) )
{
for ( i = 0; ; ++i )
{
v79 = *(_DWORD *)(KeyframeCommand + 436);
v80 = 1022611261;
if ( i >= 1022611261 * ((*(_DWORD *)(KeyframeCommand + 440) - v79) >> 4) - 1 )
break;
v81 = v79 + 336 * i;
v82 = *(double *)(v81 + 256);
if ( v82 > 0.0 )
{
v83 = v82 / 50.0;
if ( !v33 )
{
v84 = (char *)operator new[](0x190u);
v85 = (cocos2d::CCPoint *)(v84 + 400);
v33 = v84;
v86 = (cocos2d::CCPoint *)v84;
do
{
cocos2d::CCPoint::CCPoint(v86);
v86 = (cocos2d::CCPoint *)((char *)v86 + 8);
}
while ( v86 != v85 );
}
v87 = 0;
do
{
v177 = &v33[8 * v87];
v88 = (float)v87++;
v89 = (float)(v83 * v88);
v90 = COERCE_DOUBLE(
((__int64 (__fastcall *)(int, int, _DWORD, _DWORD))tk::spline::operator())(
v81 + 32,
v80,
LODWORD(v89),
HIDWORD(v89)));
v91 = tk::spline::operator()(v81 + 144, HIDWORD(v90), LODWORD(v89), HIDWORD(v89));
v92 = v90;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v92, v91);
cocos2d::CCPoint::operator+(&v203, v81 + 288, v198);
cocos2d::CCPoint::operator=(v177, &v203);
}
while ( v87 != 50 );
v93 = *((_DWORD *)this + 2894);
v206 = *(float *)(v81 + 328);
v203 = 0.0;
v204 = 1.0;
v205 = 1.0;
cocos2d::CCDrawNode::drawLines(v93, v33, 50, LODWORD(v146), &v203);
}
}
for ( j = 0; ; ++j )
{
v95 = *(_DWORD *)(KeyframeCommand + 436);
if ( j >= 1022611261 * ((*(_DWORD *)(KeyframeCommand + 440) - v95) >> 4) - 1 )
break;
v96 = 336 * j;
if ( !*(_BYTE *)(v95 + v96 + 30) )
{
v97 = v95 + v96 + 288;
v98 = v96 + 336 + v95 + 288;
v99 = *((_DWORD *)this + 2894);
v202 = *(_DWORD *)(v98 + 40);
cocos2d::CCDrawNode::drawSegment(v99, v97, v98, LODWORD(v146), &v199);
}
}
}
}
}
}
GJEffectManager::resetTempGroupCommands(*((GJEffectManager **)this + 381), 0);
if ( v149 )
v39 = *(_DWORD *)(v149 + 272);
else
v39 = 0;
v31 = v149;
v149 = v39;
}
if ( v33 )
operator delete(v33);
}
}
cocos2d::CCDrawNode::disableDrawArea(*((cocos2d::CCDrawNode **)this + 2894));
ActiveTraceInObject = (EffectGameObject *)LevelEditorLayer::getActiveTraceInObject(this);
ActiveTraceOutObject = (EffectGameObject *)LevelEditorLayer::getActiveTraceOutObject(this);
if ( ActiveTraceInObject )
{
if ( ActiveTraceInObject != *((EffectGameObject **)this + 3073)
|| *((_DWORD *)this + 3071) < *((_DWORD *)this + 3070) )
{
*((_DWORD *)this + 3073) = ActiveTraceInObject;
*((_DWORD *)this + 3071) = *((_DWORD *)this + 3070);
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((_DWORD *)this + 3081);
processTrace(ActiveTraceInObject, this, (int *)this + 3075, 1);
}
drawTrace((cocos2d::CCDrawNode **)this, (int **)this + 3075, 1, *((_DWORD *)this + 2894));
}
if ( ActiveTraceOutObject )
{
v42 = (_DWORD *)((char *)this + 12288);
if ( ActiveTraceOutObject != *((EffectGameObject **)this + 3074) || *v42 < *((_DWORD *)this + 3070) )
{
*((_DWORD *)this + 3074) = ActiveTraceOutObject;
*v42 = *((_DWORD *)this + 3070);
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((_DWORD *)this + 3081);
processTrace(ActiveTraceOutObject, this, (int *)this + 3078, 0);
}
drawTrace((cocos2d::CCDrawNode **)this, (int **)this + 3078, 0, *((_DWORD *)this + 2894));
}
v43 = (_DWORD *)((char *)this + 11292);
if ( *((_BYTE *)this + 11692) )
{
v44 = 0;
v182 = (*((_DWORD *)this + 2824) - *((_DWORD *)this + 2823)) >> 2;
v45 = 4 * *((_DWORD *)this + 2649);
for ( k = *((_DWORD *)this + 2649); k <= *((_DWORD *)this + 2650) && k < v182; ++k )
{
v48 = *(_DWORD **)(*v43 + v45);
if ( v48 )
v49 = (*(_DWORD *)(*(_DWORD *)(*v43 + v45) + 4) - *v48) >> 2;
else
v49 = -1;
v178 = v49;
v153 = *((cocos2d::CCPoint **)this + 2651);
v159 = (cocos2d::CCRect *)(4 * (_DWORD)v153);
while ( (int)v153 <= *((_DWORD *)this + 2652) && (int)v153 < v178 )
{
v179 = *(_DWORD **)((char *)v159 + **(_DWORD **)(*v43 + v45));
if ( v179 )
{
v181 = *(_DWORD *)((char *)v159 + **(_DWORD **)(*((_DWORD *)this + 2844) + v45));
for ( m = 0; m < v181; ++m )
{
v50 = *(_DWORD *)(*v179 + 4 * m);
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 176))(v50)
&& LevelEditorLayer::validGroup(this, (GameObject *)v50, 0)
&& ((!GameVariable || !*(_BYTE *)(v50 + 1114)) && (!v176 || !*(_BYTE *)(v50 + 1095))
|| *(_BYTE *)(v50 + 989))
&& (*(_DWORD *)(v50 + 1084) == 1 && *(_BYTE *)(v50 + 1292)
|| (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 900))(v50) == 30 && !*(_BYTE *)(v50 + 834))
&& (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 860))(v50)
&& !*(_BYTE *)(v50 + 1166) )
{
v51 = (const cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v50 + 664))(v50);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v203, v51);
v180 = (int)(*(float (__fastcall **)(int))(*(_DWORD *)v50 + 184))(v50) % 90 != 0;
if ( v180 )
GameObject::calculateOrientedBox((GameObject *)v50);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198);
if ( v180 )
{
v100 = (*(int (__fastcall **)(int))(*(_DWORD *)v50 + 780))(v50);
cocos2d::CCPoint::operator=(&v191, v100 + 264);
cocos2d::CCPoint::operator=(&v193, v100 + 272);
cocos2d::CCPoint::operator=(&v195, v100 + 280);
v52 = (float *)(v100 + 288);
}
else
{
cocos2d::CCPoint::operator=(&v191, &v203);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v199, v203 + v205, v204 + v206);
cocos2d::CCPoint::operator=(&v195, &v199);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v199, v191, v196);
cocos2d::CCPoint::operator=(&v193, &v199);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v199, v195, v192);
v52 = &v199;
}
cocos2d::CCPoint::operator=(v198, v52);
if ( v44 >= 1192 )
break;
v53 = 8 * v44;
v44 += 8;
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53, &v191);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 8, &v193);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 16, &v193);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 24, &v195);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 32, &v195);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 40, v198);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 48, v198);
cocos2d::CCPoint::operator=(*((_DWORD *)this + 2896) + v53 + 56, &v191);
}
}
}
v153 = (cocos2d::CCPoint *)((char *)v153 + 1);
v159 = (cocos2d::CCRect *)((char *)v159 + 4);
}
v45 += 4;
}
if ( v44 )
{
v46 = *((_DWORD *)this + 2894);
v47 = *((_DWORD *)this + 2896);
v203 = 0.0;
v204 = 1.0;
v205 = 1.0;
v206 = 1.0;
cocos2d::CCDrawNode::drawLines(v46, v47, v44, LODWORD(v146), &v203);
}
}
cocos2d::CCDrawNode::enableDrawArea(*((cocos2d::CCDrawNode **)this + 2894), (cocos2d::CCRect *)v197);
v54 = *(_DWORD **)(*((_DWORD *)this + 2964) + 996);
if ( v54 )
{
v55 = v54[223];
if ( (unsigned int)(v55 - 3602) <= 1 || v55 == 3605 )
{
v56 = v54[321];
v57 = v54[434];
if ( v56 > 0 )
{
Group = (cocos2d::CCArray *)GJBaseGameLayer::getGroup(this, v56);
v59 = Group;
if ( Group )
{
if ( cocos2d::CCArray::count(Group) )
{
v101 = v54[431];
v102 = v54[432];
v103 = v54[433];
v151 = COERCE_FLOAT(cocos2d::CCRect::getMinX((cocos2d::CCRect *)v197));
MinY = (cocos2d::CCPoint *)cocos2d::CCRect::getMinY((cocos2d::CCRect *)v197);
v104 = COERCE_FLOAT(cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v197));
v105 = COERCE_FLOAT(cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v197));
v106 = *((_DWORD **)v59 + 13);
v107 = v105;
if ( *v106 )
{
v108 = (int *)((char *)this + 11576);
v109 = 0;
v158 = (cocos2d::CCRect *)v106[3];
v160 = (cocos2d::CCRect *)((char *)v158 + 4 * *v106 + -4);
*(float *)&v110 = (float)v101 * 3.0;
*(float *)&v111 = *(float *)&v110 + (float)((float)v102 * 3.0);
*(float *)&v112 = *(float *)&v111 + (float)((float)v103 * 3.0);
do
{
if ( v158 > v160 )
break;
v113 = *(_DWORD *)v158;
v158 = (cocos2d::CCRect *)((char *)v158 + 4);
if ( !v113 )
break;
(*(void (__fastcall **)(float *))(*(_DWORD *)v113 + 680))(&v195);
if ( *(float *)&v110 > 0.0 )
{
v200 = 0.0;
v199 = 1.0;
v202 = 1065353216;
v201 = 0.0;
if ( !v57 )
{
v203 = 0.0;
v204 = 0.0;
v114 = *v108;
v205 = 0.0;
v206 = 0.0;
v109 += cocos2d::CCDrawNode::drawCircle(
v114,
(cocos2d::CCPoint *)&v195,
v110,
(int)&v203,
v146,
(int)&v199,
(unsigned int)*(float *)&v110);
}
if ( (unsigned int)(v57 - 1) > 1 )
{
v116 = v57 == 3;
}
else
{
v163 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v195 - *(float *)&v110, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v195 - *(float *)&v110, v107);
v115 = cocos2d::CCDrawNode::drawSegment(v163, v198, &v203, LODWORD(v146), &v199);
v116 = v57 == 1;
v109 += v115;
}
if ( v116 )
{
v164 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, *(float *)&v110 + v195, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, *(float *)&v110 + v195, v107);
v109 += cocos2d::CCDrawNode::drawSegment(v164, v198, &v203, LODWORD(v146), &v199);
}
if ( (unsigned int)(v57 - 4) > 1 )
{
v118 = v57 == 6;
}
else
{
v165 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, v196 - *(float *)&v110);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, v196 - *(float *)&v110);
v117 = cocos2d::CCDrawNode::drawSegment(v165, v198, &v203, LODWORD(v146), &v199);
v118 = v57 == 4;
v109 += v117;
}
if ( v118 )
{
v166 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, *(float *)&v110 + v196);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, *(float *)&v110 + v196);
v109 += cocos2d::CCDrawNode::drawSegment(v166, v198, &v203, LODWORD(v146), &v199);
}
}
if ( *(float *)&v111 != *(float *)&v110 )
{
v199 = 0.0;
v200 = 1.0;
v202 = 1065353216;
v201 = 0.0;
if ( !v57 )
{
v203 = 0.0;
v204 = 0.0;
v119 = *v108;
v205 = 0.0;
v206 = 0.0;
v109 += cocos2d::CCDrawNode::drawCircle(
v119,
(cocos2d::CCPoint *)&v195,
v111,
(int)&v203,
v146,
(int)&v199,
(unsigned int)*(float *)&v111);
}
if ( (unsigned int)(v57 - 1) > 1 )
{
v121 = v57 == 3;
}
else
{
v167 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v195 - *(float *)&v111, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v195 - *(float *)&v111, v107);
v120 = cocos2d::CCDrawNode::drawSegment(v167, v198, &v203, LODWORD(v146), &v199);
v121 = v57 == 1;
v109 += v120;
}
if ( v121 )
{
v168 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, *(float *)&v111 + v195, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, *(float *)&v111 + v195, v107);
v109 += cocos2d::CCDrawNode::drawSegment(v168, v198, &v203, LODWORD(v146), &v199);
}
if ( (unsigned int)(v57 - 4) > 1 )
{
v123 = v57 == 6;
}
else
{
v169 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, v196 - *(float *)&v111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, v196 - *(float *)&v111);
v122 = cocos2d::CCDrawNode::drawSegment(v169, v198, &v203, LODWORD(v146), &v199);
v123 = v57 == 4;
v109 += v122;
}
if ( v123 )
{
v170 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, *(float *)&v111 + v196);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, *(float *)&v111 + v196);
v109 += cocos2d::CCDrawNode::drawSegment(v170, v198, &v203, LODWORD(v146), &v199);
}
}
if ( *(float *)&v112 != *(float *)&v111 )
{
v199 = 0.0;
v201 = 1.0;
v202 = 1065353216;
v200 = 0.0;
if ( !v57 )
{
v203 = 0.0;
v204 = 0.0;
v124 = *v108;
v205 = 0.0;
v206 = 0.0;
v109 += cocos2d::CCDrawNode::drawCircle(
v124,
(cocos2d::CCPoint *)&v195,
v112,
(int)&v203,
v146,
(int)&v199,
(unsigned int)*(float *)&v112);
}
if ( (unsigned int)(v57 - 1) > 1 )
{
v126 = v57 == 3;
}
else
{
v171 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v195 - *(float *)&v112, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v195 - *(float *)&v112, v107);
v125 = cocos2d::CCDrawNode::drawSegment(v171, v198, &v203, LODWORD(v146), &v199);
v126 = v57 == 1;
v109 += v125;
}
if ( v126 )
{
v172 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, *(float *)&v112 + v195, *(float *)&MinY);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, *(float *)&v112 + v195, v107);
v109 += cocos2d::CCDrawNode::drawSegment(v172, v198, &v203, LODWORD(v146), &v199);
}
if ( (unsigned int)(v57 - 4) > 1 )
{
v128 = v57 == 6;
}
else
{
v173 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, v196 - *(float *)&v112);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, v196 - *(float *)&v112);
v127 = cocos2d::CCDrawNode::drawSegment(v173, v198, &v203, LODWORD(v146), &v199);
v128 = v57 == 4;
v109 += v127;
}
if ( v128 )
{
v174 = *v108;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v151, *(float *)&v112 + v196);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, v104, *(float *)&v112 + v196);
v109 += cocos2d::CCDrawNode::drawSegment(v174, v198, &v203, LODWORD(v146), &v199);
}
}
}
while ( v109 <= 100 );
}
}
}
}
}
}
v60 = (cocos2d::CCPoint **)((char *)this + 11940);
result = (GameManager *)cocos2d::CCDrawNode::disableDrawArea(*((cocos2d::CCDrawNode **)this + 2894));
if ( *((_DWORD *)this + 2985) != *((_DWORD *)this + 2986) )
{
v62 = (GameManager *)GameManager::sharedState(result);
result = (GameManager *)GameManager::getGameVariable(v62, "0152");
if ( !result )
{
v129 = 8;
v152 = *((_DWORD *)this + 357) == 1;
v130 = 0;
v131 = (*((_DWORD *)this + 2986) - *((_DWORD *)this + 2985)) >> 3;
while ( v130 < v131 - 1 )
{
if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v197, (cocos2d::CCPoint *)((char *)*v60 + 8 * v130))
|| (result = (GameManager *)cocos2d::CCRect::containsPoint(
(cocos2d::CCRect *)v197,
(cocos2d::CCPoint *)((char *)*v60 + v129))) != nullptr )
{
v142 = *((cocos2d::CCRect **)this + 2894);
v143 = *v60;
if ( v130 == v131 - 2 && v152 )
{
v156 = *v60;
v148 = *((cocos2d::CCRect **)this + 2894);
v144 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 519) + 96))(*((_DWORD *)this + 519));
v142 = v148;
v143 = v156;
v145 = v144;
}
else
{
v145 = (int)v143 + v129;
}
v204 = 1.0;
v206 = 1.0;
v203 = 0.2;
v205 = 0.2;
result = (GameManager *)cocos2d::CCDrawNode::drawSegment(
v142,
(char *)v143 + 8 * v130,
v145,
1056964608,
&v203);
}
++v130;
v129 += 8;
}
v63 = (_DWORD *)((char *)this + 11952);
v64 = *((_DWORD *)this + 2988);
v65 = *((_DWORD *)this + 2989);
if ( v64 != v65 )
{
v66 = 0;
v154 = -1431655765 * ((v65 - v64) >> 2);
while ( v66 < v154 )
{
v132 = (cocos2d::CCRect *)*((unsigned __int8 *)this + 866);
v133 = (int *)(*v63 + 12 * v66);
if ( *((_BYTE *)this + 866) )
{
v134 = v152;
if ( v66 != v154 - 1 )
v134 = 0;
v132 = (cocos2d::CCRect *)v134;
}
v135 = 0;
v147 = v132;
v136 = (v133[1] - *(_DWORD *)(*v63 + 12 * v66)) >> 3;
while ( v135 < v136 - 1 )
{
v137 = 8 * v135;
if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v197, (const cocos2d::CCPoint *)(*v133 + 8 * v135))
|| (result = (GameManager *)cocos2d::CCRect::containsPoint(
(cocos2d::CCRect *)v197,
(const cocos2d::CCPoint *)(v137 + 8 + *v133))) != nullptr )
{
v138 = *((cocos2d::CCRect **)this + 2894);
v139 = *v133;
if ( v147 && v135 == v136 - 2 )
{
v175 = *v133;
v161 = *((cocos2d::CCRect **)this + 2894);
v140 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 520) + 96))(*((_DWORD *)this + 520));
v138 = v161;
v139 = v175;
v141 = v140;
}
else
{
v141 = v137 + 8 + v139;
}
v204 = 1.0;
v205 = 1.0;
v206 = 1.0;
v203 = 0.2;
result = (GameManager *)cocos2d::CCDrawNode::drawSegment(v138, v139 + v137, v141, 1056964608, &v203);
}
++v135;
}
++v66;
}
}
}
}
if ( *((_DWORD *)this + 2991) != *((_DWORD *)this + 2992) )
{
v67 = (GameManager *)GameManager::sharedState(result);
result = (GameManager *)GameManager::getGameVariable(v67, "0149");
if ( result )
{
v68 = *((const cocos2d::CCPoint **)this + 2991);
v69 = *((const cocos2d::CCPoint **)this + 2992);
v70 = (int *)((char *)this + 11576);
while ( v68 != v69 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v193, v68);
result = (GameManager *)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v197, (const cocos2d::CCPoint *)&v193);
if ( result )
{
v71 = *v70;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, v193 - 2.0, v194 - 2.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, v193 + 2.0, v194 + 2.0);
v199 = 1.0;
v200 = 0.5;
v202 = 1065353216;
v201 = 0.0;
v203 = 0.0;
v204 = 0.0;
v205 = 0.0;
v206 = 0.0;
result = (GameManager *)cocos2d::CCDrawNode::drawRect(
v71,
(int)&v195,
(int)v198,
(int)&v199,
0.0,
(int)&v203,
0);
}
v68 = (const cocos2d::CCPoint *)((char *)v68 + 8);
}
}
}
return result;
}