// // SetGroupIDLayer::init from 0x50a168 to 0x50b776 (5646 bytes) // // 1 xrefs: // > SetGroupIDLayer::create @ 0x50b872 // // 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 SetGroupIDLayer::init(SetGroupIDLayer *a1, GameObject *a2, cocos2d::CCArray *a3) { cocos2d::CCArray *v5; // r0 cocos2d::CCArray *v6; // r0 cocos2d::CCDictionary *v7; // r0 cocos2d::CCDirector *v8; // r0 cocos2d::CCLayer *v9; // r0 SetGroupIDLayer_vtbl *v10; // r3 cocos2d::CCArray *v11; // r0 cocos2d::CCArray *v12; // r0 cocos2d::CCNode *v13; // r5 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCNode *v16; // r5 void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r6 void (__fastcall *v18)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCLabelBMFont *v19; // r6 void (__fastcall *v20)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCLabelBMFont *v22; // r0 float v23; // s20 cocos2d::CCNode *v24; // r8 void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 int v26; // r0 void (__fastcall *v27)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v28; // r10 void (__fastcall *v29)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v30; // r10 cocos2d::CCMenu *v31; // r0 ButtonSprite *v32; // r0 CCMenuItemSpriteExtra *v33; // r0 cocos2d::CCMenu *m_buttonMenu; // r10 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v36; // r9 CCMenuItemSpriteExtra *v37; // r10 const cocos2d::CCPoint *v38; // r0 cocos2d::CCSprite *v39; // r10 CCMenuItemSpriteExtra *v40; // r10 const cocos2d::CCPoint *v41; // r0 cocos2d::CCSprite *v42; // r10 CCMenuItemSpriteExtra *v43; // r10 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 const cocos2d::CCPoint *v45; // r0 CCMenuItemSpriteExtra *v46; // r10 cocos2d::CCMenu *v47; // r0 cocos2d::CCMenu *v48; // r9 void (__fastcall *v49)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v50; // r6 int v51; // r6 int v52; // r7 char *v53; // r1 ButtonSprite *v54; // r0 float v55; // s21 CCMenuItemSpriteExtra *v56; // r8 void (__fastcall *v57)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v58; // r10 float v59; // s20 float v60; // r0 ButtonSprite *v61; // r0 CCMenuItemSpriteExtra *v62; // r6 void (__fastcall *v63)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v64; // r10 float v65; // s20 const cocos2d::CCPoint *v66; // r0 ButtonSprite *v67; // r0 CCMenuItemSpriteExtra *v68; // r9 void (__fastcall *v69)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v70; // r6 int v71; // r6 int v72; // r9 int v73; // r7 cocos2d::CCArray *v74; // r0 cocos2d::CCArray *v75; // r0 const char *v76; // r12 char *v77; // r0 ButtonSprite *v78; // r10 CCMenuItemSpriteExtra *v79; // r8 cocos2d::CCMenu *v80; // r7 int v81; // r9 cocos2d::CCArray *m_targetObjects; // r0 int v83; // r10 char *v84; // r1 cocos2d::CCSprite *v85; // r0 cocos2d::CCNode *v86; // r7 const cocos2d::ccColor3B *v87; // r1 cocos2d::CCLabelBMFont *v88; // r6 void (__fastcall *v89)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 CCMenuItemSpriteExtra *v90; // r6 void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v92; // r7 float v93; // r1 float v94; // r7 GameObject *m_targetObject; // r0 int ParentMode; // r8 GameObject *v97; // r6 GameObject *v98; // r0 int v99; // r0 cocos2d::CCString *v100; // r0 char *CString; // r1 cocos2d::CCLabelBMFont *v102; // r6 void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v104; // r10 cocos2d::CCSprite *v105; // r5 CCMenuItemSpriteExtra *v106; // r5 void (__fastcall *v107)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v108; // r5 ButtonSprite *v109; // r10 ButtonSprite *v110; // r5 ButtonSprite *v111; // r6 ButtonSprite *v112; // r7 ButtonSprite *v113; // r8 CCMenuItemSpriteExtra *v114; // r10 CCMenuItemSpriteExtra *v115; // r5 CCMenuItemSpriteExtra *v116; // r6 CCMenuItemSpriteExtra *v117; // r7 CCMenuItemSpriteExtra *v118; // r8 GameObject *v119; // r9 GameManager *v120; // r0 void (__fastcall *v121)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v122)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v123)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCMenu *v125; // r10 char v_low; // r9 EffectGameObject *m_playbackObject; // r7 cocos2d::CCMenu *v128; // r9 EffectGameObject *m_traceOutObject; // r5 cocos2d::CCMenu *v130; // r7 int v131; // r2 bool v132; // r3 EffectGameObject *m_traceInObject; // r7 cocos2d::CCMenu *v134; // r10 float v135; // r2 float v136; // r3 float v137; // [sp+10h] [bp-154h] float v138; // [sp+10h] [bp-154h] float v139; // [sp+10h] [bp-154h] float v140; // [sp+10h] [bp-154h] float v141; // [sp+10h] [bp-154h] float v142; // [sp+10h] [bp-154h] float v143; // [sp+10h] [bp-154h] float v144; // [sp+10h] [bp-154h] cocos2d::CCMenu *v145; // [sp+34h] [bp-130h] cocos2d::CCPoint *v146; // [sp+34h] [bp-130h] cocos2d::CCMenu *v147; // [sp+34h] [bp-130h] cocos2d::CCLabelBMFont *v148; // [sp+38h] [bp-12Ch] cocos2d::CCLabelBMFont *v150; // [sp+40h] [bp-124h] cocos2d::CCArray *v151; // [sp+40h] [bp-124h] cocos2d::CCMenu *v152; // [sp+40h] [bp-124h] CCTextInputNode *v153; // [sp+44h] [bp-120h] cocos2d::CCPoint *v154; // [sp+48h] [bp-11Ch] cocos2d::CCMenu *v155; // [sp+48h] [bp-11Ch] bool v156; // [sp+50h] [bp-114h] char *v157; // [sp+64h] [bp-100h] cocos2d::CCLabelBMFont *v158; // [sp+6Ch] [bp-F8h] BYREF const char *v159; // [sp+70h] [bp-F4h] BYREF const char *v160; // [sp+74h] [bp-F0h] BYREF _BYTE v161[4]; // [sp+78h] [bp-ECh] BYREF cocos2d::CCSize v162; // [sp+7Ch] [bp-E8h] BYREF cocos2d::CCPoint v163; // [sp+84h] [bp-E0h] BYREF cocos2d::CCPoint v164; // [sp+8Ch] [bp-D8h] BYREF cocos2d::CCPoint v165; // [sp+94h] [bp-D0h] BYREF cocos2d::CCPoint v166; // [sp+9Ch] [bp-C8h] BYREF cocos2d::CCPoint v167; // [sp+A4h] [bp-C0h] BYREF cocos2d::CCPoint v168; // [sp+ACh] [bp-B8h] BYREF cocos2d::CCPoint v169; // [sp+B4h] [bp-B0h] BYREF void (*v170)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+BCh] [bp-A8h] int v171; // [sp+C0h] [bp-A4h] void (*v172)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+C4h] [bp-A0h] int v173; // [sp+C8h] [bp-9Ch] void (*v174)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+CCh] [bp-98h] int v175; // [sp+D0h] [bp-94h] void (*v176)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+D4h] [bp-90h] int v177; // [sp+D8h] [bp-8Ch] void (*v178)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+DCh] [bp-88h] int v179; // [sp+E0h] [bp-84h] void (*v180)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+E4h] [bp-80h] int v181; // [sp+E8h] [bp-7Ch] void (*v182)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+ECh] [bp-78h] int v183; // [sp+F0h] [bp-74h] void (*v184)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+F4h] [bp-70h] int v185; // [sp+F8h] [bp-6Ch] void (*v186)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+FCh] [bp-68h] int v187; // [sp+100h] [bp-64h] void (*v188)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+104h] [bp-60h] int v189; // [sp+108h] [bp-5Ch] void (*v190)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+10Ch] [bp-58h] int v191; // [sp+110h] [bp-54h] void (*v192)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+114h] [bp-50h] int v193; // [sp+118h] [bp-4Ch] void (*v194)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+11Ch] [bp-48h] int v195; // [sp+120h] [bp-44h] void (*v196)(SetGroupIDLayer *, cocos2d::CCObject *); // [sp+124h] [bp-40h] int v197; // [sp+128h] [bp-3Ch] cocos2d::CCPoint v198; // [sp+12Ch] [bp-38h] BYREF cocos2d::CCPoint v199; // [sp+134h] [bp-30h] BYREF cocos2d::CCPoint v200; // [sp+13Ch] [bp-28h] BYREF cocos2d::CCPoint v201; // [sp+144h] [bp-20h] BYREF cocos2d::CCRect v202; // [sp+14Ch] [bp-18h] BYREF cocos2d::CCSize v203; // 0:^0.8 cocos2d::CCRect v204; // 0:kr00_16.16 cocos2d::CCRect v205; // 0:r2.8,8:^0.8 v202.origin.x = 8388600.0; v5 = (cocos2d::CCArray *)cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v202); v156 = (char)v5; if ( !v5 ) return v156; a1->m_editorLayerEdited = 1; a1->m_noElasticity = 1; if ( a2 ) { a1->m_targetObject = a2; } else { a1->m_targetObjects = a3; cocos2d::CCObject::retain(a3); } v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5); a1->m_zLayerButtons = v6; cocos2d::CCObject::retain(v6); v7 = cocos2d::CCDictionary::create(); a1->m_parentGroups = v7; cocos2d::CCObject::retain(v7); FLAlertLayer::incrementForcePrio(a1); a1->setTouchEnabled(a1, 1); a1->setKeypadEnabled(a1, 1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v162, v8); v9 = cocos2d::CCLayer::create(); v10 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_mainLayer = v9; v10->addChild(a1, v9); v11 = (cocos2d::CCArray *)((int (__fastcall *)(SetGroupIDLayer *, int))a1->setOpacity)(a1, 200); v12 = (cocos2d::CCArray *)cocos2d::CCArray::create(v11); a1->m_groupIDObjects = v12; cocos2d::CCObject::retain(v12); a1->m_groupIDValue = GameManager::sharedState()->m_currentGroupID; cocos2d::CCRect::CCRect(&v202, 0.0, 0.0, 80.0, 80.0); v204.origin.x = v135; v204.origin.y = v136; v204.size = v203; v13 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v202, v204); setContentSize = v13->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v202, 390.0, 310.0); setContentSize(v13, (const cocos2d::CCSize *)&v202); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v13, -2); setPosition = v13->setPosition; cocos2d::CCPoint::CCPoint(&v202.origin, v162.width * 0.5, v162.height * 0.5); setPosition(v13, &v202.origin); cocos2d::CCRect::CCRect(&v202, 0.0, 0.0, 80.0, 80.0); v16 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02_001.png", (const char *)&v202, v205); ((void (__fastcall *)(cocos2d::CCNode *, int))v16->__vftable[1].~CCNode_0)(v16, 50); v17 = v16->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v202, 360.0, 68.0); v17(v16, (const cocos2d::CCSize *)&v202); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v16, -1); v18 = v16->setPosition; cocos2d::CCPoint::CCPoint(&v202.origin, v162.width * 0.5, (float)(v162.height * 0.5) - 17.0); v18(v16, &v202.origin); v19 = cocos2d::CCLabelBMFont::create(); v20 = v19->setPosition; cocos2d::CCPoint::CCPoint( &v202.origin, (float)(v162.width * 0.5) - 125.0, (float)((float)(v162.height * 0.5) + 155.0) - 17.0); v20(v19, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v19); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v19->setScale)(v19, 1059481190); v150 = cocos2d::CCLabelBMFont::create(); v21 = v150->setPosition; cocos2d::CCPoint::CCPoint(&v202.origin, v162.width * 0.5, (float)((float)(v162.height * 0.5) + 155.0) - 17.0); v21(v150, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v150); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v150->setScale)(v150, 1059481190); v22 = cocos2d::CCLabelBMFont::create(); v23 = v162.width * 0.5; v24 = v22; v25 = v22->setPosition; v26 = (int)v19->getPosition(v19); cocos2d::CCPoint::CCPoint(&v202.origin, v23, *(float *)(v26 + 4) - 65.0); v25(v24, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v24); ((void (__fastcall *)(cocos2d::CCNode *, int))v24->setScale)(v24, 1059481190); v153 = (CCTextInputNode *)cocos2d::CCLabelBMFont::create(); v27 = v153->setPosition; v28 = (int)v19->getPosition(v19); cocos2d::CCPoint::CCPoint(&v201, 250.0, 0.0); cocos2d::CCPoint::operator+(&v202, v28, &v201); v27(v153, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v153); ((void (__fastcall *)(CCTextInputNode *, int))v153->setScale)(v153, 1059481190); v148 = cocos2d::CCLabelBMFont::create(); v29 = v148->setPosition; v30 = (int)v24->getPosition(v24); cocos2d::CCPoint::CCPoint(&v201, 0.0, -137.0); cocos2d::CCPoint::operator+(&v202, v30, &v201); v29(v148, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v148); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v148->setScale)(v148, 1059481190); v31 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v31; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v31, 10); a1->m_joystickConnected = -1; v32 = ButtonSprite::create( (ButtonSprite *)"OK", (const char *)&word_28, 0, 0.8, 1, "goldFont.fnt", "GJ_button_01.png", (const char *)0x41F00000, v137); v171 = 0; v170 = SetGroupIDLayer::onClose; v33 = CCMenuItemSpriteExtra::create( v32, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v33); m_buttonMenu = a1->m_buttonMenu; v35 = m_buttonMenu->setPosition; cocos2d::CCPoint::CCPoint(&v202.origin, v162.width * 0.5, (float)((float)(v162.height * 0.5) - 155.0) + 23.0); v35(m_buttonMenu, &v202.origin); v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v36->setScale)(v36, 1061997773); v173 = 0; v172 = SetGroupIDLayer::onNextFreeEditorLayer1; v37 = CCMenuItemSpriteExtra::create( v36, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onNextFreeEditorLayer1, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v37); v145 = a1->m_buttonMenu; v154 = (cocos2d::CCPoint *)v37->setPosition; v38 = v19->getPosition(v19); cocos2d::CCNode::convertToNodeSpace(&v200, v145, v38); cocos2d::CCPoint::CCPoint(&v201, 50.0, 0.0); cocos2d::CCPoint::operator+(&v202, &v200, &v201); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v154)(v37, &v202); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v39->setScale)(v39, 1061997773); v175 = 0; v174 = SetGroupIDLayer::onNextFreeEditorLayer2; v40 = CCMenuItemSpriteExtra::create( v39, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onNextFreeEditorLayer2, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v40); v155 = a1->m_buttonMenu; v146 = (cocos2d::CCPoint *)v40->setPosition; v41 = v150->getPosition(v150); cocos2d::CCNode::convertToNodeSpace(&v200, v155, v41); cocos2d::CCPoint::CCPoint(&v201, 54.0, 0.0); cocos2d::CCPoint::operator+(&v202, &v200, &v201); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v146)(v40, &v202); v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v42->setScale)(v42, 1051931443); v177 = 0; v176 = SetGroupIDLayer::onGroupIDOptions; v43 = CCMenuItemSpriteExtra::create( v42, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onGroupIDOptions, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v43); v44 = v43->setPosition; v147 = a1->m_buttonMenu; v45 = v24->getPosition(v24); cocos2d::CCNode::convertToNodeSpace(&v200, v147, v45); cocos2d::CCPoint::CCPoint(&v201, 73.0, 0.0); cocos2d::CCPoint::operator+(&v202, &v200, &v201); v44(v43, &v202.origin); sub_776584((int)&v201, "Help"); sub_776584( (int)&v202, "Add assigns up to 10 groups to the selected object(s).\n" " P sets a single object as group parent.\n" "Editor L1 and L2 places the object(s) on an editor layer.\n" "Z layer sets the draw layer of the object(s). T layers are above, while B layers are below the player.\n" "Z order sets the draw order of the object(s) within the Z layer.\n" "CH sets the channel of the object(s).\n" "ORD sets the order of the object(s).\n" "Extra has more advanced options.\n" "Preview makes touch toggled triggers preview in editor.\n" "Playback starts playback from this object."); v46 = InfoAlertButton::create((int)&v201, (int)&v202, 1061997773); sub_774008(&v202); sub_774008(&v201); v47 = a1->m_buttonMenu; v46[1].m_nLuaID = 1063675494; v47->addChild(v47, v46); v48 = a1->m_buttonMenu; v49 = v46->setPosition; cocos2d::CCPoint::CCPoint( &v201, (float)((float)(v162.width * 0.5) + 195.0) - 17.0, (float)((float)(v162.height * 0.5) + 155.0) - 17.0); cocos2d::CCNode::convertToNodeSpace(&v202.origin, v48, &v201); v49(v46, &v202.origin); v50 = (int)v19->getPosition(v19); cocos2d::CCPoint::CCPoint(&v201, 0.0, -30.0); cocos2d::CCPoint::operator+(&v202, v50, &v201); sub_776584((int)&v200, "L1"); a1->m_editorLayerInput = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, 5, &byte_6, (const char **)&v200, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 2); sub_774008(&v200); v51 = (int)v150->getPosition(v150); cocos2d::CCPoint::CCPoint(&v201, 0.0, -30.0); cocos2d::CCPoint::operator+(&v202, v51, &v201); sub_776584((int)&v200, "L2"); a1->m_editorLayer2Input = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, (int)&byte_6, &byte_6, (const char **)&v200, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 3); sub_774008(&v200); v52 = (int)v24->getPosition(v24); cocos2d::CCPoint::CCPoint(&v202.origin, 0.0, -30.0); cocos2d::CCPoint::operator+(&v163, v52, &v202); cocos2d::CCPoint::CCPoint(&v202.origin, &v163); if ( a1->m_groupIDValue == -1 ) v53 = "Mixed"; else v53 = "Num"; sub_776584((int)&v201, v53); a1->m_groupIDInput = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, 1, &byte_6, (const char **)&v201, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 1); sub_774008(&v201); v54 = ButtonSprite::create( (ButtonSprite *)"Next Free", (const char *)&word_32, 0, 0.7, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v138); v179 = 0; v55 = -20.0; v178 = SetGroupIDLayer::onNextGroupID1; v56 = CCMenuItemSpriteExtra::create( v54, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onNextGroupID1, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v56); v57 = v56->setPosition; v58 = a1->m_buttonMenu; v59 = (float)(v162.width * 0.5) - 125.0; v60 = ((float (__fastcall *)(CCTextInputNode *))a1->m_groupIDInput->getPosition)(a1->m_groupIDInput); cocos2d::CCPoint::CCPoint(&v201, v59, *(float *)(LODWORD(v60) + 4)); cocos2d::CCNode::convertToNodeSpace(&v202.origin, v58, &v201); v57(v56, &v202.origin); if ( !a2 ) v55 = 0.0; v61 = ButtonSprite::create( (ButtonSprite *)"Add", (const char *)&word_32, 0, 0.7, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v139); v181 = 0; v180 = SetGroupIDLayer::onAddGroup; v62 = CCMenuItemSpriteExtra::create( v61, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onAddGroup, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v62); v63 = v62->setPosition; v64 = a1->m_buttonMenu; v65 = (float)(v162.width * 0.5) + 125.0; v66 = a1->m_groupIDInput->getPosition(a1->m_groupIDInput); cocos2d::CCPoint::CCPoint(&v201, v65 + v55, v66->y); cocos2d::CCNode::convertToNodeSpace(&v202.origin, v64, &v201); v63(v62, &v202.origin); if ( a2 ) { v67 = ButtonSprite::create( (ButtonSprite *)"P", (const char *)&word_32, 0, 0.7, 0, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v140); v183 = 0; v182 = SetGroupIDLayer::onAddGroupParent; v68 = CCMenuItemSpriteExtra::create( v67, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onAddGroupParent, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v68); v69 = v68->setPosition; v70 = (int)v62->getPosition(v62); cocos2d::CCPoint::CCPoint(&v201, 60.0, 0.0); cocos2d::CCPoint::operator+(&v202, v70, &v201); v69(v68, &v202.origin); } v71 = (int)v153->getPosition(v153); cocos2d::CCPoint::CCPoint(&v201, 0.0, -30.0); cocos2d::CCPoint::operator+(&v202, v71, &v201); sub_776584((int)&v200, "Z"); a1->m_zOrderInput = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, 7, &byte_6, (const char **)&v200, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 2); v72 = 0; v73 = -5; v74 = (cocos2d::CCArray *)sub_774008(&v200); v75 = (cocos2d::CCArray *)cocos2d::CCArray::create(v74); v76 = "T3"; v151 = v75; v77 = "B5"; while ( 1 ) { ++v72; v157 = (char *)v76; v78 = ButtonSprite::create( (ButtonSprite *)v77, (const char *)off_DC, 0, 0.3, 0, "bigFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v140); cocos2d::CCArray::addObject(a1->m_zLayerButtons, v78); v185 = 0; v184 = SetGroupIDLayer::onZLayer; v79 = CCMenuItemSpriteExtra::create( v78, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onZLayer, (unsigned int)a1)); v79->setTag(v79, v73); v78->setTag(v78, v73); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v79); cocos2d::CCArray::addObject(v151, v79); v76 = v157; if ( v72 == 10 ) break; switch ( v72 ) { case 1: v73 = -3; v77 = "B4"; break; case 2: v73 = -1; v77 = "B3"; break; case 3: v73 = 1; v77 = "B2"; break; case 4: v73 = 3; v77 = "B1"; break; case 5: v73 = 5; v77 = "T1"; break; case 6: v73 = 7; v77 = "T2"; break; case 7: v73 = 9; v77 = v157; break; case 8: v73 = 11; v77 = "T4"; break; default: v73 = 0; v77 = "Default"; break; } } v80 = a1->m_buttonMenu; v81 = (int)v148->getPosition(v148); cocos2d::CCPoint::CCPoint(&v200, 0.0, -28.0); cocos2d::CCPoint::operator+(&v201, v81, &v200); cocos2d::CCNode::convertToNodeSpace(&v202.origin, v80, &v201); GameToolbox::alignItemsHorisontally(v151, 5.0, (cocos2d::CCPoint)(unsigned int)&v202, 0); SetGroupIDLayer::determineStartValues(a1); if ( a1->m_zLayerValue == -100 && (m_targetObjects = a1->m_targetObjects) != nullptr && cocos2d::CCArray::count(m_targetObjects) ) { v83 = 0; v84 = "-"; while ( 1 ) { sub_776584((int)&v199, v84); v85 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png"); v86 = v85; v87 = (const cocos2d::ccColor3B *)(v83 ? &unk_9ACE17 : &unk_9ACE14); v85->setColor(v85, v87); ((void (__fastcall *)(cocos2d::CCNode *, int))v86->__vftable[1].~CCNode_0)(v86, 100); v88 = cocos2d::CCLabelBMFont::create(); v86->addChild(v86, v88); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v88->setScale)(v88, 1068708659); v89 = v88->setPosition; cocos2d::CCNode::convertToNodeSpace(&v200, v86, &stru_AC74D8); cocos2d::CCPoint::CCPoint(&v201, 2.0, 2.5); cocos2d::CCPoint::operator+(&v202, &v200, &v201); v89(v88, &v202.origin); ((void (__fastcall *)(cocos2d::CCNode *, int))v86->setScale)(v86, 1050253722); v187 = 0; v186 = SetGroupIDLayer::onZLayerShift; v90 = CCMenuItemSpriteExtra::create( v86, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onZLayerShift, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v90); v90->setTag(v90, v83); v91 = v90->setPosition; v152 = a1->m_buttonMenu; v92 = (int)v148->getPosition(v148); v93 = v83 ? 40.0 : -40.0; cocos2d::CCPoint::CCPoint(&v200, v93, -2.0); cocos2d::CCPoint::operator+(&v201, v92, &v200); cocos2d::CCNode::convertToNodeSpace(&v202.origin, v152, &v201); v91(v90, &v202.origin); CCMenuItemSpriteExtra::setSizeMult(v90, 2.0); sub_774008(&v199); v84 = "+"; if ( v83 ) break; v83 = 1; } v94 = 55.0; } else { v94 = 40.0; } m_targetObject = a1->m_targetObject; if ( m_targetObject ) { ParentMode = GameObject::getParentMode(m_targetObject); } else { if ( !a1->m_targetObjects ) { LABEL_60: CString = "(-)"; goto LABEL_49; } v97 = a1->m_targetObject; ParentMode = -1; while ( (unsigned int)v97 < cocos2d::CCArray::count(a1->m_targetObjects) ) { v98 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, (unsigned int)v97); if ( ParentMode == -1 ) { v99 = GameObject::getParentMode(v98); } else { v99 = GameObject::getParentMode(v98); if ( ParentMode != v99 ) goto LABEL_60; } v97 = (GameObject *)((char *)v97 + 1); ParentMode = v99; } } if ( ParentMode == -1 ) { CString = "(-)"; } else { v100 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"(%i)", (const char *)ParentMode); CString = (char *)cocos2d::CCString::getCString(v100); } LABEL_49: sub_776584((int)&v158, CString); v102 = cocos2d::CCLabelBMFont::create(); v103 = v102->setPosition; v104 = (int)v148->getPosition(v148); cocos2d::CCPoint::CCPoint(&v201, v94, -2.0); cocos2d::CCPoint::operator+(&v202, v104, &v201); v103(v102, &v202.origin); a1->m_mainLayer->addChild(a1->m_mainLayer, v102); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v102->setScale)(v102, 1058642330); v102->setColor(v102, (const cocos2d::ccColor3B *)&unk_9ACE1A); if ( a1->m_showChannelOrder ) { cocos2d::CCPoint::CCPoint( &v198, (float)(v162.width * 0.5) - 125.0, (float)((float)(v162.height * 0.5) - 155.0) + 25.0); cocos2d::CCPoint::CCPoint(&v199, (float)(v162.width * 0.5) + 125.0, v198.y); cocos2d::CCPoint::CCPoint(&v202.origin, &v198); sub_776584((int)&v159, "ORD"); a1->m_orderInput = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, 3, &byte_6, &v159, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 2); sub_774008(&v159); SetGroupIDLayer::updateEditorOrderLabel(a1); cocos2d::CCPoint::CCPoint(&v202.origin, &v199); sub_776584((int)&v160, "CH"); a1->m_channelInput = SetGroupIDLayer::createTextInput( (unsigned int)a1, &v202.origin, 4, &byte_6, &v160, (CCTextInputNode *)0x42480000, (_BYTE *)&dword_0 + 2); sub_774008(&v160); SetGroupIDLayer::updateOrderChannelLabel(a1); v105 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v105->setScale)(v105, 1061997773); v189 = 0; v188 = SetGroupIDLayer::onNextFreeOrderChannel; v106 = CCMenuItemSpriteExtra::create( v105, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onNextFreeOrderChannel, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v106); v107 = v106->setPosition; cocos2d::CCNode::convertToNodeSpace(&v200, a1->m_buttonMenu, &v199); cocos2d::CCPoint::CCPoint(&v201, -75.0, 0.0); cocos2d::CCPoint::operator+(&v202, &v200, &v201); v107(v106, &v202.origin); } SetGroupIDLayer::updateGroupIDLabel(a1); SetGroupIDLayer::updateEditorLabel(a1); SetGroupIDLayer::updateEditorLabel2(a1); SetGroupIDLayer::updateZOrderLabel(a1); SetGroupIDLayer::updateZLayerButtons(a1); SetGroupIDLayer::updateGroupIDButtons(a1); v108 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v202.origin, (float)(v162.width * 0.5) + 217.0, (float)(v162.height * 0.5) + 142.0); cocos2d::CCNode::convertToNodeSpace(&v164, v108, &v202.origin); v109 = ButtonSprite::create( (ButtonSprite *)"Copy", (const char *)&dword_14, 0, 0.5, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v140); v110 = ButtonSprite::create( (ButtonSprite *)"Paste", (const char *)&dword_14, 0, 0.5, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v141); v111 = ButtonSprite::create( (ButtonSprite *)"Extra", (const char *)&dword_14, 0, 0.5, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v142); v112 = ButtonSprite::create( (ButtonSprite *)"Extra2", (const char *)&dword_14, 0, 0.5, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v143); v113 = ButtonSprite::create( (ButtonSprite *)"Anim", (const char *)&dword_14, 0, 0.5, 1, "goldFont.fnt", "GJ_button_04.png", COERCE_CONST_CHAR_(25.0), v144); v191 = 0; v190 = SetGroupIDLayer::onCopy; v114 = CCMenuItemSpriteExtra::create( v109, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onCopy, (unsigned int)a1)); v193 = 0; v192 = SetGroupIDLayer::onPaste; v115 = CCMenuItemSpriteExtra::create( v110, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onPaste, (unsigned int)a1)); v195 = 0; v194 = SetGroupIDLayer::onExtra; v116 = CCMenuItemSpriteExtra::create( v111, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onExtra, (unsigned int)a1)); v197 = 0; v196 = SetGroupIDLayer::onExtra2; v117 = CCMenuItemSpriteExtra::create( v112, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onExtra2, (unsigned int)a1)); v198.y = 0.0; LODWORD(v198.x) = SetGroupIDLayer::onAnim; v118 = CCMenuItemSpriteExtra::create( v113, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SetGroupIDLayer::onAnim, (unsigned int)a1)); v119 = a2; if ( a2 ) v119 = (GameObject *)(&dword_0 + 1); if ( v119 ) { a1->m_buttonMenu->addChild(a1->m_buttonMenu, v114); v114->setPosition(v114, &v164); LABEL_66: a1->m_buttonMenu->addChild(a1->m_buttonMenu, v115); cocos2d::CCPoint::CCPoint(&v200, &v164); if ( v119 ) { cocos2d::CCPoint::CCPoint(&v201, 0.0, -31.0); cocos2d::CCPoint::operator+(&v202, &v200, &v201); cocos2d::CCPoint::operator=((PlayerObject *)&v200, COERCE_FLOAT(&v202), v131, v132); } v115->setPosition(v115, &v200); goto LABEL_56; } v120 = GameManager::sharedState(); if ( LevelEditorLayer::canPasteState(v120->m_levelEditorLayer) ) goto LABEL_66; LABEL_56: a1->m_buttonMenu->addChild(a1->m_buttonMenu, v116); v121 = v116->setPosition; cocos2d::CCPoint::CCPoint(&v201, 0.0, -62.0); cocos2d::CCPoint::operator+(&v202, &v164, &v201); v121(v116, &v202.origin); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v117); v122 = v117->setPosition; cocos2d::CCPoint::CCPoint(&v201, 0.0, -93.0); cocos2d::CCPoint::operator+(&v202, &v164, &v201); v122(v117, &v202.origin); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v118); v123 = v118->setPosition; cocos2d::CCPoint::CCPoint(&v201, 0.0, -124.0); cocos2d::CCPoint::operator+(&v202, &v164, &v201); v123(v118, &v202.origin); cocos2d::CCPoint::CCPoint(&v165, 0.0, 2.0); cocos2d::CCPoint::CCPoint( &v166, (float)(v162.width * 0.5) + 217.0, (float)((float)(v162.height * 0.5) + 142.0) - 164.0); if ( v119 ) { if ( a2->m_classType == Effect && GameManager::sharedState()->m_levelEditorLayer ) { sub_776584((int)&v169, "Preview"); v125 = a1->m_buttonMenu; LODWORD(v199.x) = SetGroupIDLayer::onToggleGuide; v199.y = 0.0; v_low = LOBYTE(a2[1].m_sQuad.bl.texCoords.v); cocos2d::CCPoint::CCPoint(&v200, 0.0, -0.0); cocos2d::CCPoint::operator+(&v201, &v166, &v200); cocos2d::CCPoint::CCPoint(&v202.origin, &v165); GameToolbox::createToggleButton( (int)&v169, LODWORD(v199.x), LODWORD(v199.y), v_low, v125, &v201, a1, a1, 0.7, 0.3, 80.0, (int)&v202, (int)"goldFont.fnt", 1, 0, nullptr); sub_774008(&v169); m_playbackObject = GameManager::sharedState()->m_levelEditorLayer->m_playbackObject; sub_776584((int)&v168, "Playback"); v128 = a1->m_buttonMenu; LODWORD(v200.x) = SetGroupIDLayer::onToggleSelectedOrder; v200.y = 0.0; cocos2d::CCPoint::CCPoint(&v169, 0.0, -38.0); cocos2d::CCPoint::operator+(&v201, &v166, &v169); cocos2d::CCPoint::CCPoint(&v202.origin, &v165); GameToolbox::createToggleButton( (int)&v168, LODWORD(v200.x), LODWORD(v200.y), m_playbackObject == a2, v128, &v201, a1, a1, 0.7, 0.3, 80.0, (int)&v202, (int)"goldFont.fnt", 1, 0, nullptr); sub_774008(&v168); m_traceOutObject = GameManager::sharedState()->m_levelEditorLayer->m_traceOutObject; sub_776584((int)&v167, "Trace Out"); v130 = a1->m_buttonMenu; LODWORD(v201.x) = SetGroupIDLayer::onToggleTraceOut; v201.y = 0.0; cocos2d::CCPoint::CCPoint(&v168, 0.0, -76.0); cocos2d::CCPoint::operator+(&v169, &v166, &v168); cocos2d::CCPoint::CCPoint(&v202.origin, &v165); GameToolbox::createToggleButton( (int)&v167, LODWORD(v201.x), LODWORD(v201.y), m_traceOutObject == a2, v130, &v169, a1, a1, 0.7, 0.3, 80.0, (int)&v202, (int)"goldFont.fnt", 1, 0, nullptr); sub_774008(&v167); } if ( GameManager::sharedState()->m_levelEditorLayer ) { m_traceInObject = GameManager::sharedState()->m_levelEditorLayer->m_traceInObject; sub_776584((int)v161, "Trace In"); v134 = a1->m_buttonMenu; LODWORD(v202.origin.x) = SetGroupIDLayer::onToggleTraceIn; v202.origin.y = 0.0; cocos2d::CCPoint::CCPoint(&v167, 0.0, -114.0); cocos2d::CCPoint::operator+(&v168, &v166, &v167); cocos2d::CCPoint::CCPoint(&v169, &v165); GameToolbox::createToggleButton( (int)v161, LODWORD(v202.origin.x), LODWORD(v202.origin.y), m_traceInObject == a2, v134, &v168, a1, a1, 0.7, 0.3, 80.0, (int)&v169, (int)"goldFont.fnt", 1, 0, nullptr); sub_774008(v161); } } a1->m_editorLayerEdited = 0; sub_774008(&v158); return v156; }
GD Web Decomp Icon

GD Web Decomp

Raw Source