// // MenuLayer::init from 0x30a734 to 0x30b528 (3572 bytes) // // 1 xrefs: // > MenuLayer::scene @ 0x30a12a // // 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 MenuLayer::init(MenuLayer *a1) { GameManager *v2; // r0 GameManager *v3; // r0 void (__fastcall *setKeypadEnabled)(cocos2d::CCLayer *__hidden, bool); // r3 cocos2d::CCDirector *v5; // r0 MenuGameLayer *v6; // r0 MenuLayer_vtbl *v7; // r3 cocos2d::CCSprite *v8; // r7 float width; // s18 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v11; // r0 float v12; // r0 cocos2d::CCSprite *v13; // r0 void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCSprite *v15; // r0 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v17; // r8 cocos2d::CCSprite *v18; // r7 void (__fastcall *v19)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 const cocos2d::CCPoint *v20; // r0 cocos2d::CCSprite *v21; // r0 void (__fastcall *v22)(char *, cocos2d::CCPoint *); // r7 int v23; // r8 cocos2d::CCSprite *v24; // r7 void (__fastcall *v25)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 const cocos2d::CCPoint *v26; // r0 cocos2d::CCDirector *v27; // r0 float v28; // s18 cocos2d::CCMenu *v29; // r10 cocos2d::CCSprite *v30; // r5 CCMenuItemSpriteExtra *v31; // r0 cocos2d::CCSprite *v32; // r5 cocos2d::CCSprite *v33; // r5 CCMenuItemSpriteExtra *v34; // r0 cocos2d::CCSprite *v35; // r5 CCMenuItemSpriteExtra *v36; // r0 void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCDirector *v38; // r0 float v39; // s19 cocos2d::CCSprite *v40; // r6 CCMenuItemSpriteExtra *v41; // r6 cocos2d::CCNode *v42; // r8 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCDirector *v44; // r0 float v45; // r0 cocos2d::CCSprite *v46; // r6 cocos2d::CCSprite *v47; // r6 cocos2d::CCSprite *v48; // r6 CCMenuItemSpriteExtra *v49; // r9 cocos2d::CCSprite *v50; // r6 cocos2d::CCSprite *v51; // r6 cocos2d::CCDirector *v52; // r0 float v53; // r0 int v54; // r8 int v55; // r8 int v56; // r8 void (__fastcall *v57)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 int v58; // r9 cocos2d::CCSprite *v59; // r8 CCMenuItemSpriteExtra *v60; // r0 cocos2d::CCNode *v61; // r9 void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v63; // r0 float v64; // r0 cocos2d::CCSprite *v65; // r9 const cocos2d::CCPoint *v66; // r0 void (__fastcall *v67)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v68; // r9 cocos2d::CCNode *v69; // r8 const cocos2d::CCPoint *v70; // r0 void (__fastcall *v71)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v72; // r8 cocos2d::CCNode *v73; // r9 const cocos2d::CCPoint *v74; // r0 void (__fastcall *v75)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v76; // r8 cocos2d::CCNode *v77; // r9 const cocos2d::CCPoint *v78; // r0 void (__fastcall *v79)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 GameManager *v80; // r0 GJAccountManager *v81; // r0 float v82; // s18 cocos2d::CCSprite *v83; // r7 void (__fastcall *v84)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v85; // r0 float v86; // r0 cocos2d::CCSprite *v87; // r9 int v88; // r8 cocos2d::CCLabelBMFont *v89; // r8 int v90; // r7 cocos2d::CCLabelBMFont *v91; // r8 void (__fastcall *v92)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7 void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v94; // r9 cocos2d::CCSprite *v95; // r0 CCMenuItemSpriteExtra *v96; // r0 cocos2d::CCMenu_vtbl *v97; // r3 CCMenuItemSpriteExtra *m_profileButton; // r8 void (__fastcall *v99)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v100; // r0 MenuLayer_vtbl *v101; // r3 cocos2d::CCLabelBMFont *m_profileLabel; // r9 void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 GameManager *v104; // r0 cocos2d::CCSprite *v105; // r0 CCMenuItemSpriteExtra *v106; // r6 void (__fastcall *v107)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCDirector *v108; // r0 float v109; // r0 GameManager *v110; // r0 cocos2d::CCDelayTime *v111; // r0 cocos2d::CCSequence *v112; // r8 cocos2d::CCFiniteTimeAction *v113; // r0 cocos2d::CCAction *v114; // r0 GameLevelManager *v115; // r0 float v116; // r6 cocos2d::CCDelayTime *v117; // r0 cocos2d::CCSequence *v118; // r7 cocos2d::CCFiniteTimeAction *v119; // r0 cocos2d::CCAction *v120; // r0 cocos2d::CCSprite *v122; // r0 MenuLayer_vtbl *v123; // r3 cocos2d::CCSprite *m_viewProfileSprite; // r9 void (__fastcall *v125)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCMenu *v126; // [sp+8h] [bp-DCh] CCMenuItemSpriteExtra *v127; // [sp+Ch] [bp-D8h] CCMenuItemSpriteExtra *v128; // [sp+Ch] [bp-D8h] void (__fastcall *v129)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-D8h] void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-D8h] void (__fastcall *v131)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-D8h] char *v132; // [sp+10h] [bp-D4h] CCMenuItemSpriteExtra *v133; // [sp+14h] [bp-D0h] CCMenuItemSpriteExtra *v134; // [sp+18h] [bp-CCh] void (__fastcall *v135)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+18h] [bp-CCh] void (__fastcall *v136)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+18h] [bp-CCh] CCMenuItemSpriteExtra *v137; // [sp+1Ch] [bp-C8h] _BOOL4 v138; // [sp+20h] [bp-C4h] CCMenuItemSpriteExtra *v139; // [sp+24h] [bp-C0h] CCMenuItemSpriteExtra *v140; // [sp+28h] [bp-BCh] void (__fastcall *v141)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+2Ch] [bp-B8h] void (__fastcall *v142)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+2Ch] [bp-B8h] CCMenuItemSpriteExtra *v143; // [sp+34h] [bp-B0h] cocos2d::CCSize v144; // [sp+3Ch] [bp-A8h] BYREF cocos2d::CCPoint v145; // [sp+44h] [bp-A0h] BYREF void (*v146)(MenuLayer *, cocos2d::CCObject *); // [sp+4Ch] [bp-98h] int v147; // [sp+50h] [bp-94h] void (*v148)(MenuLayer *, cocos2d::CCObject *); // [sp+54h] [bp-90h] int v149; // [sp+58h] [bp-8Ch] void (*v150)(MenuLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-88h] int v151; // [sp+60h] [bp-84h] void (*v152)(MenuLayer *, cocos2d::CCObject *); // [sp+64h] [bp-80h] int v153; // [sp+68h] [bp-7Ch] void (*v154)(MenuLayer *, cocos2d::CCObject *); // [sp+6Ch] [bp-78h] int v155; // [sp+70h] [bp-74h] void (*v156)(MenuLayer *, cocos2d::CCObject *); // [sp+74h] [bp-70h] int v157; // [sp+78h] [bp-6Ch] void (*v158)(MenuLayer *, cocos2d::CCObject *); // [sp+7Ch] [bp-68h] int v159; // [sp+80h] [bp-64h] void (*v160)(MenuLayer *, cocos2d::CCObject *); // [sp+84h] [bp-60h] int v161; // [sp+88h] [bp-5Ch] void (*v162)(MenuLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-58h] int v163; // [sp+90h] [bp-54h] void (*v164)(MenuLayer *, cocos2d::CCObject *); // [sp+94h] [bp-50h] int v165; // [sp+98h] [bp-4Ch] void (*v166)(MenuLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-48h] int v167; // [sp+A0h] [bp-44h] void (*v168)(MenuLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-40h] int v169; // [sp+A8h] [bp-3Ch] void (*v170)(MenuLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-38h] int v171; // [sp+B0h] [bp-34h] void (*v172)(MenuLayer *, cocos2d::CCObject *); // [sp+B4h] [bp-30h] int v173; // [sp+B8h] [bp-2Ch] void (*v174)(MenuLayer *, cocos2d::CCObject *); // [sp+BCh] [bp-28h] int v175; // [sp+C0h] [bp-24h] cocos2d::CCPoint v176; // [sp+C4h] [bp-20h] BYREF cocos2d::CCPoint v177; // [sp+CCh] [bp-18h] BYREF cocos2d::CCPoint v178; // [sp+D4h] [bp-10h] BYREF v138 = cocos2d::CCLayer::init(a1); if ( v138 ) { v2 = GameManager::sharedState(); GameManager::fadeInMenuMusic(v2); GameManager::sharedState()->m_inMenuLayer = 1; GameManager::sharedState()->m_sceneEnum = 0; v3 = GameManager::sharedState(); setKeypadEnabled = a1->setKeypadEnabled; v3->m_somethingInMenuLayer = 0; setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v144, v5); v6 = MenuGameLayer::create(); v7 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_menuGameLayer = v6; v7->addChild(a1, v6); v8 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_logo_001.png"); a1->addChild_0(a1, v8, 2); width = v144.width; setPosition = v8->setPosition; v11 = cocos2d::CCDirector::sharedDirector(); v12 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v11)); cocos2d::CCPoint::CCPoint(&v178, width * 0.5, v12 - 50.0); setPosition(v8, &v178); v126 = cocos2d::CCMenu::create(); v13 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn_001.png"); v147 = 0; v146 = MenuLayer::onPlay; v133 = CCMenuItemSpriteExtra::create( v13, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onPlay, (unsigned int)a1)); v126->addChild(v126, v133); a1->addChild(a1, v126); v14 = v126->setPosition; cocos2d::CCPoint::CCPoint(&v178, v144.width * 0.5, (float)(v144.height * 0.5) + 10.0); v14(v126, &v178); v15 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_garageBtn_001.png"); v149 = 0; v148 = MenuLayer::onGarage; v127 = CCMenuItemSpriteExtra::create( v15, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onGarage, (unsigned int)a1)); v126->addChild(v126, v127); v16 = v127->setPosition; v17 = (int)v133->getPosition(v133); cocos2d::CCPoint::CCPoint(&v177, -110.0, 0.0); cocos2d::CCPoint::operator+(&v178, v17, &v177); v16(v127, &v178); if ( !GameManager::sharedState()->m_clickedGarage ) { v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_chrSel_001.png"); a1->addChild(a1, v18); v19 = v18->setPosition; v20 = v127->getPosition(v127); cocos2d::CCNode::convertToWorldSpace(&v176, v126, v20); cocos2d::CCPoint::CCPoint(&v177, -50.0, -50.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v19(v18, &v178); } v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_creatorBtn_001.png"); v151 = 0; v150 = MenuLayer::onCreator; v132 = (char *)CCMenuItemSpriteExtra::create( v21, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onCreator, (unsigned int)a1)); v126->addChild(v126, (cocos2d::CCNode *)v132); v22 = *(void (__fastcall **)(char *, cocos2d::CCPoint *))(*(_DWORD *)v132 + 92); v23 = (int)v133->getPosition(v133); cocos2d::CCPoint::CCPoint(&v177, 110.0, 0.0); cocos2d::CCPoint::operator+(&v178, v23, &v177); v22(v132, &v178); if ( !GameManager::sharedState()->m_clickedEditor ) { v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lvlEdit_001.png"); a1->addChild(a1, v24); v25 = v24->setPosition; v26 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(char *))(*(_DWORD *)v132 + 96))(v132); cocos2d::CCNode::convertToWorldSpace(&v176, v126, v26); cocos2d::CCPoint::CCPoint(&v177, 50.0, -50.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v25(v24, &v178); } v27 = cocos2d::CCDirector::sharedDirector(); v28 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v27)) + 45.0; v29 = cocos2d::CCMenu::create(); a1->addChild(a1, v29); v30 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_achBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v30->setScale)(v30, 1065353216); v153 = 0; v152 = MenuLayer::onAchievements; v31 = CCMenuItemSpriteExtra::create( v30, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onAchievements, (unsigned int)a1)); v29->addChild(v29, v31); v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v32->setScale)(v32, 1065353216); v155 = 0; v154 = MenuLayer::onOptions; v143 = CCMenuItemSpriteExtra::create( v32, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onOptions, (unsigned int)a1)); v29->addChild(v29, v143); v33 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_statsBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v33->setScale)(v33, 1065353216); v157 = 0; v156 = MenuLayer::onStats; v34 = CCMenuItemSpriteExtra::create( v33, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onStats, (unsigned int)a1)); v29->addChild(v29, v34); v35 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_ngBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v35->setScale)(v35, 1065353216); v159 = 0; v158 = MenuLayer::onNewgrounds; v36 = CCMenuItemSpriteExtra::create( v35, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onNewgrounds, (unsigned int)a1)); v29->addChild(v29, v36); v37 = v29->setPosition; cocos2d::CCPoint::CCPoint(&v178, v144.width * 0.5, v28); v37(v29, &v178); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v29, 5.0); v38 = cocos2d::CCDirector::sharedDirector(); v39 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v38)) + 30.0; v40 = cocos2d::CCSprite::createWithSpriteFrameName("robtoplogo_small.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v40->setScale)(v40, 1061997773); v161 = 0; v160 = MenuLayer::onRobTop; v41 = CCMenuItemSpriteExtra::create( v40, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onRobTop, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v41, 1.1); v42 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v41, nullptr); a1->addChild_0(a1, v42, 2); v43 = v42->setPosition; v44 = cocos2d::CCDirector::sharedDirector(); v45 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v44)); cocos2d::CCPoint::CCPoint(&v178, v45 + 50.0, v39 - 5.0); v43(v42, &v178); v46 = cocos2d::CCSprite::createWithSpriteFrameName("gj_fbIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v46->setScale)(v46, 1061997773); v163 = 0; v162 = MenuLayer::onFacebook; v134 = CCMenuItemSpriteExtra::create( v46, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onFacebook, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v134, 1.5); v42->addChild(v42, v134); v47 = cocos2d::CCSprite::createWithSpriteFrameName("gj_twIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v47->setScale)(v47, 1061997773); v165 = 0; v164 = MenuLayer::onTwitter; v137 = CCMenuItemSpriteExtra::create( v47, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onTwitter, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v137, 1.5); v42->addChild(v42, v137); v48 = cocos2d::CCSprite::createWithSpriteFrameName("gj_ytIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v48->setScale)(v48, 1061997773); v167 = 0; v166 = MenuLayer::onYouTube; v49 = CCMenuItemSpriteExtra::create( v48, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onYouTube, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v49, 1.5); v42->addChild(v42, v49); v50 = cocos2d::CCSprite::createWithSpriteFrameName("gj_twitchIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v50->setScale)(v50, 1061997773); v169 = 0; v168 = MenuLayer::onTwitch; v139 = CCMenuItemSpriteExtra::create( v50, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onTwitch, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v139, 1.5); v42->addChild(v42, v139); v51 = cocos2d::CCSprite::createWithSpriteFrameName("gj_discordIcon_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v51->setScale)(v51, 1061997773); v171 = 0; v170 = MenuLayer::onDiscord; v140 = CCMenuItemSpriteExtra::create( v51, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onDiscord, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v140, 1.5); v42->addChild(v42, v140); v141 = v134->setPosition; v52 = cocos2d::CCDirector::sharedDirector(); v53 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v52)); cocos2d::CCPoint::CCPoint(&v177, v53 + 22.0, v39 + 25.0); cocos2d::CCNode::convertToNodeSpace(&v178, v42, &v177); v141(v134, &v178); v142 = v137->setPosition; v54 = (int)v134->getPosition(v134); cocos2d::CCPoint::CCPoint(&v177, 29.0, 0.0); cocos2d::CCPoint::operator+(&v178, v54, &v177); v142(v137, &v178); v135 = v49->setPosition; v55 = (int)v137->getPosition(v137); cocos2d::CCPoint::CCPoint(&v177, 29.0, 0.0); cocos2d::CCPoint::operator+(&v178, v55, &v177); v135(v49, &v178); v136 = v139->setPosition; v56 = (int)v49->getPosition(v49); cocos2d::CCPoint::CCPoint(&v177, 29.0, 0.0); cocos2d::CCPoint::operator+(&v178, v56, &v177); v136(v139, &v178); v57 = v140->setPosition; v58 = (int)v49->getPosition(v49); cocos2d::CCPoint::CCPoint(&v177, 29.0, -29.0); cocos2d::CCPoint::operator+(&v178, v58, &v177); v57(v140, &v178); v59 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_moreGamesBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v59->setScale)(v59, 1063675494); v173 = 0; v172 = MenuLayer::onMoreGames; v60 = CCMenuItemSpriteExtra::create( v59, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onMoreGames, (unsigned int)a1)); v61 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v60, nullptr); a1->addChild_0(a1, v61, 2); v62 = v61->setPosition; v63 = cocos2d::CCDirector::sharedDirector(); v64 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v63)); cocos2d::CCPoint::CCPoint(&v178, v64 - 43.0, v28); v62(v61, &v178); GameManager::sharedState()->m_firstSetup = 0; if ( PlatformToolbox::isControllerConnected() ) { v65 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); a1->addChild(a1, v65); v66 = v133->getPosition(v133); cocos2d::CCNode::convertToWorldSpace(&v178, v126, v66); cocos2d::CCNode::convertToNodeSpace(&v176, a1, &v178); v67 = v65->setPosition; cocos2d::CCPoint::CCPoint(&v177, 0.0, -66.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v67(v65, &v178); v68 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Y_001.png"); a1->addChild(a1, v68); v69 = (cocos2d::CCNode *)(*(int (__fastcall **)(char *))(*(_DWORD *)v132 + 248))(v132); v70 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(char *))(*(_DWORD *)v132 + 96))(v132); cocos2d::CCNode::convertToWorldSpace(&v177, v69, v70); cocos2d::CCNode::convertToNodeSpace(&v178, a1, &v177); cocos2d::CCPoint::operator=(&v176, &v178); v71 = v68->setPosition; cocos2d::CCPoint::CCPoint(&v177, 0.0, -45.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v71(v68, &v178); ((void (__fastcall *)(cocos2d::CCSprite *, int))v68->setScale)(v68, 1061997773); v72 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png"); a1->addChild(a1, v72); v73 = v127->getParent(v127); v74 = v127->getPosition(v127); cocos2d::CCNode::convertToWorldSpace(&v177, v73, v74); cocos2d::CCNode::convertToNodeSpace(&v178, a1, &v177); cocos2d::CCPoint::operator=(&v176, &v178); v75 = v72->setPosition; cocos2d::CCPoint::CCPoint(&v177, 0.0, -45.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v75(v72, &v178); ((void (__fastcall *)(cocos2d::CCSprite *, int))v72->setScale)(v72, 1061997773); v76 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_DPad_Down_001.png"); a1->addChild(a1, v76); v128 = v143; v77 = v128->getParent(v128); v78 = v128->getPosition(v128); cocos2d::CCNode::convertToWorldSpace(&v177, v77, v78); cocos2d::CCNode::convertToNodeSpace(&v178, a1, &v177); cocos2d::CCPoint::operator=(&v176, &v178); v79 = v76->setPosition; cocos2d::CCPoint::CCPoint(&v177, 0.0, -34.0); cocos2d::CCPoint::operator+(&v178, &v176, &v177); v79(v76, &v178); ((void (__fastcall *)(cocos2d::CCSprite *, int))v76->setScale)(v76, 1056964608); v80 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v80, "0028") ) { v81 = GJAccountManager::sharedState(); if ( v81->m_accountID - v81->m_unkInt1 > 0 ) v82 = 15.0; else v82 = 0.0; v83 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_LThumb_001.png"); a1->addChild(a1, v83); v84 = v83->setPosition; v85 = cocos2d::CCDirector::sharedDirector(); v86 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v85)); cocos2d::CCPoint::CCPoint(&v178, v86 + 25.0, (float)((float)((float)(v144.height * 0.5) + 15.0) + 10.0) + v82); v84(v83, &v178); v87 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_A_001.png"); a1->addChild(a1, v87); v129 = v87->setPosition; v88 = (int)v83->getPosition(v83); cocos2d::CCPoint::CCPoint(&v177, 0.0, -30.0); cocos2d::CCPoint::operator+(&v178, v88, &v177); v129(v87, &v178); v89 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v89->setScale)(v89, 1056964608); a1->addChild(a1, v89); setAnchorPoint = v89->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v178, 0.0, 0.6); setAnchorPoint(v89, &v178); v131 = v89->setPosition; v90 = (int)v83->getPosition(v83); cocos2d::CCPoint::CCPoint(&v177, 16.0, 1.0); cocos2d::CCPoint::operator+(&v178, v90, &v177); v131(v89, &v178); v91 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v91->setScale)(v91, 1056964608); a1->addChild(a1, v91); v92 = v91->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v178, 0.0, 0.6); v92(v91, &v178); v93 = v91->setPosition; v94 = (int)v87->getPosition(v87); cocos2d::CCPoint::CCPoint(&v177, 16.0, 1.0); cocos2d::CCPoint::operator+(&v178, v94, &v177); v93(v91, &v178); } } v95 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_profileButton_001.png"); v175 = 0; v174 = MenuLayer::onMyProfile; v96 = CCMenuItemSpriteExtra::create( v95, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onMyProfile, (unsigned int)a1)); v97 = v126->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_profileButton = v96; v97->addChild_0(v126, v96, 2); cocos2d::CCPoint::CCPoint(&v145, 45.0, 105.0); m_profileButton = a1->m_profileButton; v99 = m_profileButton->setPosition; cocos2d::CCNode::convertToNodeSpace(&v178, v126, &v145); v99(m_profileButton, &v178); v100 = cocos2d::CCLabelBMFont::create(); v101 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_profileLabel = v100; v101->addChild_0(a1, v100, 2); m_profileLabel = a1->m_profileLabel; v103 = m_profileLabel->setPosition; cocos2d::CCPoint::CCPoint(&v177, 2.0, 36.0); cocos2d::CCPoint::operator+(&v178, &v145, &v177); v103(m_profileLabel, &v178); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_profileLabel, 70.0, 0.7, 0.0); v104 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v104, "0048") && GameManager::sharedState()->m_clickedGarage ) { v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_viewProfileTxt_001.png"); v123 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_viewProfileSprite = v122; v123->addChild_0(a1, v122, 2); m_viewProfileSprite = a1->m_viewProfileSprite; v125 = m_viewProfileSprite->setPosition; cocos2d::CCPoint::CCPoint(&v177, 76.0, -1.0); cocos2d::CCPoint::operator+(&v178, &v145, &v177); v125(m_viewProfileSprite, &v178); } MenuLayer::updateUserProfileButton(a1); GameManager::sharedState()->m_menuLayer = a1; v105 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_dailyRewardBtn_001.png"); v176.y = 0.0; LODWORD(v176.x) = MenuLayer::onDaily; v106 = CCMenuItemSpriteExtra::create( v105, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MenuLayer::onDaily, (unsigned int)a1)); v29->addChild(v29, v106); v107 = v106->setPosition; v108 = cocos2d::CCDirector::sharedDirector(); v109 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v108)); cocos2d::CCPoint::CCPoint(&v177, v109 - 40.0, (float)(v144.height * 0.5) + 20.0); cocos2d::CCNode::convertToNodeSpace(&v178, v29, &v177); v107(v106, &v178); CCMenuItemSpriteExtra::setSizeMult(v106, 1.5); v110 = GameManager::sharedState(); if ( !GameManager::getUGV(v110, "30") ) { a1->m_showingTOS = 1; v111 = cocos2d::CCDelayTime::create(0.01); v177.y = 0.0; LODWORD(v177.x) = MenuLayer::showTOS; v112 = (cocos2d::CCSequence *)v111; v113 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, MenuLayer::showTOS, 0); v114 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v112, v113, 0); cocos2d::CCNode::runAction(a1, v114); } v115 = GameLevelManager::sharedState(); LODWORD(v116) = v115->m_testedNetwork; if ( v115->m_testedNetwork ) { LOBYTE(v138) = v115->m_testedNetwork; } else { v117 = cocos2d::CCDelayTime::create(0.01); v178.y = v116; LODWORD(v178.x) = MenuLayer::firstNetworkTest; v118 = (cocos2d::CCSequence *)v117; v119 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, MenuLayer::firstNetworkTest, LODWORD(v116)); v120 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v118, v119, v116); cocos2d::CCNode::runAction(a1, v120); } } return v138; }
GD Web Decomp Icon

GD Web Decomp

Raw Source