// // LevelEditorLayer::init from 0x7ae884 to 0x7af940 (4284 bytes) // // 2 xrefs: // > LevelEditorLayer::create @ 0x7b08d4 // > @ 0xa4b60 // // 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:49 +0000 // __int64 __fastcall LevelEditorLayer::init(LevelEditorLayer *this, GJGameLevel *a2, unsigned __int8 a3) { EditorSFXManager *v4; // x0 unsigned int v5; // w28 EditorSFXManager *v7; // x0 MusicDownloadManager *v8; // x0 MusicDownloadManager *v9; // x0 EditorSFXManager *Libraries; // x0 EditorSFXManager *v11; // x0 GameManager *v12; // x0 GameManager *GameVariable; // x0 GameManager *v14; // x0 GameManager *v15; // x0 GameManager *v16; // x0 GameManager *v17; // x0 char v18; // w1 FMODAudioEngine *v19; // x0 FMODAudioEngine *v20; // x0 GameManager *v21; // x0 GameManager *v22; // x0 cocos2d::CCArray *v23; // x0 cocos2d::CCObject *v24; // x0 cocos2d::CCDictionary *v25; // x0 cocos2d::CCObject *v26; // x0 cocos2d::CCDictionary *v27; // x0 cocos2d::CCObject *v28; // x0 cocos2d::CCDictionary *v29; // x0 cocos2d::CCObject *v30; // x0 cocos2d::CCArray *v31; // x0 cocos2d::CCObject *v32; // x0 cocos2d::CCArray *v33; // x0 cocos2d::CCObject *v34; // x0 cocos2d::CCArray *v35; // x0 cocos2d::CCObject *v36; // x0 cocos2d::CCArray *v37; // x0 cocos2d::CCObject *v38; // x0 cocos2d::CCArray *v39; // x0 cocos2d::CCObject *v40; // x0 cocos2d::CCDictionary *v41; // x0 cocos2d::CCObject *v42; // x0 cocos2d::CCArray *v43; // x0 cocos2d::CCObject *v44; // x0 cocos2d::CCDictionary *v45; // x0 cocos2d::CCObject *v46; // x0 cocos2d::CCArray *v47; // x0 cocos2d::CCObject *v48; // x0 cocos2d::CCArray *v49; // x0 cocos2d::CCObject *v50; // x0 cocos2d::CCArray *v51; // x0 cocos2d::CCObject *v52; // x0 cocos2d::CCArray *v53; // x0 cocos2d::CCObject *v54; // x0 cocos2d::CCArray *v55; // x0 cocos2d::CCObject *v56; // x0 cocos2d::CCArray *v57; // x0 cocos2d::CCObject *v58; // x0 cocos2d::CCArray *v59; // x0 cocos2d::CCObject *v60; // x0 __int64 v61; // x3 __int64 v62; // x2 unsigned __int64 v63; // x1 __int64 v64; // x0 __int64 v65; // x2 __int64 v66; // x1 __int64 v67; // x0 __int64 v68; // x3 __int64 v69; // x2 unsigned __int64 v70; // x1 __int64 v71; // x3 __int64 v72; // x2 unsigned __int64 v73; // x1 unsigned __int64 i; // x2 __int64 v75; // x0 __int64 v76; // x0 __int64 v77; // x2 cocos2d::CCArray *v78; // x0 unsigned __int64 v79; // x1 unsigned __int64 v80; // x1 cocos2d::CCArray *v81; // x25 unsigned __int64 v82; // x27 _BYTE *v83; // x20 __int64 v84; // x22 unsigned __int64 v85; // x20 int v86; // w1 const char *v87; // x1 size_t v88; // x0 cocos2d::CCObject *v89; // x0 char *v90; // x2 unsigned __int64 v91; // x0 __int64 v92; // x1 __int64 v93; // x20 __int64 v94; // x21 __int64 v95; // x27 __int64 v96; // x20 __int64 v97; // x21 __int64 v98; // x0 __int64 v99; // x2 __int64 v100; // x0 __int64 v101; // x1 __int64 v102; // x1 __int64 *v103; // x0 cocos2d::CCDirector *v104; // x0 cocos2d::CCDirector *v105; // x0 LevelEditorLayer *v106; // x2 __int64 v107; // x0 GameManager **v108; // x22 __int64 v109; // x21 __int64 (__fastcall *v110)(GameManager **, __int64, __int64); // x23 GameManager *v111; // x0 __int64 v112; // x2 cocos2d::CCDrawNode *v113; // x0 __int64 v114; // x0 cocos2d::CCDrawNode *v115; // x0 __int64 v116; // x0 const char *v117; // x1 __int64 v118; // x0 __int64 v119; // x3 __int64 v120; // x0 __int64 v121; // x2 __int64 v122; // x0 __int64 v123; // x1 char v124; // w1 __int64 v125; // x3 __int64 v126; // x0 __int64 ColorAction; // x0 _BYTE *v128; // x2 char v129; // w4 char v130; // w3 __int64 v131; // x0 _BYTE *v132; // x1 char v133; // w3 char v134; // w2 __int64 v135; // x0 __int64 v136; // x3 __int64 v137; // x20 void (__fastcall *v138)(__int64, void **); // x21 EditorUI *v139; // x0 __int64 v140; // x0 unsigned int *v141; // x1 LabelGameObject **v142; // x20 LabelGameObject **m; // x21 LabelGameObject *v144; // x1 __int64 v145; // x0 unsigned int *v146; // x0 unsigned int v147; // w1 __int64 *v148; // x0 __int64 *v149; // x2 __int64 n; // x1 __int64 v151; // x1 GameManager *updated; // x0 GameManager *v153; // x0 char v154; // w0 unsigned __int64 v155; // x0 EditorSFXManager *v156; // x0 cocos2d::CCArray **v157; // x0 char *v158; // x3 char *v159; // x0 unsigned int j; // w20 cocos2d::CCString *v161; // x0 int v162; // w0 __int64 v163; // x2 unsigned __int64 v164; // x1 __int64 v165; // x0 __int64 v166; // x3 _BYTE *v167; // x22 __int64 v168; // x20 unsigned __int64 v169; // x21 int v170; // w23 char *v171; // x0 const char *v172; // x0 int v173; // w27 char *v174; // x2 const char *v175; // x0 int v176; // w0 __int64 v177; // x22 _BYTE *k; // x0 EditorUI *v179; // x0 GameManager *v180; // x0 __int64 v181; // x0 _BYTE *v182; // x22 unsigned int v184; // [xsp+74h] [xbp+74h] cocos2d::CCPoint *v185; // [xsp+78h] [xbp+78h] __int64 v186; // [xsp+88h] [xbp+88h] BYREF _DWORD v187[2]; // [xsp+90h] [xbp+90h] BYREF float v188; // [xsp+98h] [xbp+98h] BYREF cocos2d::CCArray *v189; // [xsp+A0h] [xbp+A0h] BYREF unsigned __int64 v190; // [xsp+A8h] [xbp+A8h] void *v191; // [xsp+B0h] [xbp+B0h] __int64 v192; // [xsp+B8h] [xbp+B8h] BYREF __int64 v193; // [xsp+C0h] [xbp+C0h] void *v194; // [xsp+C8h] [xbp+C8h] void *v195; // [xsp+D0h] [xbp+D0h] BYREF _BYTE *v196; // [xsp+D8h] [xbp+D8h] __int64 v197; // [xsp+E0h] [xbp+E0h] __int64 v198; // [xsp+E8h] [xbp+E8h] BYREF __int64 v199; // [xsp+F0h] [xbp+F0h] void *v200; // [xsp+F8h] [xbp+F8h] _QWORD v201[3]; // [xsp+100h] [xbp+100h] BYREF __int64 v202[2]; // [xsp+118h] [xbp+118h] BYREF void *v203; // [xsp+128h] [xbp+128h] __int64 v204[2]; // [xsp+130h] [xbp+130h] BYREF void *v205; // [xsp+140h] [xbp+140h] v184 = a3; v4 = (EditorSFXManager *)(unsigned __int8)GJBaseGameLayer::init(this); v5 = (unsigned __int8)v4; if ( !(_BYTE)v4 ) return v5; v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v4); v8 = (MusicDownloadManager *)EditorSFXManager::setEditorLoading(v7, 1); v9 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v8); Libraries = (EditorSFXManager *)MusicDownloadManager::tryLoadLibraries(v9); v11 = (EditorSFXManager *)EditorSFXManager::sharedState(Libraries); EditorSFXManager::ensureLoaded(v11); UILayer::enableEditorMode(*((UILayer **)this + 1661)); *((_BYTE *)this + 12236) = 1; *((_BYTE *)this + 14208) = 1; v12 = (GameManager *)GameManager::sharedState((LevelEditorLayer *)((char *)this + 0x2000)); GameVariable = (GameManager *)GameManager::getGameVariable(v12, "0102"); *((_BYTE *)this + 14017) = (_BYTE)GameVariable; v14 = (GameManager *)GameManager::sharedState(GameVariable); v15 = (GameManager *)GameManager::getGameVariable(v14, "0117"); *((_BYTE *)this + 14012) = (_BYTE)v15; v16 = (GameManager *)GameManager::sharedState(v15); v17 = (GameManager *)GameManager::getGameVariable(v16, "0118"); *((_BYTE *)this + 14013) = (_BYTE)v17; v18 = *((_BYTE *)this + 14016); if ( !v18 ) { v180 = (GameManager *)GameManager::sharedState(v17); v18 = GameManager::getGameVariable(v180, "0137"); } *((_BYTE *)this + 14015) = v18; LevelEditorLayer::updateOptions((EditorUI **)this); *((_DWORD *)this + 3570) = 0; v19 = (FMODAudioEngine *)(unsigned int)(int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0); *((_DWORD *)this + 3569) = (_DWORD)v19; *((_DWORD *)this + 3568) = (_DWORD)v19; v20 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v19); FMODAudioEngine::stopAllMusic(v20, 1); *((_QWORD *)this + 242) = a2; v21 = (GameManager *)cocos2d::CCObject::retain(a2); v22 = (GameManager *)GameManager::sharedState(v21); *((_BYTE *)v22 + 706) = 1; v23 = (cocos2d::CCArray *)GameManager::sharedState(v22); *((_QWORD *)v23 + 69) = this; v24 = (cocos2d::CCObject *)cocos2d::CCArray::create(v23); *((_QWORD *)this + 1754) = v24; v25 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v24); v26 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v25); *((_QWORD *)this + 1797) = v26; v27 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v26); v28 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v27); *((_QWORD *)this + 1774) = v28; v29 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v28); v30 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v29); *((_QWORD *)this + 1775) = v30; v31 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v30); v32 = (cocos2d::CCObject *)cocos2d::CCArray::create(v31); *((_QWORD *)this + 1755) = v32; v33 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v32); v34 = (cocos2d::CCObject *)cocos2d::CCArray::create(v33); *((_QWORD *)this + 1756) = v34; v35 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v34); v36 = (cocos2d::CCObject *)cocos2d::CCArray::create(v35); *((_QWORD *)this + 1757) = v36; v37 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v36); v38 = (cocos2d::CCObject *)cocos2d::CCArray::create(v37); *((_QWORD *)this + 1758) = v38; v39 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v38); v40 = (cocos2d::CCObject *)cocos2d::CCArray::create(v39); *((_QWORD *)this + 1764) = v40; v41 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v40); v42 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v41); *((_QWORD *)this + 1763) = v42; v43 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v42); v44 = (cocos2d::CCObject *)cocos2d::CCArray::create(v43); *((_QWORD *)this + 1772) = v44; v45 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v44); v46 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v45); *((_QWORD *)this + 1767) = v46; v47 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v46); v48 = (cocos2d::CCObject *)cocos2d::CCArray::create(v47); *((_QWORD *)this + 1768) = v48; v49 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v48); *((_BYTE *)this + 14153) = 1; v50 = (cocos2d::CCObject *)cocos2d::CCArray::create(v49); *((_QWORD *)this + 1759) = v50; v51 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v50); v52 = (cocos2d::CCObject *)cocos2d::CCArray::create(v51); *((_QWORD *)this + 1782) = v52; v53 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v52); v54 = (cocos2d::CCObject *)cocos2d::CCArray::create(v53); *((_QWORD *)this + 1783) = v54; v55 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v54); v56 = (cocos2d::CCObject *)cocos2d::CCArray::create(v55); *((_QWORD *)this + 1760) = v56; v57 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v56); v58 = (cocos2d::CCObject *)cocos2d::CCArray::create(v57); *((_QWORD *)this + 1761) = v58; v59 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v58); v60 = (cocos2d::CCObject *)cocos2d::CCArray::create(v59); *((_QWORD *)this + 1762) = v60; cocos2d::CCObject::retain(v60); v61 = *((_QWORD *)this + 1791); v62 = *((_QWORD *)this + 1792); v63 = (v62 - v61) >> 3; if ( v63 <= 0x270F ) { std::vector::__append((void **)this + 1791, 10000 - v63); } else if ( v63 != 10000 && v62 != v61 + 80000 ) { *((_QWORD *)this + 1792) = v62 + 8 * ~((unsigned __int64)(v62 - 80008 - v61) >> 3); } std::vector::resize((const void **)this + 1813, 0x2710u, 0); std::vector::resize((const void **)this + 1816, 0x2710u, 0); v64 = *((_QWORD *)this + 1830); v65 = *((_QWORD *)this + 1831); v66 = v65 - v64; if ( (unsigned __int64)(v65 - v64) <= 0x270F ) { std::vector::__append((__int64)this + 14640, 10000 - v66); } else if ( v66 != 10000 ) { v67 = v64 + 10000; if ( v65 != v67 ) *((_QWORD *)this + 1831) = v67; } std::vector::resize((const void **)this + 1827, 0x2710u, 0); std::vector::resize((const void **)this + 1824, 0x2710u, 0); v68 = *((_QWORD *)this + 1798); v69 = *((_QWORD *)this + 1799); v70 = (v69 - v68) >> 3; if ( v70 <= 0x270F ) { std::vector::__append((__int64)this + 14384, 10000 - v70); } else if ( v70 != 10000 && v69 != v68 + 80000 ) { *((_QWORD *)this + 1799) = v69 + 8 * ~((unsigned __int64)(v69 - 80008 - v68) >> 3); } std::vector::resize((const void **)this + 1810, 0x2710u, 0); v71 = *((_QWORD *)this + 1833); v72 = *((_QWORD *)this + 1834); v73 = (v72 - v71) >> 2; if ( v73 <= 0x270F ) { std::vector::__append((__int64)this + 14664, 10000 - v73); } else if ( v73 != 10000 && v72 != v71 + 40000 ) { *((_QWORD *)this + 1834) = v72 + 4 * ~((unsigned __int64)(v72 - 40004 - v71) >> 2); } for ( i = 0; i != 10000; ++i ) { *(_QWORD *)(*((_QWORD *)this + 1791) + 8 * i) = 0; v75 = ~(1LL << (i & 0x3F)); *(_QWORD *)(*((_QWORD *)this + 1813) + 8 * (i >> 6)) &= v75; *(_QWORD *)(*((_QWORD *)this + 1827) + 8 * (i >> 6)) &= v75; *(_QWORD *)(*((_QWORD *)this + 1816) + 8 * (i >> 6)) &= v75; *(_QWORD *)(*((_QWORD *)this + 1824) + 8 * (i >> 6)) &= v75; *(_QWORD *)(*((_QWORD *)this + 1810) + 8 * (i >> 6)) &= v75; *(_BYTE *)(*((_QWORD *)this + 1830) + i) = 0; *(_QWORD *)(*((_QWORD *)this + 1798) + 8 * i) = 0; *(_DWORD *)(*((_QWORD *)this + 1833) + 4 * i) = 0; } v76 = *((_QWORD *)this + 242); v189 = nullptr; v77 = v76 + 520; v190 = 0; LOBYTE(v76) = *(_BYTE *)(v76 + 520); v191 = nullptr; if ( (v76 & 1) != 0 ) { std::string::__init((__int64 *)&v189, *(void **)(v77 + 16), *(_QWORD *)(v77 + 8)); } else { v78 = *(cocos2d::CCArray **)v77; v79 = *(_QWORD *)(v77 + 8); v191 = *(void **)(v77 + 16); v189 = v78; v190 = v79; } v80 = (unsigned __int8)v189 >> 1; if ( ((unsigned __int8)v189 & 1) != 0 ) v80 = v190; if ( v80 ) { v81 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)(unsigned __int8)v189); if ( ((unsigned __int8)v189 & 1) != 0 ) { v82 = v190; v83 = v191; if ( !v190 ) { LABEL_30: v82 = 0; LABEL_31: v84 = -1; LABEL_32: v85 = 0; while ( 1 ) { std::string::basic_string(v202, (__int64)&v189, v85, v84 - v85); v86 = v202[0] & 1; if ( v86 ) { if ( v85 == v82 ) { v86 = 1; if ( !v202[1] ) goto LABEL_40; } v87 = (const char *)v203; } else { if ( v85 == v82 && !((int)LOBYTE(v202[0]) >> 1) ) goto LABEL_40; v87 = (char *)v202 + 1; } v185 = (cocos2d::CCPoint *)v87; v204[0] = 0; v204[1] = 0; v205 = nullptr; v88 = strlen(v87); std::string::__init(v204, v185, v88); v89 = (cocos2d::CCObject *)cocos2d::CCString::create(v204); cocos2d::CCArray::addObject(v81, v89); if ( (v204[0] & 1) != 0 ) operator delete(v205); v86 = v202[0] & 1; LABEL_40: if ( v84 == -1 ) { if ( v86 ) operator delete(v203); for ( j = 0; j < (unsigned int)cocos2d::CCArray::count(v81); ++j ) { v161 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v81, j); v162 = cocos2d::CCString::intValue(v161); if ( (unsigned int)(v162 - 1) <= 0x270E ) { v163 = *((_QWORD *)this + 1816); v164 = (unsigned __int64)v162 >> 6; v165 = 1LL << (v162 & 0x3F); v166 = *(_QWORD *)(v163 + 8 * v164); if ( (v166 & v165) == 0 ) { *(_QWORD *)(v163 + 8 * v164) = v166 | v165; ++*((_DWORD *)this + 3638); } } } goto LABEL_46; } v85 = v84 + 1; if ( ((unsigned __int8)v189 & 1) != 0 ) { v90 = (char *)v191; v91 = v190; } else { v91 = (unsigned __int8)v189 >> 1; v90 = (char *)&v189 + 1; } v84 = -1; if ( v85 < v91 ) { v158 = &v90[v85]; v159 = &v90[v91]; if ( &v90[v85] != v159 ) { if ( v90[v85] == 44 ) { LABEL_113: v84 = v158 - v90; } else { while ( v159 != ++v158 ) { if ( *v158 == 44 ) goto LABEL_113; } v84 = -1; } } } if ( v86 ) operator delete(v203); } } v157 = (cocos2d::CCArray **)((char *)v191 + v190); if ( v191 == (char *)v191 + v190 ) goto LABEL_31; } else { LODWORD(v82) = (int)(unsigned __int8)v189 >> 1; if ( !(_DWORD)v82 ) goto LABEL_30; v83 = (char *)&v189 + 1; v84 = -1; v157 = (cocos2d::CCArray **)((char *)&v189 + (int)v82 + 1); if ( v157 == (cocos2d::CCArray **)((char *)&v189 + 1) ) { LABEL_102: v82 = (int)v82; goto LABEL_32; } } v182 = v83; if ( *v83 == 44 ) { v84 = 0; goto LABEL_156; } do { if ( v157 == (cocos2d::CCArray **)++v182 ) { v84 = -1; goto LABEL_156; } } while ( *v182 != 44 ); v84 = v182 - v83; LABEL_156: LODWORD(v82) = (int)(unsigned __int8)v189 >> 1; if ( ((unsigned __int8)v189 & 1) != 0 ) { v82 = v190; goto LABEL_32; } goto LABEL_102; } LABEL_46: v92 = *((_QWORD *)this + 1820); v93 = *((_QWORD *)this + 1821); v94 = (v93 - v92) >> 3; if ( (unsigned __int64)v94 <= 9 ) { std::vector::__append((cocos2d::CCPoint **)this + 1820, 10 - v94); v95 = *((_QWORD *)this + 1820); v94 = (*((_QWORD *)this + 1821) - v95) >> 3; } else { if ( v94 == 10 ) { v95 = *((_QWORD *)this + 1820); LABEL_51: v97 = v95 + 8 * v94; do { cocos2d::CCPoint::operator=(v95, &dword_155C6A8); v95 += 8; } while ( v95 != v97 ); goto LABEL_53; } v95 = *((_QWORD *)this + 1820); if ( v93 != v92 + 80 ) { v96 = v93 + 8 * ~((unsigned __int64)(v93 - 88 - v92) >> 3); *((_QWORD *)this + 1821) = v96; v94 = (v96 - v92) >> 3; } } if ( v94 > 0 ) goto LABEL_51; LABEL_53: v98 = *((_QWORD *)this + 242); v192 = 0; v99 = v98 + 544; v193 = 0; LOBYTE(v98) = *(_BYTE *)(v98 + 544); v194 = nullptr; if ( (v98 & 1) != 0 ) { std::string::__init(&v192, *(void **)(v99 + 16), *(_QWORD *)(v99 + 8)); } else { v100 = *(_QWORD *)v99; v101 = *(_QWORD *)(v99 + 8); v194 = *(void **)(v99 + 16); v192 = v100; v193 = v101; } v102 = (unsigned __int8)v192 >> 1; if ( (v192 & 1) != 0 ) v102 = v193; if ( v102 ) { v195 = nullptr; v196 = nullptr; v197 = 0; sub_79945C((unsigned __int8 *)&v192, &byte_1169BE0, (__int64 *)&v195); v167 = v195; if ( 0xAAAAAAAAAAAAAAABLL * ((v196 - (_BYTE *)v195) >> 3) != 1 ) { v168 = 0; v169 = 0; v170 = 0; do { v171 = &v167[v168]; if ( (v167[v168] & 1) != 0 ) v172 = *((const char **)v171 + 2); else v172 = v171 + 1; v173 = atoi(v172); v174 = &v167[v168 + 24]; v175 = v174 + 1; if ( (*v174 & 1) != 0 ) v175 = *((const char **)v174 + 2); v176 = atoi(v175); v177 = *((_QWORD *)this + 1820) + 4 * v169; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, (float)v173, (float)v176); cocos2d::CCPoint::operator=(v177, &v188); v167 = v195; v169 += 2LL; ++v170; v168 += 48; } while ( 0xAAAAAAAAAAAAAAABLL * ((v196 - (_BYTE *)v195) >> 3) - 1 > v169 && v170 <= 9 ); } if ( v167 ) { for ( k = v196; v196 != v167; k = v196 ) { v196 = k - 24; std::string::~string((__int64)(k - 24)); } operator delete(v195); } } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, (const cocos2d::CCPoint *)(*((_QWORD *)this + 242) + 568LL)); cocos2d::CCPoint::operator=((char *)this + 14584, &v195); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, (const cocos2d::CCPoint *)&dword_155C6A8); v103 = OBB2D::create((const cocos2d::CCPoint *)&v195, 1.0, 1.0, 0.0); *((_QWORD *)this + 1777) = v103; v104 = (cocos2d::CCDirector *)cocos2d::CCObject::retain((cocos2d::CCObject *)v103); v105 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v104); cocos2d::CCDirector::getWinSize(&v186, v105); GJBaseGameLayer::setupLayers(this); v107 = DrawGridLayer::create(*((DrawGridLayer **)this + 490), this, v106); v108 = *((GameManager ***)this + 490); v109 = v107; *((_QWORD *)this + 1786) = v107; v110 = *((__int64 (__fastcall **)(GameManager **, __int64, __int64))*v108 + 58); v111 = (GameManager *)GameManager::sharedState(*v108); if ( (unsigned __int8)GameManager::getGameVariable(v111, "0039") ) v112 = 1399; else v112 = 4294965697LL; v113 = (cocos2d::CCDrawNode *)v110(v108, v109, v112); v114 = cocos2d::CCDrawNode::create(v113); v187[0] = 770; *((_QWORD *)this + 1727) = v114; v187[1] = 771; cocos2d::CCDrawNode::setBlendFunc(v114, v187); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 1727) + 72LL))(*((_QWORD *)this + 1727), 4294957297LL); v115 = (cocos2d::CCDrawNode *)(*(__int64 (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 492) + 464LL))( *((_QWORD *)this + 492), *((_QWORD *)this + 1727), 1401); v116 = cocos2d::CCDrawNode::create(v115); *((_QWORD *)this + 1728) = v116; cocos2d::CCDrawNode::setBlendFunc(v116, v187); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 1727) + 456LL))( *((_QWORD *)this + 1727), *((_QWORD *)this + 1728)); GJBaseGameLayer::createPlayer(this); v118 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_cross_01_001.png", v117); v119 = *((_QWORD *)this + 317); *((_QWORD *)this + 1779) = v118; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v119 + 464LL))(v119, v118, 10); (*(void (__fastcall **)(_QWORD, void *))(**((_QWORD **)this + 1779) + 960LL))(*((_QWORD *)this + 1779), &unk_1141B80); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 1779) + 344LL))(*((_QWORD *)this + 1779), 0); (*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 1779) + 160LL))(*((_QWORD *)this + 1779), 0.7); GJBaseGameLayer::createPlayerCollisionBlock(this); *((_BYTE *)this + 14024) = 1; LevelEditorLayer::removePlayerCollisionBlock((__int64)this); v120 = *((_QWORD *)this + 242); v198 = 0; v121 = v120 + 392; v199 = 0; LOBYTE(v120) = *(_BYTE *)(v120 + 392); v200 = nullptr; if ( (v120 & 1) != 0 ) { std::string::__init(&v198, *(void **)(v121 + 16), *(_QWORD *)(v121 + 8)); } else { v122 = *(_QWORD *)v121; v123 = *(_QWORD *)(v121 + 8); v200 = *(void **)(v121 + 16); v198 = v122; v199 = v123; } cocos2d::ZipUtils::decompressString(v201, &v198, 0, 11); if ( (*((_BYTE *)this + 14304) & 1) != 0 ) { **((_BYTE **)this + 1790) = 0; *((_QWORD *)this + 1789) = 0; } else { *((_BYTE *)this + 14305) = 0; *((_BYTE *)this + 14304) = 0; } std::string::reserve((__int64 *)this + 1788, 0); *((_QWORD *)this + 1790) = v201[2]; v124 = v198; v125 = v201[1]; *((_QWORD *)this + 1788) = v201[0]; *((_QWORD *)this + 1789) = v125; if ( (v124 & 1) != 0 ) operator delete(v200); LevelEditorLayer::createObjectsFromSetup((__int64)this, (__int64)this + 14304); GJBaseGameLayer::createTextLayers(this); GJBaseGameLayer::increaseBatchNodeCapacity(this); v126 = *((_QWORD *)this + 409); if ( !v126 ) { v181 = LevelSettingsObject::create(nullptr); *((_QWORD *)this + 409) = v181; *(_QWORD *)(v181 + 384) = *((_QWORD *)this + 242); cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 409)); GJBaseGameLayer::loadLevelSettings(this); v126 = *((_QWORD *)this + 409); } ColorAction = GJEffectManager::getColorAction(*(GJEffectManager **)(v126 + 320), 1005); *(_DWORD *)(ColorAction + 80) = 0; v128 = *((_BYTE **)this + 407); v129 = v128[2602]; v130 = v128[2603]; *(_BYTE *)(ColorAction + 74) = v128[2604]; *(_BYTE *)(ColorAction + 72) = v129; *(_BYTE *)(ColorAction + 73) = v130; *(_BYTE *)(ColorAction + 84) = 1; v131 = GJEffectManager::getColorAction(*(GJEffectManager **)(*((_QWORD *)this + 409) + 320LL), 1006); *(_DWORD *)(v131 + 80) = 0; v132 = *((_BYTE **)this + 407); v133 = v132[2605]; v134 = v132[2606]; *(_BYTE *)(v131 + 74) = v132[2607]; *(_BYTE *)(v131 + 72) = v133; *(_BYTE *)(v131 + 73) = v134; *(_BYTE *)(v131 + 84) = (unsigned __int8)&dword_0 + 1; if ( !v184 ) { v135 = EditorUI::create(this, (LevelEditorLayer *)((char *)&dword_0 + 1)); v136 = *(_QWORD *)this; *((_QWORD *)this + 1781) = v135; (*(void (__fastcall **)(LevelEditorLayer *, __int64, __int64))(v136 + 464))(this, v135, 100); } GJBaseGameLayer::createGroundLayer( this, *(_DWORD *)(*((_QWORD *)this + 409) + 356LL), *(_DWORD *)(*((_QWORD *)this + 409) + 424LL)); *((_BYTE *)this + 14184) = 1; GJBaseGameLayer::createBackground(this, *(_DWORD *)(*((_QWORD *)this + 409) + 352LL)); GJBaseGameLayer::createMiddleground(this, *(_DWORD *)(*((_QWORD *)this + 409) + 364LL)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, (const cocos2d::CCPoint *)(*((_QWORD *)this + 242) + 1116LL)); if ( v188 != *(float *)&dword_155C6A8 || (cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v195, (const cocos2d::CCPoint *)(*((_QWORD *)this + 242) + 1116LL)), *((float *)&v195 + 1) != *(float *)&dword_155C6AC) ) { v137 = *((_QWORD *)this + 490); v138 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v137 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v195, (GJGameLevel *)((char *)a2 + 1116)); v138(v137, &v195); v139 = *((EditorUI **)this + 1781); if ( v139 ) EditorUI::updateSlider(v139); if ( *(float *)(*((_QWORD *)this + 242) + 1124LL) == 0.0 ) goto LABEL_75; goto LABEL_139; } if ( *(float *)(*((_QWORD *)this + 242) + 1124LL) != 0.0 ) { LABEL_139: (*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 490) + 160LL))(*((_QWORD *)this + 490)); v179 = *((EditorUI **)this + 1781); if ( v179 ) EditorUI::updateSlider(v179); } LABEL_75: v140 = *((_QWORD *)this + 410); if ( v140 ) { v141 = *(unsigned int **)(v140 + 56); if ( *v141 ) { v142 = *((LabelGameObject ***)v141 + 2); for ( m = &v142[*v141 - 1]; m >= v142; ++v142 ) { v144 = *v142; if ( !*v142 ) break; if ( *((_DWORD *)v144 + 257) == 1615 ) GJBaseGameLayer::addObjectCounter(this, v144); } } } GJBaseGameLayer::resetGroupCounters(this, 0); GJBaseGameLayer::sortStickyGroups(this); (*(void (__fastcall **)(LevelEditorLayer *))(*(_QWORD *)this + 1616LL))(this); v145 = *((_QWORD *)this + 498); if ( v145 ) { v146 = *(unsigned int **)(v145 + 56); v147 = *v146; if ( *v146 ) { v148 = *((__int64 **)v146 + 2); v149 = &v148[v147 - 1]; if ( v148 <= v149 ) { for ( n = *v148; *v148; n = *v148 ) { ++v148; *(_BYTE *)(n + 352) = 1; if ( v149 < v148 ) break; } } } } memcpy((char *)this + 14704, (const void *)(*((_QWORD *)this + 242) + 664LL), 0x64u); *((_DWORD *)this + 3700) = -1; if ( !v184 ) { v151 = *((_QWORD *)this + 1844); ++*((_DWORD *)this + 3686); if ( !v151 ) *((_QWORD *)this + 1844) = time(nullptr); } cocos2d::CCNode::schedule(this, LevelEditorLayer::updateEditor, 0); *((_BYTE *)this + 14297) = 1; LevelEditorLayer::updateGameObjects(this); LevelEditorLayer::updateEditorMode(this); GJBaseGameLayer::refreshKeyframeAnims(this); updated = (GameManager *)LevelEditorLayer::updateAnimateOnTriggerObjects(this, 1u); *((_BYTE *)this + 14208) = 0; v153 = (GameManager *)GameManager::sharedState(updated); v154 = GameManager::getGameVariable(v153, "0037"); LevelEditorLayer::toggleGround(this, v154); v155 = v184; if ( !v184 ) { if ( LevelEditorLayer::s_showLocalDeaths || (v155 = (unsigned __int8)LevelEditorLayer::s_showGlobalDeaths, LevelEditorLayer::s_showGlobalDeaths) ) { v155 = LevelEditorLayer::rebuildDeathOverlay(this); } } *((float *)this + 3137) = 1.0; v156 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)v155); EditorSFXManager::setEditorLoading(v156, 0); if ( (v192 & 1) != 0 ) operator delete(v194); if ( ((unsigned __int8)v189 & 1) != 0 ) operator delete(v191); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source