// // LevelEditorLayer::updateDebugDraw from 0x7be490 to 0x7bff08 (6776 bytes) // // 2 xrefs: // > @ 0x89cf8 // > @ 0x1435eb8 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 12:54:06 +0000 // __int64 __fastcall LevelEditorLayer::updateDebugDraw(LevelEditorLayer *this) { LevelEditorLayer *v1; // x28 GameManager *updated; // x0 GameManager *v3; // x0 __int64 v4; // x0 cocos2d::CCDirector *v5; // x0 float v6; // s14 GameManager *v7; // x0 GameManager *v8; // x0 unsigned __int8 GameVariable; // w0 GameManager *v10; // x0 GameManager *v11; // x0 unsigned int v12; // w24 float v13; // s10 float v14; // s9 __int64 v15; // x19 __int64 v16; // x0 GameManager *v17; // x0 __int64 v18; // x0 __int64 v19; // x3 int v20; // w0 unsigned int v21; // w0 unsigned __int8 *v22; // x2 float v23; // s0 float v24; // s1 float v25; // s2 cocos2d::CCArray *v26; // x19 _BYTE *v27; // x0 __int64 v28; // x3 __int64 v29; // x6 __int64 v30; // x2 __int64 v31; // x4 __int64 v32; // x25 unsigned __int64 i; // x27 __int64 v34; // x24 double v35; // d13 float v36; // s13 cocos2d::CCPoint *v37; // x19 int v38; // w28 float v39; // s8 double v40; // d8 double v41; // d15 float v42; // s1 float v43; // s0 cocos2d::CCPoint *v44; // x0 unsigned int v45; // w4 float v46; // s11 const cocos2d::CCPoint *v47; // x0 float v48; // s13 float v49; // s12 float v50; // s8 float v51; // s15 float v52; // w21 long double v53; // q0 float v54; // s8 float v55; // s1 __int64 v56; // x0 __int64 v57; // x20 cocos2d::CCPoint *v58; // x19 __int64 v59; // x3 unsigned __int64 j; // x25 __int64 v61; // x1 __int64 v62; // x19 __int64 v63; // x0 __int64 v64; // x2 EffectGameObject *ActiveTraceInObject; // x22 EffectGameObject *ActiveTraceOutObject; // x20 char *v67; // x19 __int64 v68; // x20 int v69; // w1 int v70; // w2 _QWORD *v71; // x20 int v72; // w0 int v73; // w19 _QWORD *v74; // x27 int v75; // w0 char *v76; // x19 __int64 v77; // x20 const cocos2d::CCRect *v78; // x0 __int64 v79; // x20 __int64 v80; // x20 int v81; // w0 _DWORD *v82; // x25 int v83; // w0 GameManager *v84; // x0 GameManager *v85; // x0 const cocos2d::CCPoint *v86; // x1 __int64 v87; // x2 int v88; // w23 __int64 v89; // x24 __int64 v90; // x21 int v91; // w19 __int64 v92; // x20 int v93; // w22 void *v94; // x1 __int64 v95; // x27 __int64 v96; // x2 __int64 v97; // x20 __int64 v98; // x0 int v99; // w0 int v100; // w25 __int64 v101; // x21 __int64 v102; // x0 int v103; // w24 __int64 v104; // x27 __int64 v105; // x20 __int64 v106; // x19 int v107; // w22 __int64 v108; // x3 const cocos2d::CCPoint *v109; // x1 __int64 v110; // x2 GameManager *v111; // x0 GameManager *v112; // x0 const cocos2d::CCPoint *v113; // x19 const cocos2d::CCPoint *v114; // x21 __int64 v115; // x27 int v117; // w1 int v118; // w22 cocos2d::CCArray *Group; // x0 cocos2d::CCArray *v120; // x24 int v121; // w19 int v122; // w27 float v123; // s0 float v124; // s13 float v125; // s0 float v126; // s0 float v127; // s15 unsigned int *v128; // x0 float v129; // s0 int v130; // w1 __int64 *v131; // x23 __int64 v132; // x21 __int64 v133; // x0 int v134; // w24 unsigned int v135; // w25 float v136; // s10 float v137; // s9 float v138; // s11 unsigned int v139; // w1 float **v140; // x23 unsigned int v141; // w1 float **v142; // x21 const cocos2d::CCPoint *v143; // x0 float v144; // s3 float v145; // s1 __int64 v146; // x0 float v147; // s0 __int64 v148; // x27 __int64 v149; // x27 __int64 v150; // x27 __int64 v151; // x27 __int64 v152; // x0 __int64 v153; // x27 __int64 v154; // x0 __int64 v155; // x27 __int64 v156; // x0 int v157; // [xsp+A4h] [xbp+A4h] __int64 k; // [xsp+B0h] [xbp+B0h] int v159; // [xsp+C0h] [xbp+C0h] const cocos2d::CCPoint *v160; // [xsp+C0h] [xbp+C0h] __int64 v161; // [xsp+C8h] [xbp+C8h] __int64 v162; // [xsp+C8h] [xbp+C8h] __int64 v163; // [xsp+C8h] [xbp+C8h] int v164; // [xsp+D0h] [xbp+D0h] int v165; // [xsp+D4h] [xbp+D4h] int v166; // [xsp+D4h] [xbp+D4h] __int64 KeyframeCommand; // [xsp+D8h] [xbp+D8h] __int64 v168; // [xsp+D8h] [xbp+D8h] int v169; // [xsp+D8h] [xbp+D8h] __int64 v170; // [xsp+D8h] [xbp+D8h] __int64 v171; // [xsp+D8h] [xbp+D8h] __int64 v172; // [xsp+D8h] [xbp+D8h] __int64 v173; // [xsp+D8h] [xbp+D8h] __int64 v174; // [xsp+D8h] [xbp+D8h] __int64 v175; // [xsp+D8h] [xbp+D8h] LevelEditorLayer *v176; // [xsp+E0h] [xbp+E0h] int v177; // [xsp+E0h] [xbp+E0h] _BOOL4 v178; // [xsp+E0h] [xbp+E0h] char *v179; // [xsp+E0h] [xbp+E0h] GJEffectManager *v180; // [xsp+E8h] [xbp+E8h] __int64 v181; // [xsp+E8h] [xbp+E8h] int v182; // [xsp+E8h] [xbp+E8h] int v183; // [xsp+E8h] [xbp+E8h] unsigned int v184; // [xsp+E8h] [xbp+E8h] int v185; // [xsp+F0h] [xbp+F0h] int v186; // [xsp+F0h] [xbp+F0h] __int64 v187; // [xsp+F0h] [xbp+F0h] float v188; // [xsp+F0h] [xbp+F0h] float v189; // [xsp+100h] [xbp+100h] cocos2d::CCPoint *v190; // [xsp+100h] [xbp+100h] char *v191; // [xsp+100h] [xbp+100h] int v192; // [xsp+100h] [xbp+100h] float v193; // [xsp+100h] [xbp+100h] void *v194; // [xsp+100h] [xbp+100h] __int64 v195; // [xsp+118h] [xbp+118h] BYREF float v196; // [xsp+120h] [xbp+120h] BYREF float v197; // [xsp+124h] [xbp+124h] float v198; // [xsp+128h] [xbp+128h] BYREF float v199; // [xsp+12Ch] [xbp+12Ch] _BYTE v200[4]; // [xsp+130h] [xbp+130h] BYREF float v201; // [xsp+134h] [xbp+134h] float v202; // [xsp+138h] [xbp+138h] BYREF float v203; // [xsp+13Ch] [xbp+13Ch] float v204; // [xsp+140h] [xbp+140h] BYREF float v205; // [xsp+144h] [xbp+144h] __int64 v206; // [xsp+148h] [xbp+148h] BYREF _BYTE v207[16]; // [xsp+150h] [xbp+150h] BYREF _BYTE v208[16]; // [xsp+160h] [xbp+160h] BYREF float v209; // [xsp+170h] [xbp+170h] BYREF float v210; // [xsp+174h] [xbp+174h] float v211; // [xsp+178h] [xbp+178h] float v212; // [xsp+17Ch] [xbp+17Ch] void *v213; // [xsp+180h] [xbp+180h] BYREF char *v214; // [xsp+188h] [xbp+188h] __int64 v215; // [xsp+190h] [xbp+190h] v1 = this; updated = (GameManager *)GJBaseGameLayer::updateDebugDraw(this); v3 = (GameManager *)GameManager::sharedState(updated); byte_155C6C8 = GameManager::getGameVariable(v3, "0181"); clock_gettime(0, (struct timespec *)&v213); *(double *)&qword_155C6D0 = (double)(__int64)v213 + (double)(__int64)v214 / 1000000000.0; if ( byte_155C6C8 ) { v4 = 0x3FE0A3D700000000LL; qword_155C6C0 = 0x3FE0A3D700000000LL; } else { v147 = fmod((double)(__int64)v213 + (double)(__int64)v214 / 1000000000.0, 2.0) * 0.5; *(double *)&qword_155C6C0 = (float)(1.0 - v147); } v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v4); cocos2d::CCDirector::getWinSize(&v195, v5); v6 = 0.25 / (*(float (__fastcall **)(_QWORD))(**((_QWORD **)v1 + 490) + 168LL))(*((_QWORD *)v1 + 490)); v7 = (GameManager *)cocos2d::CCRect::CCRect( (cocos2d::CCRect *)v207, (const cocos2d::CCRect *)(*((_QWORD *)v1 + 1727) + 380LL)); v8 = (GameManager *)GameManager::sharedState(v7); GameVariable = GameManager::getGameVariable(v8, "0121"); v165 = GameVariable; v10 = (GameManager *)GameManager::sharedState((GameManager *)GameVariable); v159 = (unsigned __int8)GameManager::getGameVariable(v10, "0209"); cocos2d::CCDrawNode::enableDrawArea(*((cocos2d::CCDrawNode **)v1 + 1727), (cocos2d::CCRect *)v207); v11 = (GameManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)v1 + 1760)); if ( (_DWORD)v11 ) { v12 = 0; v13 = *(float *)&v195 + *(float *)&v195; v14 = *((float *)&v195 + 1) + *((float *)&v195 + 1); v11 = (GameManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)v1 + 1760)); if ( (_DWORD)v11 ) { while ( 1 ) { v15 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)v1 + 1760), v12); v189 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15) - (float)(v13 * 0.5); v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v208, v189, *(float *)(v16 + 4) - (float)(v14 * 0.5), v13, v14); if ( *(_DWORD *)(v15 + 1028) == 2016 ) { if ( (unsigned __int8)cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v207, (const cocos2d::CCRect *)v208) ) { if ( (!v165 || !*(_BYTE *)(v15 + 1294)) && (!v159 || !*(_BYTE *)(v15 + 1259)) || *(_BYTE *)(v15 + 1133) ) { v46 = *(float *)(v15 + 1864); if ( v46 > 0.0 ) break; } } } ++v12; LABEL_7: v11 = (GameManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)v1 + 1760)); if ( v12 >= (unsigned int)v11 ) goto LABEL_8; } v47 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL))(v15); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v196, v47); v48 = *(float *)(v15 + 1744); if ( v48 > 3.0 ) goto LABEL_198; if ( v48 <= 0.4 ) { v50 = 800.0; v49 = 1200.0; v48 = 0.4; goto LABEL_43; } if ( v48 > 3.0 ) { LABEL_198: v50 = 106.67; v49 = 160.0; v48 = 3.0; } else { v49 = 480.0 / v48; v50 = 320.0 / v48; } LABEL_43: v51 = *(float *)&v195 / v48; v52 = *((float *)&v195 + 1) / v48; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v198, (const cocos2d::CCPoint *)(v15 + 1488)); *(float *)&v53 = v52; if ( v52 == v50 && v51 == v49 ) { v54 = v50 * 0.5; v55 = v197 - v54; if ( (float)(v197 - v54) >= 0.0 ) { LABEL_46: ++v12; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v200, (float)(v196 - (float)(v49 * 0.5)) + v198, v55 + v199); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v202, (float)(v196 + (float)(v49 * 0.5)) + v198, (float)(v54 + v197) + v199); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v204, v196 - (float)((float)*((int *)v1 + 169) / v48), v197); v56 = *((_QWORD *)v1 + 1727); v209 = 0.0; v210 = 0.0; v211 = 0.0; v212 = 0.0; LODWORD(v213) = 0; HIDWORD(v213) = 1.0; LODWORD(v214) = 0; *((float *)&v214 + 1) = v46; cocos2d::CCDrawNode::drawRect(v56, v200, &v202, &v209, &v213, 0, v6); v57 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v206, v204, v201); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v209, v204, v203); LODWORD(v214) = 0; *((float *)&v214 + 1) = v46; LODWORD(v213) = 1.0; HIDWORD(v213) = 1.0; cocos2d::CCDrawNode::drawSegment(v57, &v206, &v209, &v213, v6); goto LABEL_7; } } else { v143 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64, long double))(*(_QWORD *)v15 + 192LL))( v15, v53); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202, v143); v144 = v52 * 0.5; v145 = v203 - (float)(v52 * 0.5); if ( v145 < 0.0 ) { v145 = (float)(v144 + 0.0) - v144; v203 = v144 + 0.0; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v204, (float)(v202 - (float)(v51 * 0.5)) + v198, v145 + v199); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v206, (float)(v202 + (float)(v51 * 0.5)) + v198, (float)((float)(v52 * 0.5) + v203) + v199); v146 = *((_QWORD *)v1 + 1727); v209 = 0.0; v210 = 0.0; v211 = 0.0; v212 = 0.0; LODWORD(v214) = 0; v213 = (void *)__PAIR64__(0.5, 1.0); *((float *)&v214 + 1) = v46; cocos2d::CCDrawNode::drawRect(v146, &v204, &v206, &v209, &v213, 0, v6); v54 = v50 * 0.5; v55 = v197 - v54; if ( (float)(v197 - v54) >= 0.0 ) goto LABEL_46; } v55 = (float)(v54 + 0.0) - v54; v197 = v54 + 0.0; goto LABEL_46; } } LABEL_8: v17 = (GameManager *)GameManager::sharedState(v11); if ( !(unsigned __int8)GameManager::getGameVariable(v17, "0182") ) { v18 = *((_QWORD *)v1 + 1659); if ( v18 ) { v19 = *(_QWORD *)(v18 + 56); if ( v19 ) { v161 = *(_QWORD *)(v19 + 288); v190 = nullptr; v20 = 1; v176 = v1; v185 = 1; LABEL_12: v21 = v20 - 2; if ( v21 > 3 ) { v25 = 0.19608; v24 = 1.0; v185 = 1; v23 = 0.19608; } else { v22 = (unsigned __int8 *)&qword_1141B70 + v21; v23 = (float)v22[32] / 255.0; v24 = (float)v22[48] / 255.0; v25 = (float)v22[64] / 255.0; } while ( 1 ) { v209 = v25; v210 = v24; v211 = v23; v212 = 1.0; v26 = *(cocos2d::CCArray **)(v19 + 264); if ( v26 && (unsigned int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v19 + 264)) > 1 ) { if ( ((v27 = (_BYTE *)cocos2d::CCArray::objectAtIndex(v26, 0), !v165) || !v27[1294]) && (!v159 || !v27[1259]) || v27[1133] ) { v180 = *((GJEffectManager **)v176 + 269); v213 = nullptr; v214 = nullptr; v215 = 0; KeyframeCommand = GJEffectManager::createKeyframeCommand(v180, 0, v26); if ( v213 ) { if ( v213 != v214 ) v214 += 4 * ~((unsigned __int64)(v214 - 4 - (_BYTE *)v213) >> 2); operator delete(v213); } if ( KeyframeCommand ) { v28 = *(_QWORD *)(KeyframeCommand + 440); v29 = *(_QWORD *)(KeyframeCommand + 448); v30 = v28; if ( v28 != v29 ) { v31 = v29 - v28; if ( 0x6DB6DB6DB6DB6DB7LL * ((v29 - v28) >> 6) != 1 ) { v32 = 0; for ( i = 1; ; ++i ) { v34 = v28 + v32; v35 = *(double *)(v28 + v32 + 368); if ( v35 > 0.0 ) { v36 = v35 / 50.0; if ( !v190 ) { v190 = (cocos2d::CCPoint *)operator new[](0x190u); v58 = v190; do { cocos2d::CCPoint::CCPoint(v58); v58 = (cocos2d::CCPoint *)((char *)v58 + 8); } while ( v58 != (cocos2d::CCPoint *)((char *)v190 + 400) ); } v37 = v190; v38 = 0; do { v39 = (float)v38++; v40 = (float)(v39 * v36); v41 = tk::spline::operator()(v34 + 32, v40); v42 = tk::spline::operator()(v34 + 200, v40); v43 = v41; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v43, v42); cocos2d::CCPoint::operator+(&v213, v34 + 400); v44 = v37; v37 = (cocos2d::CCPoint *)((char *)v37 + 8); cocos2d::CCPoint::operator=(v44, &v213); } while ( v38 != 50 ); v45 = *(_DWORD *)(v34 + 440); LODWORD(v213) = 0; HIDWORD(v213) = 1.0; v214 = (char *)__PAIR64__(v45, 1.0); cocos2d::CCDrawNode::drawLines(v6); v28 = *(_QWORD *)(KeyframeCommand + 440); v29 = *(_QWORD *)(KeyframeCommand + 448); } v31 = v29 - v28; v30 = v28; v32 += 448; if ( 0x6DB6DB6DB6DB6DB7LL * ((v29 - v28) >> 6) - 1 <= i ) break; } } v59 = 0; for ( j = 0; j < 0x6DB6DB6DB6DB6DB7LL * (v31 >> 6) - 1; ++j ) { v61 = v30 + v59; v62 = v59 + 448; if ( !*(_BYTE *)(v30 + v59 + 30) ) { v63 = *((_QWORD *)v176 + 1727); v64 = v30 + v62 + 400; v212 = *(float *)(v64 + 40); cocos2d::CCDrawNode::drawSegment(v63, v61 + 400, v64, &v209, v6); v30 = *(_QWORD *)(KeyframeCommand + 440); v31 = *(_QWORD *)(KeyframeCommand + 448) - v30; } v59 = v62; } } } } } GJEffectManager::resetTempGroupCommands(*((GJEffectManager **)v176 + 269), 0); if ( !v161 ) break; v19 = v161; v161 = *(_QWORD *)(v161 + 288); v20 = v185 + 1; v185 = v20; if ( v20 <= 5 ) goto LABEL_12; v25 = 0.19608; v185 = 0; v24 = 1.0; v23 = 0.19608; } v1 = v176; if ( v190 ) operator delete(v190); } } } cocos2d::CCDrawNode::disableDrawArea(*((cocos2d::CCDrawNode **)v1 + 1727)); ActiveTraceInObject = (EffectGameObject *)LevelEditorLayer::getActiveTraceInObject(v1); ActiveTraceOutObject = (EffectGameObject *)LevelEditorLayer::getActiveTraceOutObject(v1); if ( ActiveTraceOutObject ) { v67 = (char *)v1 + 12288; if ( !ActiveTraceInObject ) goto LABEL_192; } else if ( !ActiveTraceInObject ) { v67 = (char *)v1 + 12288; goto LABEL_66; } v139 = *((_DWORD *)v1 + 3735); if ( ActiveTraceInObject == *((EffectGameObject **)v1 + 1869) && *((_DWORD *)v1 + 3736) >= v139 ) { v67 = (char *)v1 + 12288; v140 = (float **)((char *)v1 + 14968); } else { v67 = (char *)v1 + 12288; *((_DWORD *)v1 + 3736) = v139; *((_QWORD *)v1 + 1869) = ActiveTraceInObject; v140 = (float **)((char *)v1 + 14968); std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((__int64)v1 + 15016); processTrace(ActiveTraceInObject, v1, (__int64)v1 + 14968, 1u); } drawTrace((cocos2d::CCDrawNode **)v1, v140, 1, *((cocos2d::CCDrawNode **)v1 + 1727)); LABEL_192: if ( ActiveTraceOutObject ) { v141 = *((_DWORD *)v1 + 3735); if ( ActiveTraceOutObject != *((EffectGameObject **)v1 + 1870) || (v142 = (float **)(v67 + 2704), *((_DWORD *)v1 + 3737) < v141) ) { *((_DWORD *)v1 + 3737) = v141; *((_QWORD *)v1 + 1870) = ActiveTraceOutObject; v142 = (float **)(v67 + 2704); std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear((__int64)(v67 + 2728)); processTrace(ActiveTraceOutObject, v1, (__int64)(v67 + 2704), 0); } drawTrace((cocos2d::CCDrawNode **)v1, v142, 0, *((cocos2d::CCDrawNode **)v1 + 1727)); } LABEL_66: v68 = *((_QWORD *)v1 + 1671); if ( v67[1712] ) { v69 = *((_DWORD *)v1 + 3055); v164 = v69; v157 = (*((_QWORD *)v1 + 1672) - v68) >> 3; if ( v69 < v157 ) { v70 = *((_DWORD *)v1 + 3056); if ( v69 <= v70 ) { v162 = 8LL * v69; v186 = 0; v71 = *(_QWORD **)(v68 + v162); if ( !v71 ) goto LABEL_106; LABEL_70: for ( k = (v71[1] - *v71) >> 3; ; LODWORD(k) = -1 ) { v72 = *((_DWORD *)v1 + 3057); v177 = v72; if ( (int)k > v72 ) { v73 = *((_DWORD *)v1 + 3058); if ( v73 >= v72 ) break; } LABEL_103: v81 = v164 + 1; v164 = v81; v162 += 8; if ( v70 < v81 || v157 <= v81 ) { if ( v186 ) { LODWORD(v213) = 0; HIDWORD(v213) = 1.0; LODWORD(v214) = 1.0; HIDWORD(v214) = 1.0; cocos2d::CCDrawNode::drawLines(v6); } goto LABEL_109; } v71 = *(_QWORD **)(*((_QWORD *)v1 + 1671) + v162); if ( v71 ) goto LABEL_70; LABEL_106: ; } v181 = 8LL * v72; v168 = 4LL * v72; while ( 1 ) { v74 = *(_QWORD **)(*v71 + v181); if ( v74 ) { v75 = *(_DWORD *)(**(_QWORD **)(*((_QWORD *)v1 + 1692) + v162) + v168); if ( v75 > 0 ) break; } LABEL_92: ++v177; v181 += 8; v168 += 4; if ( v73 < v177 || (int)k <= v177 ) { v70 = *((_DWORD *)v1 + 3056); goto LABEL_103; } v71 = *(_QWORD **)(*((_QWORD *)v1 + 1671) + v162); } v76 = nullptr; v191 = (char *)(8 * ((unsigned int)(v75 - 1) + 1LL)); while ( 1 ) { v77 = *(_QWORD *)&v76[*v74]; if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v77 + 352LL))(v77) || !LevelEditorLayer::validGroup(v1, (GameObject *)v77, 0) ) { goto LABEL_77; } if ( v165 && *(_BYTE *)(v77 + 1294) ) goto LABEL_218; if ( !v159 ) { LABEL_83: if ( *(_DWORD *)(v77 + 1248) == 1 ) goto LABEL_84; goto LABEL_99; } if ( *(_BYTE *)(v77 + 1259) ) { LABEL_218: if ( *(_BYTE *)(v77 + 1133) ) goto LABEL_83; LABEL_77: v76 += 8; if ( v76 == v191 ) goto LABEL_91; } else { if ( *(_DWORD *)(v77 + 1248) == 1 ) { LABEL_84: if ( *(_BYTE *)(v77 + 1472) ) goto LABEL_85; } LABEL_99: if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v77 + 1800LL))(v77) != 30 || *(_BYTE *)(v77 + 970) ) goto LABEL_77; LABEL_85: if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v77 + 1720LL))(v77) || *(_BYTE *)(v77 + 1346) ) goto LABEL_77; v78 = (const cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v77 + 1328LL))(v77); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v213, v78); if ( (int)(*(float (__fastcall **)(__int64))(*(_QWORD *)v77 + 368LL))(v77) % 90 ) { GameObject::calculateOrientedBox((GameObject *)v77); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v204); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v206); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208); v80 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v77 + 1560LL))(v77); cocos2d::CCPoint::operator=(&v202, v80 + 316); cocos2d::CCPoint::operator=(&v204, v80 + 324); cocos2d::CCPoint::operator=(&v206, v80 + 332); cocos2d::CCPoint::operator=(v208, v80 + 340); } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v202); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v204); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v206); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208); cocos2d::CCPoint::operator=(&v202, &v213); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v209, *(float *)&v213 + *(float *)&v214, *((float *)&v213 + 1) + *((float *)&v214 + 1)); cocos2d::CCPoint::operator=(&v206, &v209); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v209, v202, *((float *)&v206 + 1)); cocos2d::CCPoint::operator=(&v204, &v209); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v209, *(float *)&v206, v203); cocos2d::CCPoint::operator=(v208, &v209); } if ( v186 > 1191 ) goto LABEL_91; v76 += 8; v79 = 8LL * v186; v186 += 8; cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79, &v202); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 8, &v204); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 16, &v204); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 24, &v206); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 32, &v206); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 40, v208); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 48, v208); cocos2d::CCPoint::operator=(*((_QWORD *)v1 + 1729) + v79 + 56, &v202); if ( v76 == v191 ) { LABEL_91: v73 = *((_DWORD *)v1 + 3058); goto LABEL_92; } } } } } } LABEL_109: cocos2d::CCDrawNode::enableDrawArea(*((cocos2d::CCDrawNode **)v1 + 1727), (cocos2d::CCRect *)v207); v82 = *(_DWORD **)(*((_QWORD *)v1 + 1781) + 1496LL); if ( v82 ) { v83 = v82[257]; if ( (unsigned int)(v83 - 3602) <= 1 || v83 == 3605 ) { v117 = v82[366]; v118 = v82[485]; if ( v117 > 0 ) { Group = (cocos2d::CCArray *)GJBaseGameLayer::getGroup(v1, v117); v120 = Group; if ( Group ) { if ( (unsigned int)cocos2d::CCArray::count(Group) ) { v183 = v82[483]; v121 = v82[482]; v122 = v82[484]; cocos2d::CCRect::getMinX((cocos2d::CCRect *)v207); v124 = v123; cocos2d::CCRect::getMinY((cocos2d::CCRect *)v207); v193 = v125; cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v207); v127 = v126; cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v207); v128 = *((unsigned int **)v120 + 7); v188 = v129; v130 = v183; if ( *v128 ) { v131 = *((__int64 **)v128 + 2); v132 = 8LL * *v128 - 8; v179 = (char *)v131 + v132; if ( v131 <= (__int64 *)((char *)v131 + v132) ) { v133 = *v131; if ( *v131 ) { v134 = 0; v135 = v118 - 1; v136 = (float)v121 * 3.0; v184 = v118 - 4; v137 = v136 + (float)((float)v130 * 3.0); v138 = v137 + (float)((float)v122 * 3.0); do { (*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)v133 + 1360LL))(&v206); if ( v136 > 0.0 ) { v209 = 1.0; v210 = 0.0; v211 = 0.0; v212 = 1.0; if ( v118 ) { if ( v135 <= 1 ) { v153 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, *(float *)&v206 - v136, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, *(float *)&v206 - v136, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v153, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 1 ) { v173 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v136 + *(float *)&v206, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v136 + *(float *)&v206, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v173, v208, &v213, &v209, v6); } if ( v184 <= 1 ) { v172 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, *((float *)&v206 + 1) - v136); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, *((float *)&v206 + 1) - v136); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v172, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 4 ) { v149 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, v136 + *((float *)&v206 + 1)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, v136 + *((float *)&v206 + 1)); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v149, v208, &v213, &v209, v6); } } else { v154 = *((_QWORD *)v1 + 1727); v213 = nullptr; v214 = nullptr; v134 += (unsigned __int8)cocos2d::CCDrawNode::drawCircle(v154, (cocos2d::CCPoint *)&v206); } } if ( v136 != v137 ) { v209 = 0.0; v210 = 1.0; v211 = 0.0; v212 = 1.0; if ( v118 ) { if ( v135 <= 1 ) { v155 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, *(float *)&v206 - v137, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, *(float *)&v206 - v137, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v155, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 1 ) { v175 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v137 + *(float *)&v206, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v137 + *(float *)&v206, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v175, v208, &v213, &v209, v6); } if ( v184 <= 1 ) { v174 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, *((float *)&v206 + 1) - v137); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, *((float *)&v206 + 1) - v137); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v174, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 4 ) { v150 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, v137 + *((float *)&v206 + 1)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, v137 + *((float *)&v206 + 1)); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v150, v208, &v213, &v209, v6); } } else { v156 = *((_QWORD *)v1 + 1727); v213 = nullptr; v214 = nullptr; v134 += (unsigned __int8)cocos2d::CCDrawNode::drawCircle(v156, (cocos2d::CCPoint *)&v206); } } if ( v137 != v138 ) { v209 = 0.0; v210 = 0.0; v211 = 1.0; v212 = 1.0; if ( v118 ) { if ( v135 <= 1 ) { v151 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, *(float *)&v206 - v138, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, *(float *)&v206 - v138, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v151, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 1 ) { v171 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v138 + *(float *)&v206, v193); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v138 + *(float *)&v206, v188); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v171, v208, &v213, &v209, v6); } if ( v184 <= 1 ) { v170 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, *((float *)&v206 + 1) - v138); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, *((float *)&v206 + 1) - v138); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v170, v208, &v213, &v209, v6); } if ( (v118 & 0xFFFFFFFD) == 4 ) { v148 = *((_QWORD *)v1 + 1727); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v124, v138 + *((float *)&v206 + 1)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v127, v138 + *((float *)&v206 + 1)); v134 += (unsigned __int8)cocos2d::CCDrawNode::drawSegment(v148, v208, &v213, &v209, v6); } } else { v152 = *((_QWORD *)v1 + 1727); v213 = nullptr; v214 = nullptr; v134 += (unsigned __int8)cocos2d::CCDrawNode::drawCircle(v152, (cocos2d::CCPoint *)&v206); } } if ( v134 > 100 ) break; if ( v179 < (char *)++v131 ) break; v133 = *v131; } while ( *v131 ); } } } } } } } } cocos2d::CCDrawNode::disableDrawArea(*((cocos2d::CCDrawNode **)v1 + 1727)); v84 = *((GameManager **)v1 + 1802); if ( *((GameManager **)v1 + 1801) != v84 ) { v85 = (GameManager *)GameManager::sharedState(v84); if ( !(unsigned __int8)GameManager::getGameVariable(v85, "0152") ) { v86 = *((const cocos2d::CCPoint **)v1 + 1801); v87 = (__int64)(*((_QWORD *)v1 + 1802) - (_QWORD)v86) >> 3; v88 = v87 - 1; v178 = *((_DWORD *)v1 + 493) == 1; if ( (int)v87 - 1 > 0 ) { v89 = 0; v90 = 0; v91 = v87 - 2; v92 = 8; v93 = 1; if ( !(unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v207, v86) ) goto LABEL_121; LABEL_116: while ( 1 ) { v94 = *((void **)v1 + 1727); v95 = *((_QWORD *)v1 + 1801); if ( v91 == (_DWORD)v89 && v178 ) { v194 = *((void **)v1 + 1727); v96 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v1 + 407) + 192LL))(*((_QWORD *)v1 + 407)); v94 = v194; } else { v96 = v95 + v92; } ++v89; v92 += 8; LODWORD(v213) = 1045220557; HIDWORD(v213) = 1.0; LODWORD(v214) = 1045220557; HIDWORD(v214) = 1.0; cocos2d::CCDrawNode::drawSegment(v94, v95 + v90, v96, &v213, 0.5); if ( v88 <= v93 ) break; while ( 1 ) { v90 = 8 * v89; v93 = v89 + 1; if ( (unsigned __int8)cocos2d::CCRect::containsPoint( (cocos2d::CCRect *)v207, (const cocos2d::CCPoint *)(*((_QWORD *)v1 + 1801) + 8 * v89)) ) break; LABEL_121: if ( (unsigned __int8)cocos2d::CCRect::containsPoint( (cocos2d::CCRect *)v207, (const cocos2d::CCPoint *)(*((_QWORD *)v1 + 1801) + v92)) ) goto LABEL_116; ++v89; v92 += 8; if ( v88 <= v93 ) goto LABEL_123; } } } LABEL_123: v97 = *((_QWORD *)v1 + 1804); v98 = *((_QWORD *)v1 + 1805); if ( v97 != v98 ) { v99 = -1431655765 * ((v98 - v97) >> 3); if ( v99 > 0 ) { v169 = v99; v187 = 0; v182 = 0; v166 = v99 - 1; while ( 1 ) { v100 = 0; v101 = v97 + v187; if ( *((_BYTE *)v1 + 1010) ) v100 = v178 && v182 == v166; v102 = (__int64)(*(_QWORD *)(v101 + 8) - *(_QWORD *)v101) >> 3; v103 = v102 - 1; if ( (int)v102 - 1 > 0 ) { v104 = 0; v105 = 0; v192 = v102 - 2; v106 = 8; v107 = 1; if ( !(unsigned __int8)cocos2d::CCRect::containsPoint( (cocos2d::CCRect *)v207, *(const cocos2d::CCPoint **)v101) ) goto LABEL_135; LABEL_130: while ( 1 ) { v108 = *((_QWORD *)v1 + 1727); v109 = *(const cocos2d::CCPoint **)v101; if ( v100 && v192 == (_DWORD)v104 ) { v160 = *(const cocos2d::CCPoint **)v101; v163 = *((_QWORD *)v1 + 1727); v110 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)v1 + 408) + 192LL))(*((_QWORD *)v1 + 408)); v108 = v163; v109 = v160; } else { v110 = (__int64)v109 + v106; } ++v104; v106 += 8; LODWORD(v213) = 1045220557; HIDWORD(v213) = 1.0; LODWORD(v214) = 1.0; HIDWORD(v214) = 1.0; cocos2d::CCDrawNode::drawSegment(v108, (char *)v109 + v105, v110, &v213, 0.5); if ( v103 <= v107 ) break; while ( 1 ) { v105 = 8 * v104; v107 = v104 + 1; if ( (unsigned __int8)cocos2d::CCRect::containsPoint( (cocos2d::CCRect *)v207, (const cocos2d::CCPoint *)(*(_QWORD *)v101 + 8 * v104)) ) break; LABEL_135: if ( (unsigned __int8)cocos2d::CCRect::containsPoint( (cocos2d::CCRect *)v207, (const cocos2d::CCPoint *)(*(_QWORD *)v101 + v106)) ) goto LABEL_130; ++v104; v106 += 8; if ( v103 <= v107 ) goto LABEL_137; } } } LABEL_137: v187 += 24; if ( ++v182 == v169 ) break; v97 = *((_QWORD *)v1 + 1804); } } } } } v111 = *((GameManager **)v1 + 1808); if ( *((GameManager **)v1 + 1807) != v111 ) { v112 = (GameManager *)GameManager::sharedState(v111); if ( (unsigned __int8)GameManager::getGameVariable(v112, "0149") ) { v113 = *((const cocos2d::CCPoint **)v1 + 1807); v114 = *((const cocos2d::CCPoint **)v1 + 1808); while ( v114 != v113 ) { while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v204, v113); if ( (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v207, (const cocos2d::CCPoint *)&v204) ) break; v113 = (const cocos2d::CCPoint *)((char *)v113 + 8); if ( v114 == v113 ) return _stack_chk_guard; } v115 = *((_QWORD *)v1 + 1727); v113 = (const cocos2d::CCPoint *)((char *)v113 + 8); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v206, v204 - 2.0, v205 - 2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, v204 + 2.0, v205 + 2.0); v209 = 1.0; v210 = 0.5; v211 = 0.0; v212 = 1.0; v213 = nullptr; v214 = nullptr; cocos2d::CCDrawNode::drawRect(v115, &v206, v208, &v209, &v213, 0, 0.0); } } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source