// // DrawGridLayer::draw from 0x14040a8a0 to 0x14040c2fd (6749 bytes) // // 2 xrefs: // > @ 0x14078a6d0 // > @ 0x140925cdc // // This function is hookable on this platform (idp: pc, 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 11:32:01 +0000 // // Hidden C++ exception states: #wind=4 void __fastcall DrawGridLayer::draw(__int64 a1) { __int64 v2; // rax float v3; // ecx bool v4; // r15 bool v5; // bl __int64 v6; // rcx __int64 v7; // rcx unsigned int v8; // r8d cocos2d::CCArray *v9; // rcx int v10; // esi int v11; // eax float v12; // xmm13_4 char v13; // r12 const struct cocos2d::CCPoint *v14; // rax __int64 v15; // rcx __int64 v16; // rax __int64 v17; // rbx __int64 v18; // rax float *v19; // rax float v20; // xmm14_4 float v21; // xmm0_4 float v22; // xmm12_4 __int64 v23; // rbx __int64 v24; // rax __int64 v25; // rax float v26; // xmm11_4 float v27; // xmm0_4 float v28; // xmm9_4 int v29; // edi float v30; // xmm6_4 int v31; // r14d float v32; // xmm6_4 const struct cocos2d::CCPoint *v33; // rax const struct cocos2d::CCPoint *v34; // rbx cocos2d *v35; // rax const struct cocos2d::CCPoint *v36; // r8 __int64 v37; // rax __int64 v38; // rbx __int64 v39; // rax float v40; // xmm6_4 float v41; // xmm7_4 int v42; // r14d int v43; // esi float v44; // xmm6_4 const struct cocos2d::CCPoint *v45; // rax const struct cocos2d::CCPoint *v46; // rbx cocos2d *v47; // rax const struct cocos2d::CCPoint *v48; // r8 __int64 v49; // rax __int64 v50; // rbx __int64 v51; // rax unsigned int v52; // r8d const struct cocos2d::CCPoint *v53; // rax const struct cocos2d::CCPoint *v54; // rbx cocos2d *v55; // rax const struct cocos2d::CCPoint *v56; // r8 int v57; // r12d int v58; // ebx cocos2d::CCArray *v59; // rcx unsigned int v60; // edi int v61; // esi int v62; // r14d int v63; // r15d cocos2d::CCString *v64; // rax cocos2d *v65; // rcx float v66; // xmm0_4 float v67; // xmm6_4 cocos2d::CCString *v68; // rax float v69; // xmm0_4 __int64 v70; // rax __int64 v71; // rbx __int64 v72; // rax __int64 v73; // rax __int64 v74; // rbx __int64 v75; // rax __int64 v76; // rax __int64 v77; // rbx __int64 v78; // rax unsigned int v79; // r8d unsigned int v80; // r8d unsigned int v81; // ebx unsigned int v82; // r8d __int64 *v83; // rdi __int64 *v84; // rbx float v85; // xmm15_4 __int64 v86; // r15 int v87; // edx float v88; // xmm7_4 int v89; // eax float v90; // xmm9_4 float v91; // xmm6_4 float v92; // xmm10_4 int v93; // r12d float v94; // xmm7_4 float v95; // xmm11_4 int v96; // edi int v97; // esi int v98; // ebx int v99; // r14d int v100; // ecx unsigned int v101; // ebx unsigned int v102; // r8d unsigned int v103; // ebx unsigned int v104; // r8d int v105; // r14d float v106; // r12d float v107; // xmm7_4 __int64 v108; // rdi unsigned int *v109; // rdi __int64 v110; // rax _QWORD *v111; // rdi _QWORD *v112; // r15 int v113; // esi _BYTE *v114; // rbx float *v115; // rax float v116; // xmm6_4 __int64 v117; // rax __int64 v118; // rbx __int64 v119; // rax unsigned int v120; // r8d unsigned int i; // edi struct cocos2d::CCObject *v122; // rax struct cocos2d::CCObject *v123; // rbx float v124; // xmm6_4 __int64 v125; // rax float v126; // xmm1_4 float v127; // xmm7_4 float v128; // xmm6_4 const struct cocos2d::CCPoint *v129; // rax const struct cocos2d::CCPoint *v130; // rbx cocos2d *v131; // rax const struct cocos2d::CCPoint *v132; // r8 const struct cocos2d::CCPoint *v133; // rax const struct cocos2d::CCPoint *v134; // rbx cocos2d *v135; // rax const struct cocos2d::CCPoint *v136; // r8 __int64 *v137; // rdi __int64 v138; // rax int v139; // edx float v140; // xmm0_4 float v141; // xmm1_4 float v142; // xmm7_4 const struct cocos2d::CCPoint *v143; // rax float v144; // xmm9_4 float v145; // xmm2_4 const struct cocos2d::CCPoint *v146; // rbx cocos2d *v147; // rax const struct cocos2d::CCPoint *v148; // r8 __int64 v149; // rcx float v150; // xmm6_4 const struct cocos2d::CCPoint *v151; // rax const struct cocos2d::CCPoint *v152; // rbx cocos2d *v153; // rax const struct cocos2d::CCPoint *v154; // r8 __int64 v155; // rbx __int64 *v156; // rax __int64 v157; // rcx __int64 v158; // rbx __int64 v159; // rax float v160; // xmm10_4 const struct cocos2d::CCPoint *v161; // rax const struct cocos2d::CCPoint *v162; // rbx cocos2d *v163; // rax const struct cocos2d::CCPoint *v164; // r8 const struct cocos2d::CCPoint *v165; // rax const struct cocos2d::CCPoint *v166; // rbx cocos2d *v167; // rax const struct cocos2d::CCPoint *v168; // r8 __int64 v169; // rcx __int64 *v170; // rbx _BYTE *v171; // rax __int64 *v172; // rdi float MinPortalY; // xmm6_4 float MaxPortalY; // xmm7_4 const struct cocos2d::CCPoint *v175; // rax const struct cocos2d::CCPoint *v176; // rbx cocos2d *v177; // rax const struct cocos2d::CCPoint *v178; // r8 const struct cocos2d::CCPoint *v179; // rax const struct cocos2d::CCPoint *v180; // rbx cocos2d *v181; // rax const struct cocos2d::CCPoint *v182; // r8 __int64 v183; // rcx int v184; // r14d unsigned int *v185; // r12 __int64 v186; // rax __int64 *v187; // r12 __int64 *v188; // r15 __int64 v189; // rsi float v190; // xmm6_4 int v191; // eax float v192; // xmm1_4 __int64 v193; // rcx int v194; // r15d char v195; // bl int v196; // edi int v197; // esi __int64 v198; // r14 int v199; // eax char v200; // bl int v201; // edx __int64 v202; // rax __int64 v203; // rsi __int64 v204; // rax __int64 v205; // rbx __int64 v206; // rax unsigned int v207; // r8d __int64 *v208; // [rsp+58h] [rbp-B0h] BYREF int v209; // [rsp+60h] [rbp-A8h] float v210; // [rsp+64h] [rbp-A4h] float v211; // [rsp+68h] [rbp-A0h] BYREF float v212; // [rsp+6Ch] [rbp-9Ch] __int64 v213; // [rsp+70h] [rbp-98h] BYREF __int64 *v214; // [rsp+78h] [rbp-90h] BYREF int v215; // [rsp+80h] [rbp-88h] __int64 *v216; // [rsp+88h] [rbp-80h] BYREF float v217; // [rsp+90h] [rbp-78h] BYREF float v218; // [rsp+94h] [rbp-74h] char v219; // [rsp+98h] [rbp-70h] BYREF char v220; // [rsp+A0h] [rbp-68h] BYREF void *v221; // [rsp+A8h] [rbp-60h] BYREF char v222; // [rsp+B0h] [rbp-58h] BYREF char v223; // [rsp+B8h] [rbp-50h] BYREF void *v224; // [rsp+C0h] [rbp-48h] BYREF char v225; // [rsp+C8h] [rbp-40h] BYREF char v226; // [rsp+D0h] [rbp-38h] BYREF char v227; // [rsp+D8h] [rbp-30h] BYREF char v228; // [rsp+E0h] [rbp-28h] BYREF char v229; // [rsp+E8h] [rbp-20h] BYREF char v230; // [rsp+F0h] [rbp-18h] BYREF void *v231; // [rsp+1E8h] [rbp+E0h] bool GameVariable; // [rsp+1E8h] [rbp+E0h] void *v233; // [rsp+1F0h] [rbp+E8h] bool v234; // [rsp+1F0h] [rbp+E8h] float v235; // [rsp+1F8h] [rbp+F0h] BYREF float v236; // [rsp+1FCh] [rbp+F4h] float v237; // [rsp+200h] [rbp+F8h] BYREF float v238; // [rsp+204h] [rbp+FCh] v2 = *(_QWORD *)(a1 + 520); if ( !*(_QWORD *)(v2 + 14904) ) return; v3 = *(float *)(v2 + 2204); v211 = v3; v4 = *(_BYTE *)(v2 + 14657) && (LODWORD(v3) != 1 || !*(_BYTE *)(v2 + 14658)); v5 = *(_BYTE *)(v2 + 14660) && LODWORD(v3) != 1; LOBYTE(v235) = v5; v6 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v231 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v231); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v6 = qword_14090BFD0; } GameVariable = GameManager::getGameVariable(v6, "0121"); v7 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v233 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v233); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v7 = qword_14090BFD0; } v234 = GameManager::getGameVariable(v7, "0209"); if ( v5 ) { if ( *(_BYTE *)(a1 + 516) ) { *(_BYTE *)(a1 + 516) = 0; v9 = *(cocos2d::CCArray **)(a1 + 576); if ( v9 ) { if ( cocos2d::CCArray::count(v9) ) qsort( *(void **)(*(_QWORD *)(*(_QWORD *)(a1 + 576) + 56LL) + 16LL), **(unsigned int **)(*(_QWORD *)(a1 + 576) + 56LL), 8u, (_CoreCrtNonSecureSearchSortCompareFunction)sub_14030B1E0); } } } v10 = 1; v215 = 1; cocos2d::ccGLBlendFunc((cocos2d *)1, 0x303u, v8); v11 = 80; if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 520) + 3528LL) + 461LL) ) v11 = 1000; v12 = (float)((float)v11 * 30.0) + 90.0; cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x96u); glLineWidth(1.0); v13 = *(_BYTE *)(*(_QWORD *)(a1 + 520) + 14661LL); v14 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 200LL))(*(_QWORD *)(a1 + 560)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v225, v14); v16 = cocos2d::CCDirector::sharedDirector(v15); cocos2d::CCDirector::getWinSize(v16, &v217); v17 = *(_QWORD *)(a1 + 560); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(v17, &v214, v18); v20 = *v19; v21 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 168LL))(*(_QWORD *)(a1 + 560)); v22 = (float)(v217 / v21) + v20; v23 = *(_QWORD *)(a1 + 560); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(v23, &v214, v24); v210 = *(float *)(v25 + 4); v26 = v210; v27 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 560) + 168LL))(*(_QWORD *)(a1 + 560)); v28 = (float)(v218 / v27) + v210; v237 = v28; v29 = 0; v30 = *(float *)(a1 + 636); v31 = (int)floorf(v20 / v30); if ( v22 > (float)((float)v31 * v30) ) { do { v32 = (float)v31 * *(float *)(a1 + 636); if ( v32 >= -3000.0 && v32 <= 240000.0 ) { if ( v32 == 0.0 || v32 == 240000.0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xFFu, 0xFFu, 0x96u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v214, v32, fminf(v12, v28)); v34 = v33; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v216, v32, fmaxf(-3000.0, v210)); cocos2d::ccDrawLine(v35, v34, v36); } else if ( v4 && v10 + 1 < 1200 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v219, v32, fmaxf(-3000.0, v210)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v29, v37); v38 = *(_QWORD *)(a1 + 408) + 8LL * v10; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v220, v32, fminf(v12, v28)); cocos2d::CCPoint::operator=(v38, v39); v29 += 2; v10 += 2; } } ++v31; } while ( v22 > v32 ); } v40 = *(float *)(a1 + 636); v41 = fmodf(90.0, v40); v42 = (int)floorf((float)(v210 - v41) / v40); if ( v28 > (float)((float)((float)v42 * v40) + v41) ) { v43 = v29 + 1; do { v44 = (float)((float)v42 * *(float *)(a1 + 636)) + v41; if ( v44 >= -3000.0 && v12 >= v44 && v44 != 90.0 ) { if ( v44 == v12 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xFFu, 0xFFu, 0x96u); glLineWidth(2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v219, fminf(240000.0, v22), v44); v46 = v45; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, fmaxf(-3000.0, v20), v44); cocos2d::ccDrawLine(v47, v46, v48); } else if ( v4 && v43 + 1 < 1200 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, fmaxf(-3000.0, v20), v44); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v29, v49); v50 = *(_QWORD *)(a1 + 408) + 8LL * v43; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v227, fminf(240000.0, v22), v44); cocos2d::CCPoint::operator=(v50, v51); v29 += 2; v43 += 2; } } ++v42; } while ( v28 > v44 ); } if ( v4 && v29 > 0 ) { cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x96u); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 408), (const struct cocos2d::CCPoint *)(unsigned int)v29, v52); } if ( !v13 && v26 <= 90.0 && v28 >= 90.0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xFFu, 0xFFu, 0x96u); glLineWidth(2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v228, fminf(240000.0, v22), 90.0); v54 = v53; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v229, fmaxf(-3000.0, v20), 90.0); cocos2d::ccDrawLine(v55, v54, v56); } v57 = 0; v58 = 0; v209 = 0; LODWORD(v208) = 0; if ( !qword_14090BFD0 ) { v224 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v224); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } if ( *(_BYTE *)(qword_14090BFD0 + 953) ) { v59 = *(cocos2d::CCArray **)(a1 + 568); if ( v59 ) { v60 = 0; if ( cocos2d::CCArray::count(v59) ) { v61 = 1; v62 = 1; v63 = 1; while ( 1 ) { v64 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 568), v60); v66 = cocos2d::CCString::floatValue(v64); v67 = v66; if ( v66 >= -3000.0 ) break; LABEL_69: v60 += 2; if ( v60 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 568)) ) { LABEL_70: if ( v57 > 0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0x7Fu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 408), (const struct cocos2d::CCPoint *)(unsigned int)v57, v79); } if ( v58 > 0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xFFu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 416), (const struct cocos2d::CCPoint *)(unsigned int)v58, v80); } v81 = (unsigned int)v208; if ( (int)v208 > 0 ) { LOBYTE(v65) = 127; cocos2d::ccDrawColor4B(v65, 0xFFu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 424), (const struct cocos2d::CCPoint *)v81, v82); } goto LABEL_76; } } if ( v66 >= v20 && v22 >= v66 ) { v68 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 568), v60 + 1); v69 = cocos2d::CCString::floatValue(v68); if ( v69 == 0.89999998 ) { if ( v63 + 1 < 1200 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v224, v67, fmaxf(-3000.0, v26)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 416) + 8LL * v58, v70); v71 = *(_QWORD *)(a1 + 416) + 8LL * v63; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v230, v67, fminf(v12, v28)); cocos2d::CCPoint::operator=(v71, v72); v58 = v209 + 2; v209 += 2; v63 += 2; } } else { if ( v69 == 1.0 ) { if ( v62 + 1 >= 1200 ) goto LABEL_68; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v222, v67, fmaxf(-3000.0, v26)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 424) + 8LL * (int)v208, v73); v74 = *(_QWORD *)(a1 + 424) + 8LL * v62; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v223, v67, fminf(v12, v28)); cocos2d::CCPoint::operator=(v74, v75); LODWORD(v208) = (_DWORD)v208 + 2; v62 += 2; } else { if ( v61 + 1 >= 1200 ) goto LABEL_68; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v221, v67, fmaxf(-3000.0, v26)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v57, v76); v77 = *(_QWORD *)(a1 + 408) + 8LL * v61; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v67, fminf(v12, v28)); cocos2d::CCPoint::operator=(v77, v78); v57 += 2; v61 += 2; } v58 = v209; } } LABEL_68: if ( v67 > v22 ) goto LABEL_70; goto LABEL_69; } } } LABEL_76: if ( !qword_14090BFD0 ) { v221 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v221); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); } if ( *(_BYTE *)(qword_14090BFD0 + 954) ) { LODWORD(v208) = 0; v209 = 0; v83 = *(__int64 **)(a1 + 440); v214 = v83; v84 = (__int64 *)*v83; v216 = v84; if ( v84 != v83 ) { v85 = v237; do { v86 = v84[3]; if ( !*(_BYTE *)(v86 + 1868) ) { v87 = *(_DWORD *)(v86 + 1856); if ( v87 > 0 && ((!GameVariable || !*(_BYTE *)(v86 + 1302)) && (!v234 || !*(_BYTE *)(v86 + 1267)) || *(_BYTE *)(v86 + 1141)) ) { v88 = *(float *)(a1 + 616); switch ( *(_DWORD *)(v86 + 1864) ) { case 1: v88 = *(float *)(a1 + 612); break; case 2: v88 = *(float *)(a1 + 620); break; case 3: v88 = *(float *)(a1 + 624); break; case 4: v88 = *(float *)(a1 + 628); break; } v89 = *(_DWORD *)(v86 + 1860); if ( v89 > 0 ) v87 *= v89; v90 = (float)(60.0 / (float)v87) * v88; v91 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v86 + 200LL))(v84[3]); v92 = fminf(v22, (float)(v88 * *(float *)(v86 + 1468)) + v91); v93 = 0; if ( v20 > v91 ) { v93 = (int)ceilf((float)(v20 - v91) / v90); v91 = v91 + (float)((float)v93 * v90); } if ( v92 > v91 ) { v94 = fmaxf(-3000.0, v26); v95 = fminf(v12, v85); v96 = (int)v208; v97 = (_DWORD)v208 + 1; v98 = v209; v99 = v209 + 1; do { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v220, v91, v94); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v219, v91, v95); v100 = *(_DWORD *)(v86 + 1860); if ( v100 > 0 && v93 % v100 ) { if ( v99 + 1 < 1200 ) { cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 416) + 8LL * v98, &v220); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 416) + 8LL * v99, &v219); v98 += 2; v99 += 2; } } else if ( v97 + 1 < 1200 ) { cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v96, &v220); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v97, &v219); v96 += 2; v97 += 2; } v91 = v91 + v90; ++v93; } while ( v92 > v91 ); v209 = v98; LODWORD(v208) = v96; v84 = v216; v26 = v210; v83 = v214; } } } v84 = (__int64 *)*v84; v216 = v84; } while ( v84 != v83 ); v101 = (unsigned int)v208; if ( (int)v208 > 0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xFFu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 408), (const struct cocos2d::CCPoint *)v101, v102); } v103 = v209; if ( v209 > 0 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0x7Fu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 416), (const struct cocos2d::CCPoint *)v103, v104); } v28 = v237; } } glLineWidth(1.0); v105 = 0; v106 = v211; if ( LODWORD(v211) != 1 ) { if ( LOBYTE(v235) ) { cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0x96u); v107 = -1.0; v108 = *(_QWORD *)(a1 + 576); if ( v108 ) { v109 = *(unsigned int **)(v108 + 56); v110 = *v109; if ( (_DWORD)v110 ) { v111 = *((_QWORD **)v109 + 2); v112 = &v111[v110 - 1]; if ( v111 <= v112 ) { v113 = 1; do { v114 = (_BYTE *)*v111; if ( !*v111 ) break; v115 = (float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v114 + 200LL))(*v111); v116 = *v115; if ( *v115 < v20 || v22 < v116 ) { if ( v116 > v22 ) break; } else if ( (!v114[654] && (!GameVariable || !v114[1302]) && (!v234 || !v114[1267]) || v114[1141]) && !v114[1488] && !v114[1489] && v116 > v107 ) { v107 = *v115; if ( v113 + 1 < 1200 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, v116, fmaxf(-3000.0, v26)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v105, v117); v118 = *(_QWORD *)(a1 + 408) + 8LL * v113; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v116, fminf(v12, v28)); cocos2d::CCPoint::operator=(v118, v119); v105 += 2; v113 += 2; } } ++v111; } while ( v111 <= v112 ); if ( v105 > 0 ) { cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0x96u); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 408), (const struct cocos2d::CCPoint *)(unsigned int)v105, v120); } } } } } glLineWidth(2.0); cocos2d::ccDrawColor4B(nullptr, 0xFFu, 0xFFu, 0xFFu); for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 584)); ++i ) { v122 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 584), i); v123 = v122; if ( (!GameVariable || !*((_BYTE *)v122 + 1302)) && (!v234 || !*((_BYTE *)v122 + 1267)) || *((_BYTE *)v122 + 1141) ) { if ( (*(unsigned int (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v122 + 1648LL))(v122) == 16 ) { v124 = 240.0; } else if ( (*(unsigned int (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v123 + 1648LL))(v123) == 33 ) { v124 = 270.0; } else { v124 = 300.0; } v125 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v123 + 200LL))(v123); v126 = fmaxf(90.0, floorf((float)((float)(*(float *)(v125 + 4) - (float)(v124 * 0.5)) + 0.0) / 30.0) * 30.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, v126, (float)(v124 + v126) - 0.0); v127 = v235; v128 = v236; if ( v235 >= -3000.0 && v12 >= v235 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, fminf(240000.0, v22), v235); v130 = v129; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v221, fmaxf(-3000.0, v20), v127); cocos2d::ccDrawLine(v131, v130, v132); } if ( v128 >= -3000.0 && v12 >= v128 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v223, fminf(240000.0, v22), v128); v134 = v133; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v222, fmaxf(-3000.0, v20), v128); cocos2d::ccDrawLine(v135, v134, v136); } } } } v137 = (__int64 *)(a1 + 520); v138 = *(_QWORD *)(a1 + 520); if ( *(_DWORD *)(v138 + 2204) ) { *(_QWORD *)(a1 + 508) = 0; v144 = v210; goto LABEL_181; } if ( *(_BYTE *)(*(_QWORD *)(v138 + 14904) + 716LL) ) { cocos2d::ccDrawColor4B((cocos2d *)0x32, 0xFFu, 0x32u, 0xFFu); glLineWidth(5.0); LevelTools::posForTimeInternal( (unsigned int)&v235, v139, *(_QWORD *)(a1 + 592), *(_DWORD *)(*(_QWORD *)(*v137 + 3528) + 332LL), *(_BYTE *)(*(_QWORD *)(*v137 + 3528) + 341LL), 1, 1, *v137 + 832); if ( v235 <= 0.0 ) { v140 = v236; if ( v236 > 0.0 ) { *(_DWORD *)(a1 + 508) = 0; *(float *)(a1 + 512) = v140; } } else { *(float *)(a1 + 508) = v235; *(_DWORD *)(a1 + 512) = 0; } } else { cocos2d::ccDrawColor4B((cocos2d *)0x32, 0xFFu, 0x32u, 0x64u); glLineWidth(3.0); *(_DWORD *)(a1 + 496) = -1082130432; } v141 = *(float *)(a1 + 508); if ( v141 <= 0.0 || v141 < v20 || v22 < v141 ) { v145 = *(float *)(a1 + 512); v144 = v210; v142 = v237; if ( v145 <= 0.0 || v145 < v210 || v237 < v145 ) goto LABEL_174; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, fminf(240000.0, v22), v145); v141 = fmaxf(-3000.0, v20); } else { v142 = v237; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, v141, fminf(v12, v237)); v144 = v210; v145 = fmaxf(-3000.0, v210); } v146 = v143; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v141, v145); cocos2d::ccDrawLine(v147, v146, v148); LABEL_174: v149 = *(_QWORD *)(a1 + 520); v150 = *(float *)(v149 + 15272); if ( v150 != 0.0 || (v137 = (__int64 *)(a1 + 520), *(float *)(v149 + 15276) != 0.0) ) { v137 = (__int64 *)(a1 + 520); if ( v150 > 0.0 ) { v137 = (__int64 *)(a1 + 520); if ( v150 >= v20 ) { v137 = (__int64 *)(a1 + 520); if ( v22 >= v150 ) { cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0x96u, 0, 0xFFu); glLineWidth(2.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, v150, fminf(v12, v142)); v152 = v151; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v150, fmaxf(-3000.0, v144)); cocos2d::ccDrawLine(v153, v152, v154); v137 = (__int64 *)(a1 + 520); } } } } LABEL_181: v155 = *v137; v156 = v137; v208 = v137; if ( *(_DWORD *)(v155 + 2204) == 1 || (v208 = v137, !*(_BYTE *)(v155 + 14953)) || (v208 = v137, *(_BYTE *)(v155 + 14659)) || (v157 = *(_QWORD *)(v155 + 14904), v208 = v137, *(_BYTE *)(v157 + 1661)) ) { v160 = v237; } else { v158 = *(_QWORD *)(v155 + 4296); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v213, v217 * 0.5, (float)(*(float *)(v157 + 904) * 0.5) + (float)(v218 * 0.5)); cocos2d::CCNode::convertToNodeSpace(v158, &v235, v159); cocos2d::ccDrawColor4B(nullptr, 0, 0, 0x32u); glLineWidth(2.0); v160 = v237; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, v235, fminf(v12, v237)); v162 = v161; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, v235, fmaxf(-3000.0, v144)); cocos2d::ccDrawLine(v163, v162, v164); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, fminf(240000.0, v22), v236); v166 = v165; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, fmaxf(-3000.0, v20), v236); cocos2d::ccDrawLine(v167, v166, v168); v156 = (__int64 *)(a1 + 520); v208 = (__int64 *)(a1 + 520); } v169 = *v137; if ( !*(_DWORD *)(*v137 + 2204) ) { v172 = v208; goto LABEL_201; } v170 = v156; if ( *(_BYTE *)(v169 + 1058) ) { LABEL_197: v172 = v170; v208 = v170; MinPortalY = GJBaseGameLayer::getMinPortalY(v169); MaxPortalY = GJBaseGameLayer::getMaxPortalY(*v170); glLineWidth(2.0); cocos2d::ccDrawColor4B((cocos2d *)0xFF, 0xAFu, 0x32u, 0xFFu); if ( MinPortalY != 90.0 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, fminf(240000.0, v22), MinPortalY); v176 = v175; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, fmaxf(-3000.0, v20), MinPortalY); cocos2d::ccDrawLine(v177, v176, v178); } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v235, fminf(240000.0, v22), MaxPortalY); v180 = v179; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, fmaxf(-3000.0, v20), MaxPortalY); cocos2d::ccDrawLine(v181, v180, v182); goto LABEL_201; } v171 = *(_BYTE **)(v169 + 3512); if ( v171[2497] || v171[2498] || v171[2500] || v171[2508] ) { v170 = (__int64 *)(a1 + 520); goto LABEL_197; } v172 = (__int64 *)(a1 + 520); v208 = (__int64 *)(a1 + 520); v170 = (__int64 *)(a1 + 520); if ( v171[2499] || v171[2502] ) goto LABEL_197; LABEL_201: if ( LODWORD(v106) != 1 ) { if ( *(_BYTE *)(*v172 + 14662) ) { v183 = *(_QWORD *)(*v172 + 14688); *(float *)&v184 = 0.0; v235 = 0.0; if ( v183 ) { v185 = *(unsigned int **)(v183 + 56); v186 = *v185; if ( (_DWORD)v186 ) { v187 = *((__int64 **)v185 + 2); v188 = &v187[v186 - 1]; v216 = v188; if ( v187 <= v188 ) { do { v189 = *v187; if ( !*v187 ) break; if ( (!GameVariable || !*(_BYTE *)(v189 + 1302)) && (!v234 || !*(_BYTE *)(v189 + 1267)) || *(_BYTE *)(v189 + 1141) ) { if ( *(_BYTE *)(a1 + 632) ) cocos2d::CCPoint::operator=(v189 + 1816, &dword_14090AF10); v190 = *(float *)(v189 + 1468); v191 = *(_DWORD *)(v189 + 1036); if ( v191 == 1006 ) { v190 = (float)(*(float *)(v189 + 1612) + *(float *)(v189 + 1608)) + *(float *)(v189 + 1616); } else if ( v191 == 3602 ) { v190 = *(float *)(v189 + 2000); } if ( v190 > 0.0 ) { (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v189 + 1208LL))(v189, &v211); if ( v22 >= v211 && v12 >= v212 && (!*(_BYTE *)(v189 + 654) || *(_BYTE *)(v189 + 1141)) ) { v214 = (_QWORD *)(v189 + 1816); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v237, (const struct cocos2d::CCPoint *)(v189 + 1816)); if ( *(_BYTE *)(v189 + 1489) ) { v238 = v212; v192 = (float)(v190 * 311.58011) + v211; v237 = v192; } else { v192 = v237; if ( v237 == 0.0 && v238 == 0.0 ) { v193 = *(_QWORD *)(*v172 + 3528); v194 = *(_DWORD *)(v193 + 332); v195 = *(_BYTE *)(v193 + 341); v196 = *(_DWORD *)(v189 + 1792); v197 = *(_DWORD *)(v189 + 1788); v198 = *(_QWORD *)(a1 + 592); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v213, (const struct cocos2d::CCPoint *)&v211); LevelTools::timeForPos(v199, v198, v194, v197, v196, 0, v195, 1, 0, 0); v200 = byte_1409097DF; v172 = v208; v202 = LevelTools::posForTimeInternal( (unsigned int)&v221, v201, *(_QWORD *)(a1 + 592), *(_DWORD *)(*(_QWORD *)(*v208 + 3528) + 332LL), *(_BYTE *)(*(_QWORD *)(*v208 + 3528) + 341LL), 0, 1, *v208 + 832); cocos2d::CCPoint::operator=(&v237, v202); if ( v200 == byte_1409097DF ) { if ( v200 ) v237 = v211; else v238 = v212; } cocos2d::CCPoint::operator=(v214, &v237); v192 = v237; *(float *)&v184 = v235; v188 = v216; } } if ( v192 >= v20 && v238 >= v144 ) { v203 = v215; if ( v215 + 1 < 1200 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v223, fmaxf(v20, v211), fmaxf(v144, v212)); cocos2d::CCPoint::operator=(*(_QWORD *)(a1 + 408) + 8LL * v184, v204); v205 = *(_QWORD *)(a1 + 408) + 8 * v203; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v222, fminf(v22, v237), fminf(v160, v238)); cocos2d::CCPoint::operator=(v205, v206); v184 += 2; v235 = *(float *)&v184; v215 = v203 + 2; } } } } } ++v187; } while ( v187 <= v188 ); if ( v184 > 0 ) { glLineWidth(2.0); cocos2d::ccDrawColor4B((cocos2d *)0x64, 0x64u, 0x64u, 0x4Bu); cocos2d::ccDrawLines(*(cocos2d **)(a1 + 408), (const struct cocos2d::CCPoint *)(unsigned int)v184, v207); } } } } } } glLineWidth(1.0); *(_BYTE *)(a1 + 632) = 0; }