// // EditLevelLayer::init from 0x1001fa6e0 to 0x1001fbb95 (5301 bytes) // // 2 xrefs: // > EditLevelLayer::scene @ 0x1001fa555 // > EditLevelLayer::create @ 0x1001fa69b // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // bool __fastcall EditLevelLayer::init(EditLevelLayer *a1, GJGameLevel *a2) { __int128 v2; // xmm0 GJGameLevel *m_level; // rax std::string *p_m_levelName; // rax char v6; // al __int64 v7; // rbx GJGameLevel *v8; // rbx GJGameLevel *v9; // rax std::string *v10; // rax std::string *v11; // rbx cocos2d::CCSprite *v12; // rbx cocos2d::CCSprite *v13; // r12 cocos2d::CCDirector *v14; // rax cocos2d::CCDirector *v15; // rax double v16; // xmm0_8 cocos2d::CCSprite *v17; // rbx cocos2d::CCDirector *v18; // rax cocos2d::CCDirector *v19; // rax double v20; // xmm0_8 cocos2d::CCArray *v21; // rax cocos2d::CCDirector *v22; // rax double v23; // xmm0_8 cocos2d::extension::CCScale9Sprite *v24; // r12 GJGameLevel *v25; // rax bool v26; // cc std::string *v27; // rax const char *v28; // rdi cocos2d::CCLabelBMFont *v29; // rbx __m128 v30; // xmm0 CCTextInputNode *v31; // r12 GJGameLevel *v32; // rax std::string *v33; // rax __int64 v34; // rbx const char *v35; // r15 size_t v36; // rax size_t v37; // r13 char *v38; // rbx size_t v39; // r15 cocos2d::extension::CCScale9Sprite *v40; // r12 CCTextInputNode *v41; // r12 GJGameLevel *v42; // r15 TextArea *v43; // rbx const char *v44; // rbx size_t v45; // rax size_t v46; // r15 char *v47; // r13 size_t v48; // rbx cocos2d::CCMenu *v49; // rax cocos2d::CCSprite *v50; // rax CCMenuItemSpriteExtra *v51; // rax cocos2d::CCSprite *v52; // rbx CCMenuItemSpriteExtra *v53; // rax cocos2d::CCSprite *v54; // rax CCMenuItemSpriteExtra *v55; // rax cocos2d::CCMenu *m_buttonMenu; // rbx float v57; // xmm0_4 GJGameLevel *v58; // rax cocos2d::CCSprite *v59; // rax CCMenuItemSpriteExtra *v60; // rbx cocos2d::CCMenu *v61; // r15 cocos2d::CCMenu *v62; // r12 cocos2d::CCDirector *v63; // rax cocos2d::CCDirector *v64; // rax double v65; // xmm0_8 cocos2d::CCSprite *v66; // rbx CCMenuItemSpriteExtra *v67; // r13 cocos2d::CCSprite *v68; // r15 float *v69; // rax CCMenuItemSpriteExtra *v70; // rbx __int64 v71; // r15 cocos2d::CCSprite *v72; // rax CCMenuItemSpriteExtra *v73; // r13 __int64 v74; // rbx cocos2d::CCSprite *v75; // rax CCMenuItemSpriteExtra *v76; // rbx __int64 v77; // r15 cocos2d::CCSprite *v78; // r13 cocos2d::CCString *v79; // rax const char *CString; // rax cocos2d::CCLabelBMFont *v81; // rax cocos2d::CCLabelBMFont *m_folderLabel; // rbx __int64 v83; // rax CCMenuItemSpriteExtra *v84; // r13 cocos2d::CCSprite *v85; // rbx CCMenuItemSpriteExtra *v86; // rbx __int64 v87; // r15 cocos2d::CCSprite *v88; // rax CCMenuItemSpriteExtra *v89; // r12 int v90; // edx int v91; // ecx int v92; // r8d int v93; // r9d __int64 v94; // rbx cocos2d::CCDirector *v95; // rax cocos2d::CCDirector *v96; // rax double v97; // xmm0_8 cocos2d::CCMenu *v98; // r13 cocos2d::CCSprite *v99; // rax CCMenuItemSpriteExtra *v100; // rbx cocos2d::CCDirector *v101; // rax cocos2d::CCDirector *v102; // rax double v103; // xmm0_8 cocos2d::CCSprite *v104; // rbx CCMenuItemSpriteExtra *v105; // rbx cocos2d::CCDirector *v106; // rax cocos2d::CCDirector *v107; // rax double v108; // xmm0_8 cocos2d::CCSprite *v109; // rbx CCMenuItemSpriteExtra *v110; // rbx cocos2d::CCSprite *v111; // rax GJGameLevel *v112; // r14 cocos2d::CCSprite *v113; // rbx __int64 v114; // rax char v116; // [rsp+0h] [rbp-120h] char v117; // [rsp+0h] [rbp-120h] _BYTE v118[16]; // [rsp+8h] [rbp-118h] BYREF _BYTE v119[8]; // [rsp+18h] [rbp-108h] BYREF _WORD v120[8]; // [rsp+20h] [rbp-100h] BYREF void *v121; // [rsp+30h] [rbp-F0h] std::string v122; // [rsp+38h] [rbp-E8h] BYREF std::string __str; // [rsp+50h] [rbp-D0h] BYREF _BYTE v124[8]; // [rsp+68h] [rbp-B8h] BYREF _BYTE v125[4]; // [rsp+70h] [rbp-B0h] BYREF float v126; // [rsp+74h] [rbp-ACh] _QWORD __dst[2]; // [rsp+78h] [rbp-A8h] BYREF void *v128; // [rsp+88h] [rbp-98h] _QWORD v129[2]; // [rsp+90h] [rbp-90h] BYREF void *v130; // [rsp+A0h] [rbp-80h] GJGameLevel *v131; // [rsp+A8h] [rbp-78h] char v132; // [rsp+B4h] [rbp-6Ch] BYREF float v133; // [rsp+BCh] [rbp-64h] BYREF float v134; // [rsp+C0h] [rbp-60h] _BYTE v135[11]; // [rsp+C4h] [rbp-5Ch] BYREF bool v136; // [rsp+CFh] [rbp-51h] char __s[16]; // [rsp+D0h] [rbp-50h] BYREF void *__p; // [rsp+E0h] [rbp-40h] const char *v139; // [rsp+E8h] [rbp-38h] _BYTE v140[48]; // [rsp+F0h] [rbp-30h] BYREF double v141; // 0:xmm0_8.8 double v142; // 0:xmm0_8.8 double v143; // 0:xmm0_8.8 double v144; // 0:xmm0_8.8 double v145; // 0:xmm0_8.8 cocos2d::CCRect v146; // 0:xmm0_8.8,8:xmm1_8.8 cocos2d::CCRect v147; // 0:xmm0_8.8,8:xmm1_8.8 v136 = cocos2d::CCLayer::init(a1); if ( !v136 ) return v136; a1->m_level = a2; cocos2d::CCObject::retain(a2); m_level = a1->m_level; if ( (m_level->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( __s, m_level->m_levelName.m_data.m_long.longStorage, m_level->m_levelName.m_data.m_long.size, *(double *)&v2); v6 = __s[0]; if ( (__s[0] & 1) != 0 ) { LABEL_4: v7 = *(_QWORD *)&__s[8]; operator delete(__p); if ( !v7 ) goto LABEL_13; goto LABEL_8; } } else { p_m_levelName = &m_level->m_levelName; __p = p_m_levelName->m_data.m_long.longStorage; v2 = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2; *(_OWORD *)__s = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2; v6 = __s[0]; if ( (__s[0] & 1) != 0 ) goto LABEL_4; } if ( !v6 ) goto LABEL_13; LABEL_8: v8 = a1->m_level; if ( (v8->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70(&__str, v8->m_levelName.m_data.m_long.longStorage, v8->m_levelName.m_data.m_long.size, *(double *)&v2); } else { __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v8->m_levelName.m_data.m_long.longStorage; v2 = *(_OWORD *)&v8->m_levelName.m_data.m_short.sizex2; *(_OWORD *)&__str.__r_.__value_.__l.0 = v2; } std::string::operator=((std::string *)&v8->m_tempName, &__str); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); LABEL_13: v9 = a1->m_level; if ( (v9->m_levelName.m_data.m_short.sizex2 & 1) == 0 ) { v10 = &v9->m_levelName; __p = v10->m_data.m_long.longStorage; *(_OWORD *)__s = *(_OWORD *)&v10->m_data.m_short.sizex2; v11 = &a1->m_levelName; if ( (a1->m_levelName.m_data.m_short.sizex2 & 1) == 0 ) goto LABEL_18; goto LABEL_17; } sub_100006B70(__s, v9->m_levelName.m_data.m_long.longStorage, v9->m_levelName.m_data.m_long.size, *(double *)&v2); v11 = &a1->m_levelName; if ( (a1->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) LABEL_17: operator delete(a1->m_levelName.m_data.m_long.longStorage); LABEL_18: v11->m_data.m_long.longStorage = (char *)__p; *(_OWORD *)&v11->m_data.m_short.sizex2 = *(_OWORD *)__s; a1->m_levelType = a2->m_levelType; GameManager::sharedState()->m_currentLevelID = a1->m_level->m_M_ID; ((void (__fastcall *)(EditLevelLayer *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(EditLevelLayer *, __int64))a1->setKeyboardEnabled)(a1, 1); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v133); v12 = cocos2d::CCSprite::create_1("GJ_gradientBG.png"); sub_10028CBE0(__s, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v12->setAnchorPoint)(v12, __s); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v12, 4294967294LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v12->setScaleX)( v12, (float)(v133 + 10.0) / v12->m_obRect.size.width); ((void (__fastcall *)(cocos2d::CCSprite *, float))v12->setScaleY)( v12, (float)(v134 + 10.0) / v12->m_obRect.size.height); sub_10028CBE0(__s, -5.0, -5.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v12->setPosition)(v12, __s); __s[2] = -1; *(_WORD *)__s = 26112; ((void (__fastcall *)(cocos2d::CCSprite *, char *))v12->setColor)(v12, __s); v13 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); sub_10028CBE0(__s, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v13->setAnchorPoint)(v13, __s); v14 = cocos2d::CCDirector::sharedDirector(); *(float *)&v139 = sub_100484D90(v14) + -1.0; v15 = cocos2d::CCDirector::sharedDirector(); v16 = sub_100484D80(v15); sub_10028CBE0(__s, *(float *)&v139, *(float *)&v16 + -1.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v13->setPosition)(v13, __s); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v13, 1); v17 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); sub_10028CBE0(__s, 1.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v17->setAnchorPoint)(v17, __s); v18 = cocos2d::CCDirector::sharedDirector(); *(float *)&v139 = sub_100484DA0(v18) + 1.0; v19 = cocos2d::CCDirector::sharedDirector(); v20 = sub_100484D80(v19); sub_10028CBE0(__s, *(float *)&v139, *(float *)&v20 + -1.0); ((void (__fastcall *)(cocos2d::CCSprite *, char *))v17->setPosition)(v17, __s); cocos2d::CCSprite::setFlipX(v17, 1); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v17, 1); v21 = (cocos2d::CCArray *)sub_10071F9E0(a1, v17); a1->m_textInputs = v21; cocos2d::CCObject::retain(v21); sub_10028CC00(v118, 0.0, 0.0, 80.0, 80.0); *(float *)&v139 = v133 * 0.5; v22 = cocos2d::CCDirector::sharedDirector(); v23 = sub_100484D70(v22); v146.size.height = *((float *)&v23 + 1); v146.size.width = *(float *)&v23 + -30.0; sub_10028CBE0(v124, *(float *)&v139, *(float *)&v23 + -30.0); *(double *)&v146.origin = sub_10028D180(__s); v24 = cocos2d::extension::CCScale9Sprite::create_2("square02b_001.png", v146); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v24->setOpacity)(v24, 255); sub_10028CBF0(v119, 365.0, 40.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v24->setContentSize)(v24, v119); ((void (__fastcall *)(EditLevelLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->addChild_0)( a1, v24, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v24->setPosition)(v24, v124); __s[2] = -115; *(_WORD *)__s = 14336; ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, char *))v24->setColor)(v24, __s); v25 = a1->m_level; v26 = v25->m_levelVersion <= 1; v131 = a2; if ( v26 && !v25->m_isUploaded ) { v30 = (__m128)0x43960000u; v31 = CCTextInputNode::create(300.0, 50.0, "Level Name", "Thonburi", 24, "bigFont.fnt"); ((void (__fastcall *)(EditLevelLayer *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v31, 18); v31->m_delegate = &a1->TextInputDelegate; ((void (__fastcall *)(CCTextInputNode *, __int64))v31->setTag)(v31, 1); ((void (__fastcall *)(CCTextInputNode *, _BYTE *))v31->setPosition)(v31, v124); v31->m_maxLabelLength = 20; v31->m_filterSwearWords = 1; v32 = a1->m_level; if ( (v32->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( __s, v32->m_levelName.m_data.m_long.longStorage, v32->m_levelName.m_data.m_long.size, COERCE_DOUBLE(1133903872)); } else { v33 = &v32->m_levelName; __p = v33->m_data.m_long.longStorage; v30 = *(__m128 *)&v33->m_data.m_short.sizex2; *(_OWORD *)__s = *(_OWORD *)&v33->m_data.m_short.sizex2; } if ( (__s[0] & 1) != 0 ) { v34 = *(_QWORD *)&__s[8]; operator delete(__p); if ( !v34 ) { LABEL_52: CCTextInputNode::setLabelPlaceholderColor(v31, (cocos2d::ccColor3B)-1004936); CCTextInputNode::setLabelPlaceholderScale(v31, 0.69999999); sub_10071FCD0(a1->m_textInputs, v31); goto LABEL_53; } } else if ( !((unsigned __int8)__s[0] >> 1) ) { goto LABEL_52; } if ( (a2->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( __s, a2->m_levelName.m_data.m_long.longStorage, a2->m_levelName.m_data.m_long.size, *(double *)v30.i64); if ( (__s[0] & 1) == 0 ) goto LABEL_37; } else { __p = a2->m_levelName.m_data.m_long.longStorage; v30 = *(__m128 *)&a2->m_levelName.m_data.m_short.sizex2; *(__m128 *)__s = v30; if ( (v30.i8[0] & 1) == 0 ) { LABEL_37: v35 = &__s[1]; goto LABEL_40; } } v35 = (const char *)__p; LABEL_40: v36 = strlen(v35); if ( v36 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(*(double *)v30.i64); v37 = v36; if ( v36 >= 0x17 ) { v139 = v35; v39 = 26; if ( (v36 | 7) != 0x17 ) v39 = (v36 | 7) + 1; v38 = (char *)operator new(v39); v128 = v38; __dst[0] = v39 | 1; __dst[1] = v37; v35 = v139; } else { LOBYTE(__dst[0]) = 2 * v36; v38 = (char *)__dst + 1; if ( !v36 ) goto LABEL_48; } memmove(v38, v35, v37); LABEL_48: v38[v37] = 0; CCTextInputNode::setString(v31, (__int64)__dst, v30); if ( (__dst[0] & 1) != 0 ) operator delete(v128); if ( (__s[0] & 1) != 0 ) operator delete(__p); goto LABEL_52; } if ( (v25->m_levelName.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( __s, v25->m_levelName.m_data.m_long.longStorage, v25->m_levelName.m_data.m_long.size, COERCE_DOUBLE(1136033792)); if ( (__s[0] & 1) == 0 ) goto LABEL_22; LABEL_24: v28 = (const char *)__p; goto LABEL_25; } v27 = &v25->m_levelName; __p = v27->m_data.m_long.longStorage; *(_OWORD *)__s = *(_OWORD *)&v27->m_data.m_short.sizex2; if ( (__s[0] & 1) != 0 ) goto LABEL_24; LABEL_22: v28 = &__s[1]; LABEL_25: v29 = cocos2d::CCLabelBMFont::create_3(v28, "goldFont.fnt"); if ( (__s[0] & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v29, 20); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v29->setPosition)(v29, v124); LABEL_53: v147.size.height = 0.0; v147.size.width = (float)(0.5 * v134) + 65.0; sub_10028CBE0(v125, v133 * 0.5, v147.size.width); *(double *)&v147.origin = sub_10028D180(__s); v40 = cocos2d::extension::CCScale9Sprite::create_2("square02b_001.png", v147); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v40->setOpacity)(v40, 255); sub_10028CBF0(__s, 365.0, 60.0); sub_10028CFF0(v119, __s); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v40->setContentSize)(v40, v119); ((void (__fastcall *)(EditLevelLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->addChild_0)( a1, v40, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v40->setPosition)(v40, v125); __s[2] = -115; *(_WORD *)__s = 14336; ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, char *))v40->setColor)(v40, __s); v41 = CCTextInputNode::create(365.0, 50.0, "Description [Optional]", "Thonburi", 24, nullptr); v41->m_filterSwearWords = 0; ((void (__fastcall *)(EditLevelLayer *, CCTextInputNode *, __int64))a1->addChild_0)(a1, v41, 20); v41->m_delegate = &a1->TextInputDelegate; ((void (__fastcall *)(CCTextInputNode *, __int64))v41->setTag)(v41, 2); ((void (__fastcall *)(CCTextInputNode *, _BYTE *))v41->setPosition)(v41, v125); v122.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x68u); v122.__r_.__value_.__r.__words[0] = 105; v122.__r_.__value_.__l.__size_ = 97; strcpy( v122.__r_.__value_.__l.__data_, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~"); CCTextInputNode::setAllowedChars((std::string *)v41, &v122); if ( (*(_BYTE *)&v122.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v122.__r_.__value_.__l.__data_); v41->m_maxLabelLength = 180; sub_10071FCD0(a1->m_textInputs, v41); ((void (__fastcall *)(cocos2d::CCTextFieldTTF *, _QWORD))v41->m_textField->setVisible)(v41->m_textField, 0); v120[0] = 0; sub_10028CBE0(__s, 0.5, 0.5); v42 = v131; v43 = (TextArea *)TextArea::create(v120, "chatFont.fnt", __s, 1, 1.0, 315.0, 20.0); if ( (v120[0] & 1) != 0 ) operator delete(v121); CCTextInputNode::addTextArea(v41, v43); CCTextInputNode::setLabelPlaceholderColor(v41, (cocos2d::ccColor3B)-1004936); GJGameLevel::getUnpackedLevelDescription(__s, v42); if ( (__s[0] & 1) == 0 ) { if ( !((unsigned __int8)__s[0] >> 1) ) goto LABEL_74; LABEL_61: if ( (__s[0] & 1) != 0 ) v44 = (const char *)__p; else v44 = &__s[1]; v45 = strlen(v44); if ( v45 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(COERCE_DOUBLE(1065353216)); v46 = v45; if ( v45 >= 0x17 ) { v139 = v44; v48 = 26; if ( (v45 | 7) != 0x17 ) v48 = (v45 | 7) + 1; v47 = (char *)operator new(v48); v130 = v47; v129[0] = v48 | 1; v129[1] = v46; v44 = v139; } else { LOBYTE(v129[0]) = 2 * v45; v47 = (char *)v129 + 1; if ( !v45 ) { LABEL_72: v47[v46] = 0; CCTextInputNode::setString(v41, (__int64)v129, (__m128)0x3F800000u); if ( (v129[0] & 1) != 0 ) operator delete(v130); goto LABEL_74; } } memmove(v47, v44, v46); goto LABEL_72; } if ( *(_QWORD *)&__s[8] ) goto LABEL_61; LABEL_74: v49 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v49; ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCMenu *))a1->addChild)(a1, v49); v50 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); v51 = CCMenuItemSpriteExtra::create( v50, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onEdit); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v51); v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v53 = CCMenuItemSpriteExtra::create( v52, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onPlay); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v53); v54 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_shareBtn_001.png"); v131 = (GJGameLevel *)v52; v55 = CCMenuItemSpriteExtra::create( v54, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onShare); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v55); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(a1->m_buttonMenu, 20.0); m_buttonMenu = a1->m_buttonMenu; v57 = *(float *)((__int64 (__fastcall *)(cocos2d::CCMenu *))m_buttonMenu->getPosition)(m_buttonMenu); sub_10028CBE0(&v132, v57, (float)(v134 * 0.5) + -25.0); ((void (__fastcall *)(cocos2d::CCMenu *, char *))m_buttonMenu->setPosition)(m_buttonMenu, &v132); EditLevelLayer::setupLevelInfo(a1); v58 = a1->m_level; if ( v58->m_levelVersion > 1 || v58->m_isUploaded ) { v59 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v60 = CCMenuItemSpriteExtra::create( v59, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onUpdateDescription); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu, v60); v61 = a1->m_buttonMenu; sub_10028CBE0(v140, 30.0, v126); *(cocos2d::CCPoint *)&v141 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)&v132, (const cocos2d::CCPoint *)v61); ((void (__fastcall *)(CCMenuItemSpriteExtra *, char *, double))v60->setPosition)(v60, &v132, v141); } v62 = cocos2d::CCMenu::create(); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCMenu *))a1->addChild)(a1, v62); v63 = cocos2d::CCDirector::sharedDirector(); LODWORD(v139) = sub_100484DA0(v63); v64 = cocos2d::CCDirector::sharedDirector(); v65 = sub_100484D70(v64); sub_10028CBE0(&v132, *(float *)&v139 + -30.0, *(float *)&v65 + -30.0); v66 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); v67 = CCMenuItemSpriteExtra::create( v66, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::confirmDelete); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v67); *(cocos2d::CCPoint *)&v142 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v140, (const cocos2d::CCPoint *)v62); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, double))v67->setPosition)(v67, v140, v142); v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_helpBtn_001.png"); LODWORD(v139) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v66->getContentSize)(v66); v69 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v68->getContentSize)(v68); ((void (__fastcall *)(cocos2d::CCSprite *, float))v68->setScale)(v68, *(float *)&v139 / *v69); v70 = CCMenuItemSpriteExtra::create( v68, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onHelp); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v70); v71 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v67->getPosition)(v67); sub_10028CBE0(v135, 0.0, -60.0); sub_10028CCE0(v140, v71); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *))v70->setPosition)(v70, v140); v72 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png"); v73 = CCMenuItemSpriteExtra::create( v72, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::confirmClone); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v73); v74 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v70->getPosition)(v70); sub_10028CBE0(v135, 0.0, -60.0); sub_10028CCE0(v140, v74); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *))v73->setPosition)(v73, v140); v75 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_orderUpBtn_001.png"); v76 = CCMenuItemSpriteExtra::create( v75, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::confirmMoveToTop); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v76); v77 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v73->getPosition)(v73); sub_10028CBE0(v135, 0.0, -60.0); sub_10028CCE0(v140, v77); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *))v76->setPosition)(v76, v140); v78 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v79 = (cocos2d::CCString *)sub_1007AB580("%i", v116); CString = cocos2d::CCString::getCString(v79); v81 = cocos2d::CCLabelBMFont::create_3(CString, "bigFont.fnt"); a1->m_folderLabel = v81; ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCLabelBMFont *, __int64))v78->addChild_0)(v78, v81, 1); m_folderLabel = a1->m_folderLabel; LODWORD(v139) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v78->getContentSize)(v78); v83 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v78->getContentSize)(v78); sub_10028CBE0(v140, *(float *)&v139 * 0.5, (float)(*(float *)(v83 + 4) * 0.5) + 1.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))m_folderLabel->setPosition)(m_folderLabel, v140); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_folderLabel, 24.0, 0.55000001, 0.0); v84 = CCMenuItemSpriteExtra::create( v78, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onSetFolder); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v84); sub_10028CBE0(v135, 30.0, v126 + -60.0); *(cocos2d::CCPoint *)&v143 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v140, (const cocos2d::CCPoint *)v62); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, double))v84->setPosition)(v84, v140, v143); if ( GJGameLevel::isPlatformer(a1->m_level) ) { v85 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v85->setScale)(v85, 0.80000001); v86 = CCMenuItemSpriteExtra::create( v85, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onLevelLeaderboard); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v62->addChild)(v62, v86); v87 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v84->getPosition)(v84); sub_10028CBE0(v135, 0.0, -50.0); sub_10028CCE0(v140, v87); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *))v86->setPosition)(v86, v140); } v88 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v89 = CCMenuItemSpriteExtra::create( v88, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onBack); CCMenuItemSpriteExtra::setSizeMult(v89, 1.6); v94 = sub_100792C50((_DWORD)v89, 0, v90, v91, v92, v93, v117); ((void (__fastcall *)(EditLevelLayer *, __int64, __int64))a1->addChild_0)(a1, v94, 1); v95 = cocos2d::CCDirector::sharedDirector(); LODWORD(v139) = sub_100484D90(v95); v96 = cocos2d::CCDirector::sharedDirector(); v97 = sub_100484D70(v96); sub_10028CBE0(v140, *(float *)&v139 + 24.0, *(float *)&v97 + -23.0); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v94 + 184LL))(v94, v140); v98 = cocos2d::CCMenu::create(); ((void (__fastcall *)(EditLevelLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v98, 2); v99 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v100 = CCMenuItemSpriteExtra::create( v99, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onLevelInfo); CCMenuItemSpriteExtra::setSizeMult(v100, 2.0); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v98->addChild)(v98, v100); v101 = cocos2d::CCDirector::sharedDirector(); LODWORD(v139) = sub_100484D90(v101); v102 = cocos2d::CCDirector::sharedDirector(); v103 = sub_100484D80(v102); sub_10028CBE0(v140, *(float *)&v139 + 30.0, *(float *)&v103 + 30.0); ((void (__fastcall *)(cocos2d::CCMenu *, _BYTE *))v98->setPosition)(v98, v140); v104 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v104->setScale)(v104, 0.80000001); v105 = CCMenuItemSpriteExtra::create( v104, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onGuidelines); CCMenuItemSpriteExtra::setSizeMult(v105, 1.2); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v98->addChild)(v98, v105); v106 = cocos2d::CCDirector::sharedDirector(); LODWORD(v139) = sub_100484DA0(v106); v107 = cocos2d::CCDirector::sharedDirector(); v108 = sub_100484D80(v107); sub_10028CBE0(v135, *(float *)&v139 + -30.0, *(float *)&v108 + 30.0); *(cocos2d::CCPoint *)&v144 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v140, (const cocos2d::CCPoint *)v98); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, double))v105->setPosition)(v105, v140, v144); v109 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v109->setScale)(v109, 0.60000002); v110 = CCMenuItemSpriteExtra::create( v109, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)EditLevelLayer::onLevelOptions); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v98->addChild)(v98, v110); sub_10028CBE0(v135, 30.0, 70.0); *(cocos2d::CCPoint *)&v145 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v140, (const cocos2d::CCPoint *)v98); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BYTE *, double))v110->setPosition)(v110, v140, v145); if ( PlatformToolbox::isControllerConnected() ) { GameToolbox::addBackButton(a1, v89); v111 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); v112 = v131; v113 = v111; ((void (__fastcall *)(GJGameLevel *, cocos2d::CCSprite *))v131->addChild)(v131, v111); LODWORD(v139) = *(_DWORD *)((__int64 (__fastcall *)(GJGameLevel *))v112->getContentSize)(v112); v114 = ((__int64 (__fastcall *)(GJGameLevel *))v112->getContentSize)(v112); sub_10028CBE0(v140, *(float *)&v139 * 0.5, (float)(0.5 * *(float *)(v114 + 4)) + -40.0); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v113->setPosition)(v113, v140); } if ( (__s[0] & 1) != 0 ) operator delete(__p); return v136; }
GD Web Decomp Icon

GD Web Decomp

Raw Source