// // EditLevelLayer::init from 0x3b6aa0 to 0x3b78ee (3662 bytes) // // 1 xrefs: // > EditLevelLayer::create @ 0x3b79b4 // // 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 EditLevelLayer::init(EditLevelLayer *a1, GJGameLevel *a2) { int v4; // r7 GJGameLevel *m_level; // r7 cocos2d::CCDirector *v6; // r0 const char *v7; // r1 cocos2d::CCNode *v8; // r7 void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r3 cocos2d::CCSprite *v12; // r7 void (__fastcall *v13)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 void (__fastcall *v14)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCDirector *v15; // r0 float v16; // s17 cocos2d::CCDirector *v17; // r0 float v18; // r0 cocos2d::CCSprite *v19; // r7 void (__fastcall *v20)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 void (__fastcall *v21)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v22; // r0 float v23; // s17 cocos2d::CCDirector *v24; // r0 float v25; // r0 cocos2d::CCArray *v26; // r0 cocos2d::CCArray *v27; // r0 float width; // s18 cocos2d::CCDirector *v29; // r0 float v30; // r0 cocos2d::CCNode *v31; // r7 int (__fastcall *v32)(const cocos2d::CCObject *__hidden); // r3 GJGameLevel *v33; // r1 CCTextInputNode *v34; // r7 GJGameLevel *v35; // r1 cocos2d::CCNode *v36; // r8 int (__fastcall *v37)(const cocos2d::CCObject *__hidden); // r3 CCTextInputNode *v38; // r0 void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // r3 CCTextInputNode *v40; // r8 cocos2d::CCArray *m_textInputs; // r0 TextArea *v42; // r9 int v43; // r10 cocos2d::CCMenu *v44; // r0 EditLevelLayer_vtbl *v45; // r3 cocos2d::CCSprite *v46; // r0 CCMenuItemSpriteExtra *v47; // r0 CCMenuItemSpriteExtra *v48; // r0 cocos2d::CCSprite *v49; // r0 CCMenuItemSpriteExtra *v50; // r0 cocos2d::CCMenu *m_buttonMenu; // r8 void (__fastcall *v52)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float *v53; // r0 GJGameLevel *v54; // r3 cocos2d::CCMenu *v55; // r6 cocos2d::CCDirector *v56; // r0 float v57; // s17 cocos2d::CCDirector *v58; // r0 float v59; // r0 cocos2d::CCSprite *v60; // r10 CCMenuItemSpriteExtra *v61; // r8 void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v63; // r9 void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // r11 float v65; // s16 float *v66; // r0 CCMenuItemSpriteExtra *v67; // r9 void (__fastcall *v68)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v69; // r8 cocos2d::CCSprite *v70; // r0 CCMenuItemSpriteExtra *v71; // r8 void (__fastcall *v72)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v73; // r9 cocos2d::CCSprite *v74; // r0 CCMenuItemSpriteExtra *v75; // r10 void (__fastcall *v76)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v77; // r8 cocos2d::CCSprite *v78; // r8 cocos2d::CCString *v79; // r0 cocos2d::CCLabelBMFont *v80; // r0 cocos2d::CCSprite_vtbl *v81; // r3 cocos2d::CCLabelBMFont *m_folderLabel; // r10 void (__fastcall *v83)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 float v84; // s17 int v85; // r0 CCMenuItemSpriteExtra *v86; // r8 void (__fastcall *v87)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v88; // r0 CCMenuItemSpriteExtra *v89; // r10 cocos2d::CCNode *v90; // r6 void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v92; // r0 float v93; // s16 cocos2d::CCDirector *v94; // r0 float v95; // r0 cocos2d::CCMenu *v96; // r6 cocos2d::CCSprite *v97; // r0 CCMenuItemSpriteExtra *v98; // r7 void (__fastcall *v99)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCDirector *v100; // r0 float v101; // s17 cocos2d::CCDirector *v102; // r0 float v103; // r0 cocos2d::CCSprite *v104; // r7 CCMenuItemSpriteExtra *v105; // r9 void (__fastcall *v106)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCDirector *v107; // r0 float v108; // s17 cocos2d::CCDirector *v109; // r0 float v110; // r0 cocos2d::CCSprite *v111; // r8 CCMenuItemSpriteExtra *v112; // r5 void (__fastcall *v113)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCLabelBMFont *v115; // r7 char *v116; // r2 cocos2d::CCSprite *v117; // r10 CCMenuItemSpriteExtra *v118; // r10 void (__fastcall *v119)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 int v120; // r8 cocos2d::CCSprite *v121; // r4 void (__fastcall *v122)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5 float v123; // s17 int v124; // r0 char *v125; // r2 cocos2d::CCSprite *v126; // r0 CCMenuItemSpriteExtra *v127; // r8 void (__fastcall *v128)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v129; // r10 float v130; // r2 float v131; // r3 int v132; // [sp+10h] [bp-E4h] cocos2d::CCSprite *v133; // [sp+10h] [bp-E4h] _BOOL4 v134; // [sp+18h] [bp-DCh] cocos2d::ccColor3B v135; // [sp+20h] [bp-D4h] cocos2d::ccColor3B v136; // [sp+24h] [bp-D0h] char *v137; // [sp+28h] [bp-CCh] BYREF cocos2d::CCSize v138; // [sp+2Ch] [bp-C8h] BYREF cocos2d::CCPoint v139; // [sp+34h] [bp-C0h] BYREF cocos2d::CCSize v140; // [sp+3Ch] [bp-B8h] BYREF cocos2d::CCPoint v141; // [sp+44h] [bp-B0h] BYREF cocos2d::CCPoint v142; // [sp+4Ch] [bp-A8h] BYREF cocos2d::CCPoint v143; // [sp+54h] [bp-A0h] BYREF cocos2d::CCPoint v144; // [sp+5Ch] [bp-98h] BYREF void (*v145)(EditLevelLayer *, cocos2d::CCObject *); // [sp+64h] [bp-90h] int v146; // [sp+68h] [bp-8Ch] void (*v147)(EditLevelLayer *, cocos2d::CCObject *); // [sp+6Ch] [bp-88h] int v148; // [sp+70h] [bp-84h] void (*v149)(EditLevelLayer *, cocos2d::CCObject *); // [sp+74h] [bp-80h] int v150; // [sp+78h] [bp-7Ch] void (*v151)(EditLevelLayer *, cocos2d::CCObject *); // [sp+7Ch] [bp-78h] int v152; // [sp+80h] [bp-74h] void (*v153)(EditLevelLayer *, cocos2d::CCObject *); // [sp+84h] [bp-70h] int v154; // [sp+88h] [bp-6Ch] void (*v155)(EditLevelLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-68h] int v156; // [sp+90h] [bp-64h] void (*v157)(EditLevelLayer *, cocos2d::CCObject *); // [sp+94h] [bp-60h] int v158; // [sp+98h] [bp-5Ch] void (*v159)(EditLevelLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-58h] int v160; // [sp+A0h] [bp-54h] void (*v161)(EditLevelLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-50h] int v162; // [sp+A8h] [bp-4Ch] void (*v163)(EditLevelLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-48h] int v164; // [sp+B0h] [bp-44h] void (*v165)(EditLevelLayer *, cocos2d::CCObject *); // [sp+B4h] [bp-40h] int v166; // [sp+B8h] [bp-3Ch] void (*v167)(EditLevelLayer *, cocos2d::CCObject *); // [sp+BCh] [bp-38h] int v168; // [sp+C0h] [bp-34h] cocos2d::CCPoint v169; // [sp+C4h] [bp-30h] BYREF cocos2d::CCRect v170; // [sp+CCh] [bp-28h] BYREF cocos2d::CCRect v171; // [sp+DCh] [bp-18h] BYREF cocos2d::CCSize v172; // 0:^0.8 cocos2d::CCRect v173; // 0:kr00_16.16 cocos2d::CCRect v174; // 0:r2.8,8:^0.8 v134 = cocos2d::CCLayer::init(a1); if ( v134 ) { a1->m_level = a2; cocos2d::CCObject::retain(a2); sub_775C20(&v171, &a1->m_level->m_levelName); v4 = *(_DWORD *)(LODWORD(v171.origin.x) - 12); sub_774008(&v171); if ( v4 ) { m_level = a1->m_level; sub_775C20(&v171, &m_level->m_levelName); sub_775D40(&m_level->m_tempName, &v171); sub_774008(&v171); } sub_775C20(&v171, &a1->m_level->m_levelName); sub_774794(&a1->m_levelName, &v171); sub_774008(&v171); a1->m_levelType = a2->m_levelType; GameManager::sharedState()->m_currentLevelID = a1->m_level->m_M_ID; a1->setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v6 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v138, v6); v8 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v7); setAnchorPoint = v8->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v171.origin, 0.0, 0.0); setAnchorPoint(v8, &v171.origin); a1->addChild_0(a1, v8, -2); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v8->setScaleX)(v8, (float)(v138.width + 10.0) / v8[1].m_fSkewX); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))v8->setScaleY)(v8, (float)(v138.height + 10.0) / v8[1].m_fSkewY); setPosition = v8->setPosition; cocos2d::CCPoint::CCPoint(&v171.origin, -5.0, -5.0); setPosition(v8, &v171.origin); getTag = v8->__vftable[1].getTag; *(_WORD *)((char *)&v171.origin.x + 1) = -154; LOBYTE(v171.origin.x) = 0; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v8, &v171); v12 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v13 = v12->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v171.origin, 0.0, 0.0); v13(v12, &v171.origin); v14 = v12->setPosition; v15 = cocos2d::CCDirector::sharedDirector(); v16 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v15)); v17 = cocos2d::CCDirector::sharedDirector(); v18 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v17)); cocos2d::CCPoint::CCPoint(&v171.origin, v16 - 1.0, v18 - 1.0); v14(v12, &v171.origin); a1->addChild_0(a1, v12, 1); v19 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v20 = v19->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v171.origin, 1.0, 0.0); v20(v19, &v171.origin); v21 = v19->setPosition; v22 = cocos2d::CCDirector::sharedDirector(); v23 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v22)); v24 = cocos2d::CCDirector::sharedDirector(); v25 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v24)); cocos2d::CCPoint::CCPoint(&v171.origin, v23 + 1.0, v25 - 1.0); v21(v19, &v171.origin); cocos2d::CCSprite::setFlipX(v19, 1); v26 = (cocos2d::CCArray *)((int (__fastcall *)(EditLevelLayer *, cocos2d::CCSprite *, int))a1->addChild_0)( a1, v19, 1); v27 = (cocos2d::CCArray *)cocos2d::CCArray::create(v26); a1->m_textInputs = v27; cocos2d::CCObject::retain(v27); cocos2d::CCRect::CCRect(&v170, 0.0, 0.0, 80.0, 80.0); width = v138.width; v29 = cocos2d::CCDirector::sharedDirector(); v30 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v29)); cocos2d::CCPoint::CCPoint(&v139, width * 0.5, v30 - 30.0); cocos2d::CCRect::CCRect(&v171, &v170); v173.origin.x = v130; v173.origin.y = v131; v173.size = v172; v31 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v171, v173); ((void (__fastcall *)(cocos2d::CCNode *, int))v31->__vftable[1].~CCNode_0)(v31, 255); cocos2d::CCSize::CCSize(&v140, 365.0, 40.0); v31->setContentSize(v31, &v140); a1->addChild_0(a1, v31, -1); v31->setPosition(v31, &v139); v32 = v31->__vftable[1].getTag; *(_WORD *)((char *)&v171.origin.x + 1) = -29384; LOBYTE(v171.origin.x) = 0; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v32)(v31, &v171); v33 = a1->m_level; if ( v33->m_levelVersion > 1 || v33->m_isUploaded ) { sub_775C20(&v171, &v33->m_levelName); v115 = cocos2d::CCLabelBMFont::create(); sub_774008(&v171); a1->addChild_0(a1, v115, 20); v115->setPosition(v115, &v139); } else { v34 = CCTextInputNode::create(300.0, 50.0, "Level Name", "Thonburi"); ((void (__fastcall *)(EditLevelLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int *, const char *))a1->addChild_0)( a1, v34, 18, a1->addChild_0, &dword_18, "bigFont.fnt"); v34->m_delegate = &a1->TextInputDelegate; v34->setTag(v34, 1); v34->setPosition(v34, &v139); v35 = a1->m_level; v34->m_maxLabelLength = 20; v34->m_filterSwearWords = 1; sub_775C20(&v169, &v35->m_levelName); sub_776584((int)&v171, (char *)&unk_939830); v132 = sub_774DBC(&v169, &v171); sub_774008(&v171); sub_774008(&v169); if ( v132 ) { sub_775C20(&v169, &a2->m_levelName); sub_776584((int)&v171, (char *)LODWORD(v169.x)); CCTextInputNode::setString((int)v34, (char *)&v171, v125); sub_774008(&v171); sub_774008(&v169); } *(_WORD *)&v135.r = -21896; v135.b = -16; CCTextInputNode::setLabelPlaceholderColor(v34, v135); CCTextInputNode::setLabelPlaceholderScale(v34, 0.7); cocos2d::CCArray::addObject(a1->m_textInputs, v34); } cocos2d::CCPoint::CCPoint(&v141, v138.width * 0.5, (float)(v138.height * 0.5) + 65.0); cocos2d::CCRect::CCRect(&v171, &v170); v36 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v171, v174); ((void (__fastcall *)(cocos2d::CCNode *, int))v36->__vftable[1].~CCNode_0)(v36, 255); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v171, 365.0, 60.0); cocos2d::CCSize::operator=(&v140, &v171); v36->setContentSize(v36, &v140); a1->addChild_0(a1, v36, -1); v36->setPosition(v36, &v141); v37 = v36->__vftable[1].getTag; LOBYTE(v171.origin.x) = 0; *(_WORD *)((char *)&v171.origin.x + 1) = -29384; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v37)(v36, &v171); v38 = CCTextInputNode::create(365.0, 50.0, "Description [Optional]", "Thonburi"); addChild_0 = a1->addChild_0; v40 = v38; v38->m_filterSwearWords = 0; ((void (__fastcall *)(EditLevelLayer *, CCTextInputNode *, int, void (__fastcall *)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int), int, _DWORD))addChild_0)( a1, v38, 20, addChild_0, 24, 0); v40->m_delegate = &a1->TextInputDelegate; v40->setTag(v40, 2); v40->setPosition(v40, &v141); sub_776584( (int)&v171, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~"); CCTextInputNode::setAllowedChars((int)v40, (int)&v171); sub_774008(&v171); m_textInputs = a1->m_textInputs; v40->m_maxLabelLength = 180; cocos2d::CCArray::addObject(m_textInputs, v40); v40->m_textField->setVisible(v40->m_textField, 0); sub_776584((int)&v169, (char *)&unk_939830); cocos2d::CCPoint::CCPoint(&v171.origin, 0.5, 0.5); v42 = (TextArea *)TextArea::create( (TextArea *)&v169, (std::string)"chatFont.fnt", (const char *)0x3F800000, 1134395392, &v171.origin, (cocos2d::CCPoint)0x141A00000LL); sub_774008(&v169); CCTextInputNode::addTextArea(v40, v42); *(_WORD *)&v136.r = -21896; v136.b = -16; CCTextInputNode::setLabelPlaceholderColor(v40, v136); EditLevelLayer::updateDescText(a1, (const char *)&unk_939830); GJGameLevel::getUnpackedLevelDescription((GJGameLevel *)&v137); sub_776584((int)&v143, (char *)&unk_939830); v43 = sub_774DBC(&v137, &v143); sub_774008(&v143); if ( v43 ) { sub_776584((int)&v144, v137); CCTextInputNode::setString((int)v40, (char *)&v144, v116); sub_774008(&v144); } v44 = cocos2d::CCMenu::create(); v45 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_buttonMenu = v44; v45->addChild(a1, v44); v46 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); v146 = 0; v145 = EditLevelLayer::onEdit; v47 = CCMenuItemSpriteExtra::create( v46, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onEdit, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47); v133 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v148 = 0; v147 = EditLevelLayer::onPlay; v48 = CCMenuItemSpriteExtra::create( v133, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onPlay, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v48); v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_shareBtn_001.png"); v150 = 0; v149 = EditLevelLayer::onShare; v50 = CCMenuItemSpriteExtra::create( v49, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onShare, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v50); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(a1->m_buttonMenu, 20.0); m_buttonMenu = a1->m_buttonMenu; v52 = m_buttonMenu->setPosition; v53 = (float *)m_buttonMenu->getPosition(m_buttonMenu); cocos2d::CCPoint::CCPoint(&v171.origin, *v53, (float)(v138.height * 0.5) - 25.0); v52(m_buttonMenu, &v171.origin); EditLevelLayer::setupLevelInfo(a1); v54 = a1->m_level; if ( v54->m_levelVersion > 1 || v54->m_isUploaded ) { v126 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v152 = 0; v151 = EditLevelLayer::onUpdateDescription; v127 = CCMenuItemSpriteExtra::create( v126, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onUpdateDescription, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v127); v128 = v127->setPosition; v129 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v169, 30.0, v141.y); cocos2d::CCNode::convertToNodeSpace(&v171.origin, v129, &v169); v128(v127, &v171.origin); } v55 = cocos2d::CCMenu::create(); a1->addChild(a1, v55); v56 = cocos2d::CCDirector::sharedDirector(); v57 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v56)) - 30.0; v58 = cocos2d::CCDirector::sharedDirector(); v59 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v58)); cocos2d::CCPoint::CCPoint(&v142, v57, v59 - 30.0); v60 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); v154 = 0; v153 = EditLevelLayer::confirmDelete; v61 = CCMenuItemSpriteExtra::create( v60, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::confirmDelete, (unsigned int)a1)); v55->addChild(v55, v61); v62 = v61->setPosition; cocos2d::CCNode::convertToNodeSpace(&v171.origin, v55, &v142); v62(v61, &v171.origin); v63 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_helpBtn_001.png"); setScale = v63->setScale; v65 = v60->getContentSize(v60)->width; v66 = (float *)v63->getContentSize(v63); ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))setScale)(v63, v65 / *v66); v156 = 0; v155 = EditLevelLayer::onHelp; v67 = CCMenuItemSpriteExtra::create( v63, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onHelp, (unsigned int)a1)); v55->addChild(v55, v67); v68 = v67->setPosition; v69 = (int)v61->getPosition(v61); cocos2d::CCPoint::CCPoint(&v169, 0.0, -60.0); cocos2d::CCPoint::operator+(&v171, v69, &v169); v68(v67, &v171.origin); v70 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png"); v158 = 0; v157 = EditLevelLayer::confirmClone; v71 = CCMenuItemSpriteExtra::create( v70, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::confirmClone, (unsigned int)a1)); v55->addChild(v55, v71); v72 = v71->setPosition; v73 = (int)v67->getPosition(v67); cocos2d::CCPoint::CCPoint(&v169, 0.0, -60.0); cocos2d::CCPoint::operator+(&v171, v73, &v169); v72(v71, &v171.origin); v74 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_orderUpBtn_001.png"); v160 = 0; v159 = EditLevelLayer::confirmMoveToTop; v75 = CCMenuItemSpriteExtra::create( v74, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::confirmMoveToTop, (unsigned int)a1)); v55->addChild(v55, v75); v76 = v75->setPosition; v77 = (int)v71->getPosition(v71); cocos2d::CCPoint::CCPoint(&v169, 0.0, -60.0); cocos2d::CCPoint::operator+(&v171, v77, &v169); v76(v75, &v171.origin); v78 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v79 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)a1->m_level->m_levelFolder); cocos2d::CCString::getCString(v79); v80 = cocos2d::CCLabelBMFont::create(); v81 = v78->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_folderLabel = v80; v81->addChild_0(v78, v80, 1); m_folderLabel = a1->m_folderLabel; v83 = m_folderLabel->setPosition; v84 = v78->getContentSize(v78)->width; v85 = (int)v78->getContentSize(v78); cocos2d::CCPoint::CCPoint(&v171.origin, v84 * 0.5, (float)(*(float *)(v85 + 4) * 0.5) + 1.0); v83(m_folderLabel, &v171.origin); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_folderLabel, 24.0, 0.55, 0.0); v162 = 0; v161 = EditLevelLayer::onSetFolder; v86 = CCMenuItemSpriteExtra::create( v78, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onSetFolder, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v86, 1.2); v55->addChild(v55, v86); v87 = v86->setPosition; cocos2d::CCPoint::CCPoint(&v169, 30.0, v141.y - 60.0); cocos2d::CCNode::convertToNodeSpace(&v171.origin, v55, &v169); v87(v86, &v171.origin); if ( GJGameLevel::isPlatformer(a1->m_level) ) { v117 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v117->setScale)(v117, 1061997773); v164 = 0; v163 = EditLevelLayer::onLevelLeaderboard; v118 = CCMenuItemSpriteExtra::create( v117, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onLevelLeaderboard, (unsigned int)a1)); v55->addChild(v55, v118); v119 = v118->setPosition; v120 = (int)v86->getPosition(v86); cocos2d::CCPoint::CCPoint(&v169, 0.0, -50.0); cocos2d::CCPoint::operator+(&v171, v120, &v169); v119(v118, &v171.origin); } v88 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v166 = 0; v165 = EditLevelLayer::onBack; v89 = CCMenuItemSpriteExtra::create( v88, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onBack, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v89, 1.6); v90 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v89, nullptr); a1->addChild_0(a1, v90, 1); v91 = v90->setPosition; v92 = cocos2d::CCDirector::sharedDirector(); v93 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v92)) + 24.0; v94 = cocos2d::CCDirector::sharedDirector(); v95 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v94)); cocos2d::CCPoint::CCPoint(&v171.origin, v93, v95 - 23.0); v91(v90, &v171.origin); v96 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v96, 2); v97 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v168 = 0; v167 = EditLevelLayer::onLevelInfo; v98 = CCMenuItemSpriteExtra::create( v97, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onLevelInfo, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v98, 2.0); v96->addChild(v96, v98); v99 = v96->setPosition; v100 = cocos2d::CCDirector::sharedDirector(); v101 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v100)) + 30.0; v102 = cocos2d::CCDirector::sharedDirector(); v103 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v102)); cocos2d::CCPoint::CCPoint(&v171.origin, v101, v103 + 30.0); v99(v96, &v171.origin); v104 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v104->setScale)(v104, 1061997773); v169.y = 0.0; LODWORD(v169.x) = EditLevelLayer::onGuidelines; v105 = CCMenuItemSpriteExtra::create( v104, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onGuidelines, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v105, 1.2); v96->addChild(v96, v105); v106 = v105->setPosition; v107 = cocos2d::CCDirector::sharedDirector(); v108 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v107)) - 30.0; v109 = cocos2d::CCDirector::sharedDirector(); v110 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v109)); cocos2d::CCPoint::CCPoint(&v144, v108, v110 + 30.0); cocos2d::CCNode::convertToNodeSpace(&v171.origin, v96, &v144); v106(v105, &v171.origin); v111 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v111->setScale)(v111, 1058642330); v171.origin.y = 0.0; LODWORD(v171.origin.x) = EditLevelLayer::onLevelOptions; v112 = CCMenuItemSpriteExtra::create( v111, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(EditLevelLayer::onLevelOptions, (unsigned int)a1)); v96->addChild(v96, v112); v113 = v112->setPosition; cocos2d::CCPoint::CCPoint(&v143, 30.0, 70.0); cocos2d::CCNode::convertToNodeSpace(&v144, v96, &v143); v113(v112, &v144); if ( PlatformToolbox::isControllerConnected() ) { GameToolbox::addBackButton(a1, v89); v121 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); v133->addChild(v133, v121); v122 = v121->setPosition; v123 = v133->getContentSize(v133)->width; v124 = (int)v133->getContentSize(v133); cocos2d::CCPoint::CCPoint(&v144, v123 * 0.5, (float)(*(float *)(v124 + 4) * 0.5) - 40.0); v122(v121, &v144); } sub_774008(&v137); } return v134; }
GD Web Decomp Icon

GD Web Decomp

Raw Source