// // DrawGridLayer::draw from 0x790c08 to 0x792330 (5928 bytes) // // 2 xrefs: // > @ 0xac8e8 // > @ 0x14364f8 // // 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:53:30 +0000 // __int64 __fastcall DrawGridLayer::draw(DrawGridLayer *this) { __int64 v2; // x0 __int64 v3; // x19 int v4; // w22 int v5; // w21 unsigned __int64 v6; // x0 GameManager *v7; // x0 GameManager *v8; // x0 int v9; // w27 GameManager *v10; // x0 unsigned int v11; // w2 cocos2d::CCArray *v12; // x0 int v13; // w0 __int64 v14; // x2 cocos2d::CCNode *v15; // x19 unsigned __int8 v16; // w4 float v17; // s1 float v18; // s1 const cocos2d::CCPoint *v19; // x2 float v20; // s0 float v21; // s0 const cocos2d::CCPoint *v22; // x2 __int64 v23; // x1 __int64 v24; // x0 __int64 v25; // x0 unsigned int *v26; // x1 __int64 *v27; // x26 __int64 v28; // x0 char *v29; // x21 __int64 v30; // x25 int v31; // w19 int v32; // w0 float v33; // s11 __int64 v34; // x28 float v35; // s0 float v36; // s0 __int64 v37; // x28 __int64 v38; // x25 float v39; // s1 float v40; // s0 __int64 v41; // x25 float v42; // s1 unsigned __int8 v43; // w4 unsigned int v44; // w2 GameManager *v46; // x0 GameManager *GameVariable; // x0 GameManager *v48; // x0 unsigned __int8 v49; // w4 float v50; // s10 int v51; // w24 const cocos2d::CCPoint *v52; // x0 cocos2d::CCDirector *v53; // x0 cocos2d::CCDirector *v54; // x0 cocos2d::CCNode *v55; // x19 float v56; // s12 float v57; // s13 float v58; // s0 cocos2d::CCNode *v59; // x19 float v60; // s13 float v61; // s8 float v62; // s9 unsigned __int8 v63; // w4 float v64; // s0 __int128 v65; // q3 float v66; // s1 float v67; // s8 int v68; // w25 float v69; // s11 int v70; // w19 float v71; // s11 __int64 v72; // x26 __int64 v73; // x28 float v74; // s1 float v75; // s1 __int64 v76; // x26 unsigned __int8 v77; // w4 float v78; // s0 __int128 v79; // q3 float v80; // s2 float v81; // s15 int v82; // w25 float v83; // s0 float v84; // s14 float v85; // s0 __int64 v86; // x26 __int64 v87; // x28 float v88; // s0 __int64 v89; // x26 unsigned int v90; // w2 unsigned __int64 v91; // x0 __int64 v92; // x0 unsigned int v93; // w19 int v94; // w25 int v95; // w21 int v96; // w24 unsigned __int8 v97; // w4 cocos2d::CCString *v98; // x0 float v99; // s0 float v100; // s14 cocos2d::CCString *v101; // x0 float v102; // s0 __int64 v103; // x26 __int64 v104; // x28 float v105; // s1 __int64 v106; // x26 float v107; // s1 unsigned int v108; // w2 unsigned int v109; // w2 unsigned int v110; // w2 unsigned __int8 v111; // w4 _QWORD *v112; // x25 int v113; // w26 int v114; // w24 __int64 v115; // x21 int v116; // w0 float v117; // s12 int v118; // w1 float v119; // s11 float *v120; // x0 float v121; // s14 float v122; // s12 int v123; // w19 float v124; // s1 float v125; // s1 int v126; // w0 __int64 v127; // x28 unsigned int v128; // w2 unsigned int v129; // w2 unsigned __int8 v130; // w4 unsigned __int8 v131; // w4 float v132; // s0 float v133; // s1 float v134; // s1 const cocos2d::CCPoint *v135; // x2 float v136; // s11 float v137; // s1 float v138; // s1 const cocos2d::CCPoint *v139; // x2 float v140; // s1 float v141; // s1 const cocos2d::CCPoint *v142; // x2 GJBaseGameLayer *v143; // x0 float v144; // s0 float v145; // s11 float v146; // s0 float v147; // s12 unsigned __int8 v148; // w4 float v149; // s0 float v150; // s0 const cocos2d::CCPoint *v151; // x2 float v152; // s0 float v153; // s0 const cocos2d::CCPoint *v154; // x2 float v155; // s0 __int128 v156; // q3 const cocos2d::CCPoint *v157; // x2 __int64 v158; // x0 unsigned int *v159; // x1 GameObject **v160; // x24 __int64 v161; // x0 char *v162; // x21 GameObject *v163; // x25 int v164; // w19 float v165; // s11 unsigned __int8 v166; // w4 float v167; // s15 unsigned int v168; // w2 unsigned int v169; // w19 unsigned __int8 v170; // w4 GameObject *v171; // x0 float v172; // s15 float v173; // s0 float v174; // s0 const cocos2d::CCPoint *v175; // x2 float v176; // s0 float v177; // s0 const cocos2d::CCPoint *v178; // x2 __int64 v179; // x26 __int64 v180; // x28 float v181; // s1 __int64 v182; // x26 float v183; // s1 bool v184; // cc char v185; // w1 float v186; // s1 float v187; // s0 float v188; // s0 const cocos2d::CCPoint *v189; // x2 const cocos2d::CCPoint *v190; // x2 const cocos2d::CCPoint *v191; // x2 __int64 v192; // x26 __int64 v193; // x28 float v194; // s1 __int64 v195; // x26 float v196; // s1 int v197; // s0 float v198; // s0 float v199; // s0 const cocos2d::CCPoint *v200; // x2 __int64 v201; // x1 __int64 v202; // x25 __int64 v203; // x26 float v204; // s1 float v205; // s1 __int64 v206; // x25 LevelTools *v207; // x0 float v208; // s0 int LastGameplayRotated; // w25 LevelTools *v210; // x0 float v211; // [xsp+C0h] [xbp+B0h] __int128 v212; // [xsp+D0h] [xbp+C0h] __int128 v213; // [xsp+D0h] [xbp+C0h] __int64 v214; // [xsp+D0h] [xbp+C0h] __int128 v215; // [xsp+D0h] [xbp+C0h] __int128 v216; // [xsp+D0h] [xbp+C0h] __int128 v217; // [xsp+D0h] [xbp+C0h] float v218; // [xsp+D0h] [xbp+C0h] __int128 v219; // [xsp+D0h] [xbp+C0h] unsigned int v220; // [xsp+E4h] [xbp+D4h] int v221; // [xsp+E8h] [xbp+D8h] float v222; // [xsp+ECh] [xbp+DCh] char v223[8]; // [xsp+F0h] [xbp+E0h] BYREF __int64 v224; // [xsp+F8h] [xbp+E8h] BYREF __int64 v225; // [xsp+100h] [xbp+F0h] BYREF float v226; // [xsp+108h] [xbp+F8h] BYREF float v227; // [xsp+10Ch] [xbp+FCh] __int64 v228; // [xsp+110h] [xbp+100h] BYREF v2 = *((_QWORD *)this + 62); if ( !*(_QWORD *)(v2 + 14248) ) return _stack_chk_guard; v3 = v2 + 12288; v4 = *(_DWORD *)(v2 + 1972); v5 = 0; v6 = *(unsigned __int8 *)(v2 + 14001); if ( (_DWORD)v6 ) { v6 = v4 == 1; v5 = 1; if ( v4 == 1 ) v5 = *(unsigned __int8 *)(v3 + 1714) ^ 1; } if ( v4 == 1 || (v6 = *(unsigned __int8 *)(v3 + 1716), !*(_BYTE *)(v3 + 1716)) ) { v46 = (GameManager *)GameManager::sharedState((GameManager *)v6); v220 = 0; GameVariable = (GameManager *)GameManager::getGameVariable(v46, "0121"); v9 = (unsigned __int8)GameVariable; v48 = (GameManager *)GameManager::sharedState(GameVariable); v221 = (unsigned __int8)GameManager::getGameVariable(v48, "0209"); } else { v7 = (GameManager *)GameManager::sharedState((GameManager *)v6); v8 = (GameManager *)GameManager::getGameVariable(v7, "0121"); v9 = (unsigned __int8)v8; v10 = (GameManager *)GameManager::sharedState(v8); v221 = (unsigned __int8)GameManager::getGameVariable(v10, "0209"); if ( *((_BYTE *)this + 492) && (v12 = *((cocos2d::CCArray **)this + 68), *((_BYTE *)this + 492) = 0, v12) && (unsigned int)cocos2d::CCArray::count(v12) ) { v220 = 1; qsort( *(void **)(*(_QWORD *)(*((_QWORD *)this + 68) + 56LL) + 16LL), **(unsigned int **)(*((_QWORD *)this + 68) + 56LL), 8u, (int (*)(const void *, const void *))xCompReal); } else { v220 = 1; } } cocos2d::ccGLBlendFunc((cocos2d *)((char *)&dword_0 + 1), 0x303u, v11); if ( *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 453LL) ) v50 = 30090.0; else v50 = 2490.0; cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x96u, v49); glLineWidth(); v51 = *(unsigned __int8 *)(*((_QWORD *)this + 62) + 14005LL); v52 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 66) + 192LL))(*((_QWORD *)this + 66)); v53 = (cocos2d::CCDirector *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v223, v52); v54 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v53); cocos2d::CCDirector::getWinSize(&v224, v54); v55 = *((cocos2d::CCNode **)this + 66); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(&v228, v55, (const cocos2d::CCPoint *)&v226); v56 = *(float *)&v228; v57 = *(float *)&v224; v222 = *(float *)&v228; v58 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 66) + 168LL))(*((_QWORD *)this + 66)); v59 = *((cocos2d::CCNode **)this + 66); v60 = (float)(v57 / v58) + v56; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(&v228, v59, (const cocos2d::CCPoint *)&v226); v61 = *((float *)&v224 + 1); v62 = *((float *)&v228 + 1); v64 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 66) + 168LL))(*((_QWORD *)this + 66)); v66 = *((float *)this + 151); v67 = (float)(v61 / v64) + v62; v68 = vcvtms_s32_f32(v56 / v66); v69 = (float)v68; if ( v60 <= (float)(v66 * (float)v68) ) { v70 = 0; } else { LODWORD(v65) = -985956352; v70 = 0; while ( 1 ) { v71 = v69 * v66; if ( v71 >= *(float *)&v65 && v71 <= 240000.0 ) { if ( v71 == 240000.0 || v71 == 0.0 ) { v215 = v65; cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xFFu, 0xFFu, 0x96u, v63); v140 = v62; if ( v62 <= *(float *)&v215 ) v140 = *(float *)&v215; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v71, v140); v141 = v67; if ( v67 >= v50 ) v141 = v50; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v71, v141); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v142); v66 = *((float *)this + 151); v65 = v215; } else if ( v70 <= 1197 && v5 ) { v72 = 8LL * v70; v73 = *((_QWORD *)this + 51) + v72; v74 = v62; if ( v62 <= *(float *)&v65 ) v74 = *(float *)&v65; v212 = v65; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v71, v74); cocos2d::CCPoint::operator=(v73, &v228); v75 = v67; v76 = *((_QWORD *)this + 51) + v72 + 8; if ( v67 >= v50 ) v75 = v50; v70 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v71, v75); cocos2d::CCPoint::operator=(v76, &v228); v65 = v212; v66 = *((float *)this + 151); } } ++v68; if ( v60 <= v71 ) break; v69 = (float)v68; } } v78 = fmodf(90.0, v66); v80 = *((float *)this + 151); v81 = v78; v82 = vcvtms_s32_f32((float)(v62 - v78) / v80); v83 = (float)v82; if ( v67 > (float)(v81 + (float)(v80 * (float)v82)) ) { LODWORD(v79) = -985956352; while ( 1 ) { v84 = v81 + (float)(v83 * v80); if ( (v84 == 90.0) >= (unsigned int)(v84 >= *(float *)&v79 && v84 <= v50) ) goto LABEL_97; if ( v84 == v50 ) { v216 = v79; cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xFFu, 0xFFu, 0x96u, v77); glLineWidth(); if ( v222 <= *(float *)&v216 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, *(float *)&v216, v84); v155 = v60; v156 = v216; if ( v60 < 240000.0 ) { LABEL_201: v217 = v156; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v155, v84); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v157); v79 = v217; goto LABEL_97; } } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v222, v84); v155 = v60; v156 = v216; if ( v60 < 240000.0 ) goto LABEL_201; } v219 = v156; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, 240000.0, v84); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v190); v79 = v219; } else if ( v70 <= 1197 && v5 ) { v85 = v222; v86 = 8LL * v70; v87 = *((_QWORD *)this + 51) + v86; if ( v222 <= *(float *)&v79 ) v85 = *(float *)&v79; v213 = v79; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v85, v84); cocos2d::CCPoint::operator=(v87, &v228); v88 = v60; v89 = *((_QWORD *)this + 51) + v86 + 8; if ( v60 >= 240000.0 ) v88 = 240000.0; v70 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v88, v84); cocos2d::CCPoint::operator=(v89, &v228); v79 = v213; } LABEL_97: ++v82; if ( v67 <= v84 ) break; v80 = *((float *)this + 151); v83 = (float)v82; } } if ( v70 > 0 && v5 ) { cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x96u, v77); glLineWidth(); cocos2d::ccDrawLines(*((cocos2d **)this + 51), (const cocos2d::CCPoint *)(unsigned int)v70, v90); } v91 = v62 <= 90.0; if ( ((unsigned int)v91 & (v51 ^ 1)) != 0 && v67 >= 90.0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xFFu, 0xFFu, 0x96u, v77); glLineWidth(); v198 = v222; if ( v222 <= -3000.0 ) v198 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v198, 90.0); v199 = v60; if ( v60 >= 240000.0 ) v199 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v199, 90.0); v91 = cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v200); } v92 = *(unsigned __int8 *)(GameManager::sharedState((GameManager *)v91) + 921); if ( (_DWORD)v92 ) { v92 = *((_QWORD *)this + 67); if ( v92 ) { v93 = 0; v94 = 0; v95 = 0; v96 = 0; while ( 1 ) { v92 = cocos2d::CCArray::count((cocos2d::CCArray *)v92); if ( v93 >= (unsigned int)v92 ) { LABEL_120: if ( v96 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0x7Fu, 0, 0xFFu, v97); glLineWidth(); v92 = cocos2d::ccDrawLines(*((cocos2d **)this + 51), (const cocos2d::CCPoint *)(unsigned int)v96, v108); } if ( v95 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xFFu, 0, 0xFFu, v97); glLineWidth(); v92 = cocos2d::ccDrawLines(*((cocos2d **)this + 52), (const cocos2d::CCPoint *)(unsigned int)v95, v109); } if ( v94 ) { cocos2d::ccDrawColor4B((cocos2d *)((char *)&dword_7C + 3), 0xFFu, 0, 0xFFu, v97); glLineWidth(); v92 = cocos2d::ccDrawLines(*((cocos2d **)this + 53), (const cocos2d::CCPoint *)(unsigned int)v94, v110); } break; } v98 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 67), v93); v92 = cocos2d::CCString::floatValue(v98); v100 = v99; if ( v99 >= -3000.0 ) { if ( v222 > v99 || v60 < v99 ) goto LABEL_107; v101 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 67), v93 + 1); v92 = cocos2d::CCString::floatValue(v101); if ( v102 != 0.9 ) { if ( v102 == 1.0 ) { if ( v94 <= 1197 ) { v179 = 8LL * v94; v180 = *((_QWORD *)this + 53) + v179; v181 = v62; if ( v62 <= -3000.0 ) v181 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v181); cocos2d::CCPoint::operator=(v180, &v228); v182 = *((_QWORD *)this + 53) + v179 + 8; v183 = v67; if ( v67 >= v50 ) v183 = v50; v94 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v183); cocos2d::CCPoint::operator=(v182, &v228); } } else if ( v96 <= 1197 ) { v192 = 8LL * v96; v193 = *((_QWORD *)this + 51) + v192; v194 = v62; if ( v62 <= -3000.0 ) v194 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v194); cocos2d::CCPoint::operator=(v193, &v228); v195 = *((_QWORD *)this + 51) + v192 + 8; v196 = v67; if ( v67 >= v50 ) v196 = v50; v96 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v196); cocos2d::CCPoint::operator=(v195, &v228); } LABEL_107: if ( v60 < v100 ) goto LABEL_120; goto LABEL_108; } if ( v95 > 1197 ) goto LABEL_107; v103 = 8LL * v95; v104 = *((_QWORD *)this + 52) + v103; v105 = v62; if ( v62 <= -3000.0 ) v105 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v105); cocos2d::CCPoint::operator=(v104, &v228); v106 = *((_QWORD *)this + 52) + v103 + 8; v107 = v67; if ( v67 >= v50 ) v107 = v50; v95 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v100, v107); cocos2d::CCPoint::operator=(v106, &v228); if ( v60 < v100 ) goto LABEL_120; } LABEL_108: v92 = *((_QWORD *)this + 67); v93 += 2; } } } if ( *(_BYTE *)(GameManager::sharedState((GameManager *)v92) + 922) ) { v112 = *((_QWORD **)this + 56); if ( v112 ) { v113 = 0; v114 = 0; do { v115 = v112[3]; if ( !*(_BYTE *)(v115 + 1852) ) { v116 = *(_DWORD *)(v115 + 1840); if ( v116 > 0 && ((!v9 || !*(_BYTE *)(v115 + 1294)) && (!v221 || !*(_BYTE *)(v115 + 1259)) || *(_BYTE *)(v115 + 1133)) ) { v117 = *((float *)this + 146); switch ( *(_DWORD *)(v115 + 1848) ) { case 1: v117 = *((float *)this + 145); break; case 2: v117 = *((float *)this + 147); break; case 3: v117 = *((float *)this + 148); break; case 4: v117 = *((float *)this + 149); break; default: break; } v118 = *(_DWORD *)(v115 + 1844); if ( v118 > 0 ) v116 *= v118; v119 = (float)(60.0 / (float)v116) * v117; v120 = (float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v115 + 192LL))(v112[3]); v121 = *v120; v122 = *v120 + (float)(*(float *)(v115 + 1452) * v117); if ( v60 <= v122 ) v122 = v60; v123 = 0; if ( v222 > v121 ) { v123 = vcvtps_s32_f32((float)(v222 - v121) / v119); v121 = v121 + (float)((float)v123 * v119); } while ( v122 > v121 ) { v124 = v62; if ( v62 <= -3000.0 ) v124 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v121, v124); v125 = v67; if ( v67 >= v50 ) v125 = v50; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v121, v125); v126 = *(_DWORD *)(v115 + 1844); if ( v126 > 0 && v123 % v126 ) { if ( v113 <= 1197 ) { v214 = 8LL * v113; v113 += 2; cocos2d::CCPoint::operator=(*((_QWORD *)this + 52) + v214, &v226); cocos2d::CCPoint::operator=(*((_QWORD *)this + 52) + v214 + 8, &v228); } } else if ( v114 <= 1197 ) { v127 = 8LL * v114; v114 += 2; cocos2d::CCPoint::operator=(*((_QWORD *)this + 51) + v127, &v226); cocos2d::CCPoint::operator=(*((_QWORD *)this + 51) + v127 + 8, &v228); } v121 = v121 + v119; ++v123; } } } v112 = (_QWORD *)*v112; } while ( v112 ); if ( v114 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xFFu, 0, 0xFFu, v111); glLineWidth(); cocos2d::ccDrawLines(*((cocos2d **)this + 51), (const cocos2d::CCPoint *)(unsigned int)v114, v128); } if ( v113 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0x7Fu, 0, 0xFFu, v111); glLineWidth(); cocos2d::ccDrawLines(*((cocos2d **)this + 52), (const cocos2d::CCPoint *)(unsigned int)v113, v129); } } } glLineWidth(); if ( (v4 == 1) < v220 && (cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0x96u, v130), (v158 = *((_QWORD *)this + 68)) != 0) && (v159 = *(unsigned int **)(v158 + 56), *v159) ) { v160 = *((GameObject ***)v159 + 2); v161 = 8LL * *v159 - 8; v162 = (char *)v160 + v161; if ( v160 <= (GameObject **)((char *)v160 + v161) ) { v163 = *v160; if ( *v160 ) { v164 = 0; v165 = -1.0; do { v167 = *(float *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)v163 + 192LL))(v163); if ( v60 >= v167 && v222 <= v167 ) { if ( (!(unsigned __int8)GameObject::getGroupDisabled(v163) && (!v9 || !*((_BYTE *)v163 + 1294)) && (!v221 || !*((_BYTE *)v163 + 1259)) || *((_BYTE *)v163 + 1133)) && !*((_BYTE *)v163 + 1472) && (v165 < v167) > (unsigned int)*((unsigned __int8 *)v163 + 1473) ) { v165 = v167; if ( v164 <= 1197 ) { v202 = 8LL * v164; v203 = *((_QWORD *)this + 51) + v202; v204 = v62; if ( v62 <= -3000.0 ) v204 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v167, v204); cocos2d::CCPoint::operator=(v203, &v228); v205 = v67; v206 = *((_QWORD *)this + 51) + v202 + 8; if ( v67 >= v50 ) v205 = v50; v165 = v167; v164 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v167, v205); cocos2d::CCPoint::operator=(v206, &v228); } } } else if ( v60 < v167 ) { break; } if ( v162 < (char *)++v160 ) break; v163 = *v160; } while ( *v160 ); if ( v164 ) { cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0x96u, v166); cocos2d::ccDrawLines(*((cocos2d **)this + 51), (const cocos2d::CCPoint *)(unsigned int)v164, v168); } } } } else if ( v4 == 1 ) { goto LABEL_164; } v169 = 0; glLineWidth(); cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0xFFu, v170); while ( v169 < (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 69)) ) { v171 = (GameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 69), v169); if ( (!v9 || !*((_BYTE *)v171 + 1294)) && (!v221 || !*((_BYTE *)v171 + 1259)) || *((_BYTE *)v171 + 1133) ) { DrawGridLayer::getPortalMinMax(v171, (cocos2d::CCPoint *)&v225); v172 = *((float *)&v225 + 1); if ( *(float *)&v225 <= v50 && *(float *)&v225 >= -3000.0 ) { v173 = v222; if ( v222 <= -3000.0 ) v173 = -3000.0; v218 = *(float *)&v225; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v173, *(float *)&v225); v174 = v60; if ( v60 >= 240000.0 ) v174 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v174, v218); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v175); } if ( v172 <= v50 && v172 >= -3000.0 ) { v176 = v222; if ( v222 <= -3000.0 ) v176 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v176, v172); v177 = v60; if ( v60 >= 240000.0 ) v177 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v177, v172); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v178); } } ++v169; } LABEL_164: v23 = *((_QWORD *)this + 62); if ( *(_DWORD *)(v23 + 1972) ) { *((_DWORD *)this + 121) = 0; *((_DWORD *)this + 122) = 0; goto LABEL_10; } if ( !*(_BYTE *)(*(_QWORD *)(v23 + 14248) + 668LL) ) { cocos2d::ccDrawColor4B((cocos2d *)((char *)&dword_30 + 2), 0xFFu, (unsigned __int8)&dword_30 + 2, 0x64u, v130); glLineWidth(); v132 = *((float *)this + 121); v184 = v222 > v132; *((float *)this + 118) = -1.0; LABEL_244: v185 = !v184; if ( ((v60 >= v132) & (unsigned __int8)v185 & (v132 > 0.0)) != 0 ) goto LABEL_168; LABEL_248: v186 = *((float *)this + 122); if ( v186 > 0.0 && v62 <= v186 && v67 >= v186 ) { v187 = v222; if ( v222 <= -3000.0 ) v187 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v187, v186); v188 = v60; if ( v60 >= 240000.0 ) v188 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v188, *((float *)this + 122)); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v189); } goto LABEL_173; } cocos2d::ccDrawColor4B((cocos2d *)((char *)&dword_30 + 2), 0xFFu, (unsigned __int8)&dword_30 + 2, 0xFFu, v130); glLineWidth(); LevelTools::posForTimeInternal( *((LevelTools **)this + 70), *((float *)this + 119), (cocos2d::CCArray *)*(unsigned int *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 332LL), *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 341LL), 1u, 1u, (_DWORD *)(*((_QWORD *)this + 62) + 832LL), (cocos2d::CCPoint *)&v228); v132 = *(float *)&v228; if ( *(float *)&v228 <= 0.0 ) { v197 = HIDWORD(v228); if ( *((float *)&v228 + 1) > 0.0 ) { *((_DWORD *)this + 121) = 0; *((_DWORD *)this + 122) = v197; goto LABEL_248; } v132 = *((float *)this + 121); v184 = v222 > v132; goto LABEL_244; } *((_DWORD *)this + 121) = v228; *((_DWORD *)this + 122) = 0; if ( v222 > v132 || v60 < v132 ) goto LABEL_248; LABEL_168: v133 = v62; if ( v62 <= -3000.0 ) v133 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v132, v133); v134 = v67; if ( v67 >= v50 ) v134 = v50; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, *((float *)this + 121), v134); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v135); LABEL_173: v23 = *((_QWORD *)this + 62); v136 = *(float *)(v23 + 14584); if ( (v136 != 0.0 || *(float *)(v23 + 14588) != 0.0) && v136 > 0.0 && v222 <= v136 && v60 >= v136 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0x96u, 0, 0xFFu, v131); glLineWidth(); v137 = v62; if ( v62 <= -3000.0 ) v137 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v136, v137); v138 = v67; if ( v67 >= v50 ) v138 = v50; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v136, v138); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v139); v23 = *((_QWORD *)this + 62); } LABEL_10: v13 = *(_DWORD *)(v23 + 1972); if ( v13 == 1 ) goto LABEL_190; if ( *(_BYTE *)(v23 + 14297) ) { if ( !*(_BYTE *)(v23 + 14003) ) { v14 = *(_QWORD *)(v23 + 14248); if ( !*(_BYTE *)(v14 + 1589) ) { v15 = *(cocos2d::CCNode **)(v23 + 3920); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v228, *(float *)&v224 * 0.5, (float)(*(float *)(v14 + 856) * 0.5) + (float)(*((float *)&v224 + 1) * 0.5)); cocos2d::CCNode::convertToNodeSpace(&v225, v15, (const cocos2d::CCPoint *)&v228); cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x32u, v16); glLineWidth(); v17 = v62; if ( v62 <= -3000.0 ) v17 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, *(float *)&v225, v17); v18 = v67; if ( v67 >= v50 ) v18 = v50; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, *(float *)&v225, v18); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v19); v20 = v222; if ( v222 <= -3000.0 ) v20 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v20, *((float *)&v225 + 1)); v21 = v60; if ( v60 >= 240000.0 ) v21 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v21, *((float *)&v225 + 1)); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v22); v23 = *((_QWORD *)this + 62); v13 = *(_DWORD *)(v23 + 1972); } } } if ( v13 ) { LABEL_190: v143 = (GJBaseGameLayer *)v23; if ( !*(_BYTE *)(v23 + 1010) ) { if ( (unsigned __int8)PlayerObject::isFlying(*(PlayerObject **)(v23 + 3256)) ) { v143 = *((GJBaseGameLayer **)this + 62); } else { v143 = *((GJBaseGameLayer **)this + 62); v201 = *((_QWORD *)v143 + 407); if ( !*(_BYTE *)(v201 + 2419) && !*(_BYTE *)(v201 + 2422) ) goto LABEL_24; } } GJBaseGameLayer::getMinPortalY(v143); v145 = v144; GJBaseGameLayer::getMaxPortalY(*((GJBaseGameLayer **)this + 62)); v147 = v146; glLineWidth(); cocos2d::ccDrawColor4B((cocos2d *)0xFFFFFFFFLL, 0xAFu, 0x32u, 0xFFu, v148); if ( v145 == 90.0 ) { v152 = v222; if ( v222 > -3000.0 ) goto LABEL_197; } else { v149 = v222; if ( v222 <= -3000.0 ) v149 = -3000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v149, v145); v150 = v60; if ( v60 >= 240000.0 ) v150 = 240000.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v150, v145); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v151); v152 = v222; if ( v222 > -3000.0 ) { LABEL_197: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v152, v147); v153 = v60; if ( v60 < 240000.0 ) { LABEL_198: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v153, v147); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v154); goto LABEL_24; } LABEL_261: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, 240000.0, v147); cocos2d::ccDrawLine((cocos2d *)&v226, (const cocos2d::CCPoint *)&v228, v191); goto LABEL_24; } } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, -3000.0, v147); v153 = v60; if ( v60 < 240000.0 ) goto LABEL_198; goto LABEL_261; } LABEL_24: if ( v4 == 1 ) goto LABEL_61; v24 = *((_QWORD *)this + 62); if ( !*(_BYTE *)(v24 + 14006) ) goto LABEL_61; v25 = *(_QWORD *)(v24 + 14032); if ( !v25 ) goto LABEL_61; v26 = *(unsigned int **)(v25 + 56); if ( !*v26 ) goto LABEL_61; v27 = *((__int64 **)v26 + 2); v28 = 8LL * *v26 - 8; v29 = (char *)v27 + v28; if ( v27 > (__int64 *)((char *)v27 + v28) ) goto LABEL_61; v30 = *v27; v31 = 0; if ( !*v27 ) goto LABEL_61; do { if ( v9 && *(_BYTE *)(v30 + 1294) ) goto LABEL_32; if ( !v221 ) goto LABEL_33; if ( *(_BYTE *)(v30 + 1259) ) { LABEL_32: if ( !*(_BYTE *)(v30 + 1133) ) goto LABEL_57; LABEL_33: if ( !*((_BYTE *)this + 600) ) goto LABEL_34; goto LABEL_273; } if ( !*((_BYTE *)this + 600) ) { LABEL_34: v32 = *(_DWORD *)(v30 + 1028); v33 = *(float *)(v30 + 1452); if ( v32 != 1006 ) goto LABEL_35; goto LABEL_274; } LABEL_273: cocos2d::CCPoint::operator=(v30 + 1800, &dword_155C6A8); v32 = *(_DWORD *)(v30 + 1028); v33 = *(float *)(v30 + 1452); if ( v32 != 1006 ) { LABEL_35: if ( v32 == 3602 ) v33 = *(float *)(v30 + 1976); goto LABEL_37; } LABEL_274: v33 = (float)(*(float *)(v30 + 1592) + *(float *)(v30 + 1596)) + *(float *)(v30 + 1600); LABEL_37: if ( v33 > 0.0 ) { (*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v30 + 1360LL))(&v225, v30); if ( v60 >= *(float *)&v225 && *((float *)&v225 + 1) <= v50 && (!*(_BYTE *)(v30 + 650) || *(_BYTE *)(v30 + 1133)) ) { v34 = v30 + 1800; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, (const cocos2d::CCPoint *)(v30 + 1800)); if ( *(_BYTE *)(v30 + 1473) ) { v35 = *(float *)&v225 + (float)(v33 * 311.58); v227 = *((float *)&v225 + 1); v226 = v35; } else { v35 = v226; if ( v226 == 0.0 && v227 == 0.0 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, (const cocos2d::CCPoint *)&v225); v207 = (LevelTools *)LevelTools::timeForPos( (float *)&v228, *((cocos2d::CCArray **)this + 70), *(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 332LL), *(_DWORD *)(v30 + 1772), *(_DWORD *)(v30 + 1776), 0, *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 341LL), 1u, 0, 0); v211 = v208; LastGameplayRotated = (unsigned __int8)LevelTools::getLastGameplayRotated(v207); LevelTools::posForTimeInternal( *((LevelTools **)this + 70), v33 + v211, (cocos2d::CCArray *)*(unsigned int *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 332LL), *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 62) + 3272LL) + 341LL), 0, 1u, (_DWORD *)(*((_QWORD *)this + 62) + 832LL), (cocos2d::CCPoint *)&v228); cocos2d::CCPoint::operator=(&v226, &v228); if ( LastGameplayRotated == (unsigned __int8)LevelTools::getLastGameplayRotated(v210) ) { if ( LastGameplayRotated ) v226 = *(float *)&v225; else v227 = *((float *)&v225 + 1); } cocos2d::CCPoint::operator=(v34, &v226); v35 = v226; } } if ( v222 <= v35 && v62 <= v227 && v31 <= 1197 ) { v36 = *(float *)&v225; v37 = 8LL * v31; v38 = *((_QWORD *)this + 51) + v37; if ( v222 >= *(float *)&v225 ) v36 = v222; v39 = *((float *)&v225 + 1); if ( v62 >= *((float *)&v225 + 1) ) v39 = v62; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v36, v39); cocos2d::CCPoint::operator=(v38, &v228); v40 = v226; v41 = *((_QWORD *)this + 51) + v37 + 8; if ( v60 <= v226 ) v40 = v60; v42 = v227; if ( v67 <= v227 ) v42 = v67; v31 += 2; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, v40, v42); cocos2d::CCPoint::operator=(v41, &v228); } } } LABEL_57: if ( v29 < (char *)++v27 ) break; v30 = *v27; } while ( *v27 ); if ( v31 ) { glLineWidth(); cocos2d::ccDrawColor4B( (cocos2d *)((char *)&qword_60 + 4), (unsigned __int8)&qword_60 + 4, (unsigned __int8)&qword_60 + 4, 0x4Bu, v43); cocos2d::ccDrawLines(*((cocos2d **)this + 51), (const cocos2d::CCPoint *)(unsigned int)v31, v44); } LABEL_61: glLineWidth(); *((_BYTE *)this + 600) = 0; return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source