// // LevelInfoLayer::init from 0x1402f7340 to 0x1402f9984 (9796 bytes) // // 2 xrefs: // > LevelInfoLayer::create @ 0x1402f72fd // > @ 0x1406d40d0 // // 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 // // Hidden C++ exception states: #wind=25 bool LevelInfoLayer::init(LevelInfoLayer *a1, GJGameLevel *a2, bool a3) { float v3; // xmm0_4 int v7; // r12d bool result; // al __int64 v9; // rcx cocos2d::CCArray *v10; // rax GJGameLevel *m_level; // rcx __int64 v12; // rdx LoadingCircle *v13; // rax _BOOL8 v14; // rdx _BOOL8 v15; // rdx __int64 v16; // rcx cocos2d::CCDirector *v17; // rax __int64 v18; // rcx cocos2d::CCMenu *v19; // rax __int64 v20; // rcx cocos2d::CCNode *v21; // r15 GJGameLevel *v22; // rcx int v23; // r13d bool m_gauntletLevel; // si struct cocos2d::CCSprite *v25; // rdi cocos2d::CCSprite_vtbl *v26; // rbx const cocos2d::CCPoint *v27; // rax float v28; // xmm0_4 cocos2d::CCSprite_vtbl *v29; // rbx double v30; // xmm0_8 const cocos2d::CCPoint *v31; // rax cocos2d::CCRGBAProtocol *v32; // rdi bool v33; // bl const char *v34; // rsi struct cocos2d::CCSprite *v35; // rdi cocos2d::CCSprite_vtbl *v36; // rbx const cocos2d::CCPoint *v37; // rax cocos2d::CCSprite_vtbl *v38; // rbx __int64 v39; // rcx cocos2d::CCDirector *v40; // rax __int64 v41; // rcx cocos2d::CCDirector *v42; // rax float v43; // xmm0_4 double v44; // xmm0_8 const cocos2d::CCPoint *v45; // rax struct cocos2d::CCSprite *v46; // rdi cocos2d::CCSprite_vtbl *v47; // rbx const cocos2d::CCPoint *v48; // rax cocos2d::CCSprite_vtbl *v49; // rbx __int64 v50; // rcx cocos2d::CCDirector *v51; // rax __int64 v52; // rcx cocos2d::CCDirector *v53; // rax float v54; // xmm0_4 const cocos2d::CCPoint *v55; // rax const char *v56; // rcx struct cocos2d::CCLabelBMFont *v57; // rsi cocos2d::CCLabelBMFont_vtbl *v58; // rbx __int64 v59; // rcx cocos2d::CCDirector *v60; // rax float v61; // xmm0_4 double v62; // xmm0_8 const cocos2d::CCPoint *v63; // rax int v64; // eax int v65; // ebx __int64 v66; // r13 unsigned __int64 v67; // rdi void **v68; // rcx struct cocos2d::CCLabelBMFont *v69; // rdi float v70; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v71; // rbx const cocos2d::CCPoint *v72; // rax float v73; // xmm6_4 double v74; // xmm0_8 __int64 v75; // rax void *v76; // rcx __int64 v77; // r8 cocos2d::CCString *v78; // rax int v79; // r12d void **v80; // rdx cocos2d::CCString *v81; // rax const char *CString; // rbx struct cocos2d::CCLabelBMFont *v83; // rdi CCMenuItemSpriteExtra *v84; // rsi CCMenuItemSpriteExtra_vtbl *v85; // rbx struct cocos2d::CCPoint v86; // rax int v87; // esi float *v88; // rbx double v89; // xmm0_8 double v90; // xmm0_8 int v91; // edx struct cocos2d::CCSprite *v92; // rdi cocos2d::CCSprite_vtbl *v93; // rbx const cocos2d::CCPoint *v94; // rax float v95; // xmm0_4 struct cocos2d::CCSprite *v96; // rdi cocos2d::CCSprite_vtbl *v97; // rbx const cocos2d::CCPoint *v98; // rax float v99; // xmm0_4 cocos2d::CCSprite *v100; // rax CCMenuItemSpriteExtra *v101; // rdi float v102; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v103; // rbx struct cocos2d::CCPoint v104; // rax GJGameLevel *v105; // rdx unsigned __int64 v106; // rbx int v107; // r12d void **v108; // rcx size_t v109; // rdi size_t v110; // r8 __int64 v111; // rax int v112; // ecx char v113; // di GameManager *v114; // rcx struct cocos2d::CCSprite *v115; // rbx float v116; // xmm6_4 double v117; // xmm0_8 void *v118; // rcx GJGameLevel *v119; // r12 __int64 v120; // rcx void **v121; // rcx size_t v122; // rdi size_t v123; // r8 __int64 v124; // rbx _BOOL8 v125; // rdx GameLevelManager *v126; // rcx GJGameLevel *v127; // rax int m_levelVersion; // ebx cocos2d::CCDirector *v129; // rax __int64 v130; // rcx cocos2d::CCDirector *v131; // rax float v132; // xmm0_4 struct cocos2d::CCSprite *v133; // rax CCMenuItemSpriteExtra *v134; // rbx struct cocos2d::CCSprite *v135; // rax CCMenuItemSpriteExtra *v136; // rbx struct cocos2d::CCSprite *v137; // rax CCMenuItemSpriteExtra *v138; // rdi struct cocos2d::CCSprite *v139; // rax CCMenuItemSpriteExtra *v140; // rsi float v141; // xmm0_4 __int64 v142; // rax struct cocos2d::CCSprite *v143; // rax CCMenuItemSpriteExtra *v144; // rax float v145; // xmm0_4 __int64 v146; // rax struct cocos2d::CCSprite *v147; // rax CCMenuItemSpriteExtra *v148; // rax float v149; // xmm0_4 const cocos2d::CCPoint *v150; // rax __int64 v151; // rax int v152; // ecx unsigned __int64 v153; // rdi _BYTE *v154; // rbx unsigned __int64 v155; // rcx _WORD *v156; // rbx void *v157; // rcx void **v158; // rcx struct cocos2d::CCSprite *v159; // rax CCMenuItemSpriteExtra *v160; // rax float v161; // xmm0_4 const cocos2d::CCPoint *v162; // rax void *v163; // rcx __int64 v164; // rax cocos2d::CCDirector *v165; // rax float v166; // xmm0_4 struct cocos2d::CCPoint v167; // rax _DWORD *v168; // rdx int v169; // eax struct cocos2d::CCSprite *v170; // rax CCMenuItemSpriteExtra *v171; // rbx float v172; // xmm0_4 __int64 v173; // rax GJAccountManager *v174; // rax GJAccountManager *v175; // rax char v176; // di __int64 v177; // rcx struct cocos2d::CCSprite *v178; // rax CCMenuItemSpriteExtra *v179; // rbx float v180; // xmm0_4 __int64 v181; // rax const char *v182; // rcx struct cocos2d::CCSprite *v183; // rax CCMenuItemSpriteExtra *v184; // rax float v185; // xmm0_4 const cocos2d::CCPoint *v186; // rax _BOOL8 v187; // rdx CCMenuItemSpriteExtra *m_cloneBtn; // rcx CCMenuItemSpriteExtra_vtbl *v189; // rbx bool v190; // al struct cocos2d::CCSprite *v191; // rax CCMenuItemSpriteExtra *v192; // rbx float v193; // xmm0_4 __int64 v194; // rax struct cocos2d::CCSprite *v195; // rax CCMenuItemSpriteExtra *v196; // rax struct cocos2d::CCMenu *v197; // rdi cocos2d::CCMenu_vtbl *v198; // rbx __int64 v199; // rcx cocos2d::CCDirector *v200; // rax __int64 v201; // rcx cocos2d::CCDirector *v202; // rax float v203; // xmm0_4 const cocos2d::CCPoint *v204; // rax GJGameLevel *v205; // rax __int64 v206; // rcx GameStatsManager *v207; // rcx GameStatsManager *v208; // rcx GJGameLevel *v209; // rax GameStatsManager *v210; // rcx GJGameLevel *v211; // rsi struct cocos2d::CCSprite *v212; // rax CCMenuItemSpriteExtra *v213; // rax GJGameLevel_vtbl *v214; // rbx __int64 v215; // rcx cocos2d::CCDirector *v216; // rax __int64 v217; // rcx cocos2d::CCDirector *v218; // rax float v219; // xmm0_4 const cocos2d::CCPoint *v220; // rax __int64 v221; // rcx __int64 v222; // rdi float v223; // xmm0_4 __int64 v224; // rbx __int64 v225; // rax struct cocos2d::CCSprite *v226; // rax CCMenuItemSpriteExtra *v227; // rbx __int64 v228; // rax __int64 v229; // rax double v230; // xmm0_8 __int64 v231; // rax const char *v232; // rcx struct cocos2d::CCSprite *v233; // rax CCMenuItemSpriteExtra *v234; // r13 float v235; // xmm0_4 __int64 v236; // rax CCMenuItemSpriteExtra_vtbl *v237; // rbx struct cocos2d::CCPoint v238; // rax struct cocos2d::CCSprite *v239; // rbx CCMenuItemSpriteExtra *v240; // r15 float v241; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v242; // rbx struct cocos2d::CCPoint v243; // rax cocos2d::CCSprite *v244; // rbx CCMenuItemSpriteExtra *v245; // rdi float v246; // xmm0_4 __int64 v247; // rax GJGameLevel *v248; // rcx int m_songID; // eax SongInfoObject *SongObject; // rdi bool v251; // al CustomSongWidget *v252; // rax CustomSongWidget_vtbl *v253; // rbx __int64 v254; // rcx cocos2d::CCDirector *v255; // rax float v256; // xmm0_4 const cocos2d::CCPoint *v257; // rax __int64 *v258; // rbx __int64 *v259; // rax __int64 v260; // rcx cocos2d::CCNode *v261; // rsi cocos2d::CCNode_vtbl *v262; // rbx __int64 v263; // rcx cocos2d::CCDirector *v264; // rax __int64 v265; // rcx cocos2d::CCDirector *v266; // rax float v267; // xmm0_4 const cocos2d::CCPoint *v268; // rax struct cocos2d::CCSprite *v269; // rbx CCMenuItemSpriteExtra *v270; // rdi float v271; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v272; // rbx double v273; // xmm0_8 struct cocos2d::CCPoint v274; // rax struct cocos2d::CCSprite *v275; // rdi cocos2d::CCString *v276; // rax const char *v277; // rax cocos2d::CCLabelBMFont *v278; // rax cocos2d::CCLabelBMFont_vtbl *v279; // rbx float *v280; // rax const cocos2d::CCPoint *v281; // rax CCMenuItemSpriteExtra *v282; // rdi GJGameLevel *v283; // rsi float v284; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v285; // rbx struct cocos2d::CCPoint v286; // rax struct cocos2d::CCSprite *v287; // rbx CCMenuItemSpriteExtra *v288; // rsi float v289; // xmm0_4 __int64 v290; // rax double v291; // xmm0_8 __int64 v292; // rdx __int64 v293; // rcx CCMenuItemSpriteExtra *v294; // rbx struct cocos2d::CCSprite *v295; // rdi cocos2d::CCSprite_vtbl *v296; // rbx const cocos2d::CCSize *v297; // rax const cocos2d::CCPoint *v298; // rax GJGameLevel *v299; // rcx bool m_savedTime; // dl GameLevelManager *v301; // rcx GameLevelManager *v302; // rcx __int64 v303; // rax __int64 v304; // [rsp+58h] [rbp-B0h] BYREF struct cocos2d::CCPoint v305; // [rsp+60h] [rbp-A8h] BYREF GJGameLevel *v306; // [rsp+68h] [rbp-A0h] BYREF CCMenuItemSpriteExtra *v307; // [rsp+70h] [rbp-98h] BYREF bool v308; // [rsp+78h] [rbp-90h] cocos2d::CCPoint v309; // [rsp+80h] [rbp-88h] BYREF float v310; // [rsp+88h] [rbp-80h] CCMenuItemSpriteExtra *v311; // [rsp+90h] [rbp-78h] void **v312; // [rsp+98h] [rbp-70h] BYREF CCMenuItemSpriteExtra *v313; // [rsp+A0h] [rbp-68h] BYREF char v314[8]; // [rsp+A8h] [rbp-60h] BYREF struct cocos2d::CCPoint v315; // [rsp+B0h] [rbp-58h] BYREF float v316; // [rsp+B8h] [rbp-50h] BYREF void *v317; // [rsp+C0h] [rbp-48h] char v318[8]; // [rsp+C8h] [rbp-40h] BYREF struct cocos2d::CCPoint v319; // [rsp+D0h] [rbp-38h] BYREF void *Block[2]; // [rsp+E8h] [rbp-20h] BYREF __int64 v321; // [rsp+F8h] [rbp-10h] unsigned __int64 v322; // [rsp+100h] [rbp-8h] void *Buf1[2]; // [rsp+108h] [rbp+0h] BYREF size_t v324; // [rsp+118h] [rbp+10h] unsigned __int64 v325; // [rsp+120h] [rbp+18h] v306 = a2; v7 = 0; LODWORD(v311) = 0; result = cocos2d::CCLayer::init(a1); if ( !result ) return result; a1->m_level = a2; cocos2d::CCObject::retain(a2); a1->m_challenge = a3; v10 = (cocos2d::CCArray *)cocos2d::CCArray::create(v9); a1->m_coins = v10; cocos2d::CCObject::retain(v10); a1->m_level->m_levelNotDownloaded = 0; a1->m_levelType = a2->m_levelType; m_level = a1->m_level; if ( m_level->m_dailyID.random - m_level->m_dailyID.seed <= 0 && !m_level->m_gauntletLevel ) { v12 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v307 = (CCMenuItemSpriteExtra *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v307); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v12 = qword_1406C2ED8; } *(_DWORD *)(v12 + 948) = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed; } v13 = LoadingCircle::create(); a1->m_circle = v13; v13->m_parentLayer = a1; a1->m_circle->m_fade = 0; cocos2d::CCObject::retain(a1->m_circle); LoadingCircle::show(a1->m_circle); a1->m_circle->setVisible(a1->m_circle, 0); LOBYTE(v14) = 1; a1->setKeypadEnabled(a1, v14); LOBYTE(v15) = 1; a1->setKeyboardEnabled(a1, v15); v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16); cocos2d::CCDirector::getWinSize(v17); v19 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v18); a1->m_playBtnMenu = v19; a1->addChild_0(a1, v19, 3); v21 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v20); a1->addChild_0(a1, v21, 2); v22 = a1->m_level; LODWORD(v313) = v22->m_dailyID.random - v22->m_dailyID.seed; v23 = a2->m_dailyID.random - a2->m_dailyID.seed; LODWORD(v307) = v23; v308 = (unsigned int)(v23 - 100001) <= 0x1869F; m_gauntletLevel = v22->m_gauntletLevel; v25 = cocos2d::CCSprite::create("GJ_gradientBG.png"); v26 = v25->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v3, 0.0); v26->setAnchorPoint(v25, v27); a1->addChild_0(a1, v25, -2); ((void (__fastcall *)(struct cocos2d::CCSprite *))v25->setScaleX)(v25); v28 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v25->setScaleY)(v25); v29 = v25->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v30 = cocos2d::CCPoint::CCPoint(v28, -5.0); v29->setPosition_0(v25, v31); LOWORD(v304) = 26112; BYTE2(v304) = -1; v32 = &v25->cocos2d::CCRGBAProtocol; v32->setColor(v32, (const cocos2d::ccColor3B *)&v304); v33 = m_gauntletLevel || v308 || a1->m_challenge; if ( v23 <= 200000 ) { if ( !v33 ) goto LABEL_17; memset(&v304, 51, 3); } else { LOWORD(v304) = 6243; BYTE2(v304) = 126; } v32->setColor(v32, (const cocos2d::ccColor3B *)&v304); LABEL_17: v34 = "GJ_sideArt_001.png"; if ( v33 ) v34 = "gauntletCorner_001.png"; v35 = cocos2d::CCSprite::createWithSpriteFrameName(v34); v36 = v35->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v30, 0.0); v36->setAnchorPoint(v35, v37); v38 = v35->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v40 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v39); cocos2d::CCDirector::getScreenBottom(v40); v42 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v41); v43 = cocos2d::CCDirector::getScreenLeft(v42) - 1.0; v44 = cocos2d::CCPoint::CCPoint(v43, v43); v38->setPosition_0(v35, v45); a1->addChild_0(a1, v35, 1); v46 = cocos2d::CCSprite::createWithSpriteFrameName(v34); v47 = v46->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v44, 1.0); v47->setAnchorPoint(v46, v48); v49 = v46->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v51 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50); cocos2d::CCDirector::getScreenBottom(v51); v53 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v52); v54 = cocos2d::CCDirector::getScreenRight(v53) + 1.0; cocos2d::CCPoint::CCPoint(v54, v54); v49->setPosition_0(v46, v55); cocos2d::CCSprite::setFlipX(v46, 1); a1->addChild_0(a1, v46, 1); if ( a1->m_challenge ) { v56 = "Challenge"; } else { sub_14003BDB0((__int64)Buf1, (__int64)&a1->m_level->m_levelName); v7 = 17; LODWORD(v311) = 17; v56 = (const char *)Buf1; if ( v325 > 0xF ) v56 = (const char *)Buf1[0]; } v57 = cocos2d::CCLabelBMFont::create(v56, (const char *)&qword_14052A4D8); if ( (v7 & 1) != 0 ) { v7 &= ~1u; sub_14003A830((__int64)Buf1); } a1->addChild_0(a1, v57, 20); v58 = v57->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v60 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v59); v61 = cocos2d::CCDirector::getScreenTop(v60) - 17.0; v62 = cocos2d::CCPoint::CCPoint(v61, v310 * 0.5); v58->setPosition_0(v57, v63); v64 = 300; v65 = (int)v313; if ( (int)v313 > 0 ) v64 = 260; cocos2d::CCLabelBMFont::limitLabelWidth(v57, (float)v64, 0.80000001, 0.0); v66 = 0x7FFFFFFFFFFFFFFFLL; if ( v65 > 0 ) { Block[1] = nullptr; v321 = 7; v67 = 15; v322 = 15; Block[0] = (void *)0x29796C69614428LL; if ( v308 ) { v321 = 8; strcpy((char *)Block, "(Weekly)"); } else { if ( (int)v307 <= 200000 ) { LABEL_33: v68 = Block; if ( v67 > 0xF ) v68 = (void **)Block[0]; v69 = cocos2d::CCLabelBMFont::create((const char *)v68, "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v69->setScale_0)(v69); v70 = ((float (__fastcall *)(LevelInfoLayer *, struct cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)( a1, v69, 20); v71 = v69->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v70, 0.0); v71->setAnchorPoint(v69, v72); v73 = v57->getContentSize(v57)->width * 0.5; v74 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v57->getScale)(v57); cocos2d::CCPoint::CCPoint((float)(*(float *)&v74 * v73) + 3.0, (float)(*(float *)&v74 * v73) + 3.0); v75 = (__int64)v57->getPosition_0(v57); v62 = cocos2d::CCPoint::operator+(v75, &v307); v69->setPosition_0(v69, (const cocos2d::CCPoint *)&v307); if ( v322 > 0xF ) { v76 = Block[0]; if ( v322 + 1 >= 0x1000 ) { v76 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v76 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v76); } v321 = 0; v322 = 15; LOBYTE(Block[0]) = 0; goto LABEL_41; } v321 = 7; memmove(Block, "(Event)", 7u); HIBYTE(Block[0]) = 0; } v67 = v322; goto LABEL_33; } LABEL_41: LODWORD(v311) = a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed; if ( !(_DWORD)v311 ) { v77 = qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v313 = (CCMenuItemSpriteExtra *)operator new(0x3D0u); qword_1406C2EC0 = sub_140141280((__int64)v313); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v77 = qword_1406C2EC0; } v78 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey( *(cocos2d::CCDictionary **)(v77 + 536), a1->m_level->m_userID.random - a1->m_level->m_userID.seed); LODWORD(v311) = cocos2d::CCString::intValue(v78); } sub_14003BDB0((__int64)Block, (__int64)&a1->m_level->m_creatorName); v79 = v7 | 8; v80 = Block; if ( v322 > 0xF ) v80 = (void **)Block[0]; v81 = cocos2d::CCString::createWithFormat("By %s", (const char *)v80); CString = cocos2d::CCString::getCString(v81); sub_14003A830((__int64)Block); v83 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); v57->getPosition_0(v57); cocos2d::CCPoint::CCPoint(*(float *)&v62, v310 * 0.5); cocos2d::CCLabelBMFont::limitLabelWidth(v83, 300.0, 0.80000001, 0.0); v84 = CCMenuItemSpriteExtra::create(v83, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onViewProfile); v307 = v84; v21->addChild_1(v21, v84); v85 = v84->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v86 = cocos2d::CCNode::convertToNodeSpace(v21, &v305); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v85->setPosition_0)(v84, v86); v87 = (int)v311; if ( !(_DWORD)v311 ) { LOWORD(v304) = -166; BYTE2(v304) = -1; v83->setColor(&v83->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v304); v307->setEnabled(v307, 0); } v88 = (float *)v83->getContentSize(v83); v89 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v83->getScale)(v83); *(float *)&v89 = (float)((float)((float)(*(float *)&v89 * *v88) * 0.5) + v316) + 6.0; v90 = cocos2d::CCPoint::CCPoint(*(float *)&v89, *(float *)&v89); if ( a1->m_challenge ) { v83->setVisible(v83, 0); v90 = cocos2d::CCPoint::operator=(v314, &v316); } v91 = a1->m_level->m_objectCount.random - a1->m_level->m_objectCount.seed; LODWORD(v307) = v91; if ( v306->m_originalLevel.random != v306->m_originalLevel.seed ) { v92 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png"); v93 = v92->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v90, 0.0); v93->setAnchorPoint(v92, v94); a1->addChild_1(a1, v92); v95 = ((float (__fastcall *)(struct cocos2d::CCSprite *, char *))v92->setPosition_0)(v92, v314); cocos2d::CCPoint::CCPoint(v95, 18.0); cocos2d::CCPoint::operator+(v314, &v313); v90 = cocos2d::CCPoint::operator=(v314, &v313); if ( (int)v307 <= 40000 ) goto LABEL_54; goto LABEL_53; } if ( v91 > 40000 ) { LABEL_53: v96 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png"); v97 = v96->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v90, 0.0); v97->setAnchorPoint(v96, v98); a1->addChild_0(a1, v96, 10); v99 = ((float (__fastcall *)(struct cocos2d::CCSprite *, char *))v96->setPosition_0)(v96, v314); cocos2d::CCPoint::CCPoint(v99, 18.0); cocos2d::CCPoint::operator+(v314, &v307); cocos2d::CCPoint::operator=(v314, &v307); goto LABEL_54; } if ( v87 > 0 ) { v114 = (GameManager *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v305 = (struct cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v114 = (GameManager *)qword_1406C2ED8; } if ( !GameManager::getGameVariable(v114, "0047") && !a1->m_challenge ) { v115 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_viewProfileTxt_001.png"); a1->addChild_0(a1, v115, 2); v116 = v83->getContentSize(v83)->width * 0.5; v117 = ((double (__fastcall *)(struct cocos2d::CCLabelBMFont *))v83->getScale)(v83); cocos2d::CCPoint::CCPoint((float)(*(float *)&v117 * v116) + 48.0, (float)(*(float *)&v117 * v116) + 48.0); cocos2d::CCPoint::operator+(&v316, &v307); v115->setPosition_0(v115, (const cocos2d::CCPoint *)&v307); } } LABEL_54: v100 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); a1->m_playSprite = v100; v101 = CCMenuItemSpriteExtra::create(v100, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onPlay); v102 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_playBtnMenu->addChild_1)( a1->m_playBtnMenu, v101); cocos2d::CCPoint::CCPoint(v102, v310 * 0.5); v103 = v101->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v104 = cocos2d::CCNode::convertToNodeSpace(a1->m_playBtnMenu, &v305); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v103->setPosition_0)(v101, v104); a1->m_circle->m_sprite->setPosition_0(a1->m_circle->m_sprite, (const cocos2d::CCPoint *)v318); v105 = a1->m_level; if ( v105->m_levelType == SearchResult ) { v106 = v322; } else { *(_OWORD *)Block = 0; v321 = 0; v106 = 15; v322 = 15; LOBYTE(Block[0]) = 0; v107 = v79 | 2; LODWORD(v311) = v107; sub_14003BDB0((__int64)Buf1, (__int64)&v105->m_levelString); v79 = v107 | 0x24; LODWORD(v311) = v79; v108 = Buf1; if ( v325 > 0xF ) v108 = (void **)Buf1[0]; v109 = v324; v110 = v324; if ( v324 ) v110 = 0; if ( memcmp(v108, Block, v110) || v109 ) goto LABEL_65; v111 = qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v305 = (struct cocos2d::CCPoint)operator new(0x3D0u); qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v111 = qword_1406C2EC0; } v112 = *(_DWORD *)(v111 + 904); if ( v112 == 99 || v112 == 100 ) { LABEL_65: v113 = 0; goto LABEL_75; } } v113 = 1; LABEL_75: if ( (v79 & 4) != 0 ) { LOBYTE(v79) = v79 & 0xFB; sub_14003A830((__int64)Buf1); } if ( (v79 & 2) != 0 && v106 > 0xF ) { v118 = Block[0]; if ( v106 + 1 >= 0x1000 ) { v118 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v118 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v118); } if ( v113 ) { LevelInfoLayer::downloadLevel(a1); LABEL_85: v119 = v306; goto LABEL_86; } *(_OWORD *)Block = 0; v321 = 0; v322 = 15; LOBYTE(Block[0]) = 0; sub_14003BDB0((__int64)Buf1, (__int64)&a1->m_level->m_levelString); v121 = Buf1; if ( v325 > 0xF ) v121 = (void **)Buf1[0]; v122 = v324; v123 = v324; if ( v324 ) v123 = 0; LODWORD(v124) = memcmp(v121, Block, v123); if ( !(_DWORD)v124 ) v124 = v122 != 0; sub_14003A830((__int64)Buf1); if ( (_DWORD)v124 ) goto LABEL_85; a1->m_noUpdateAlert = 1; a1->m_playBtnMenu->setVisible(a1->m_playBtnMenu, 0); LOBYTE(v125) = 1; a1->m_circle->setVisible(a1->m_circle, v125); v126 = (GameLevelManager *)qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v305 = (struct cocos2d::CCPoint)operator new(0x3D0u); qword_1406C2EC0 = sub_140141280(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v126 = (GameLevelManager *)qword_1406C2EC0; } v126->m_levelUpdateDelegate = &a1->LevelUpdateDelegate; v127 = a1->m_level; m_levelVersion = v127->m_levelVersion; v127->m_levelVersion = -1; GameLevelManager::updateLevel(v126, a1->m_level); v119 = v306; v306->m_levelVersion = m_levelVersion; LABEL_86: LevelInfoLayer::setupLevelInfo(a1); if ( !a1->m_challenge ) { if ( a1->m_level->m_levelLength == 5 ) LevelInfoLayer::setupPlatformerStats(a1); else LevelInfoLayer::setupProgressBars(a1); } v129 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v120); cocos2d::CCDirector::getScreenTop(v129); v131 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v130); v132 = (float)(cocos2d::CCDirector::getScreenRight(v131) - 30.0) - 0.0; cocos2d::CCPoint::CCPoint(v132, v132); cocos2d::CCNode::convertToNodeSpace(v21, &v315); if ( a1->m_level->m_dailyID.random - a1->m_level->m_dailyID.seed <= 0 ) { v133 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); v134 = CCMenuItemSpriteExtra::create(v133, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::confirmDelete); v21->addChild_1(v21, v134); v134->setPosition_0(v134, &v315); v315.y = v315.y + -50.0; } v135 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v136 = CCMenuItemSpriteExtra::create(v135, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onUpdate); v21->addChild_1(v21, v136); v136->setPosition_0(v136, &v315); v315.y = v315.y + -50.0; v137 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoBtn_001.png"); v138 = CCMenuItemSpriteExtra::create(v137, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onInfo); v21->addChild_1(v21, v138); v138->setPosition_0(v138, &v315); v139 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png"); v140 = CCMenuItemSpriteExtra::create( v139, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onLevelLeaderboard); v141 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v140); cocos2d::CCPoint::CCPoint(v141, 0.0); v142 = (__int64)v138->getPosition_0(v138); cocos2d::CCPoint::operator+(v142, &v306); v140->setPosition_0(v140, (const cocos2d::CCPoint *)&v306); v143 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_like2Btn_001.png"); v144 = CCMenuItemSpriteExtra::create(v143, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onLike); a1->m_likeBtn = v144; v145 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v144); cocos2d::CCPoint::CCPoint(v145, 0.0); v146 = (__int64)v140->getPosition_0(v140); cocos2d::CCPoint::operator+(v146, &v306); a1->m_likeBtn->setPosition_0(a1->m_likeBtn, (const cocos2d::CCPoint *)&v306); a1->m_likeBtn->getPosition_0(a1->m_likeBtn); cocos2d::CCPoint::CCPoint(&v309); if ( a1->m_level->m_stars.random == a1->m_level->m_stars.seed ) { v147 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starBtn_001.png"); v148 = CCMenuItemSpriteExtra::create(v147, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onRateStars); a1->m_starRateBtn = v148; v149 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v148); cocos2d::CCPoint::CCPoint(v149, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); a1->m_starRateBtn->setPosition_0(a1->m_starRateBtn, (const cocos2d::CCPoint *)&v306); v150 = a1->m_starRateBtn->getPosition_0(a1->m_starRateBtn); cocos2d::CCPoint::operator=(&v309, v150); } if ( a1->m_level->m_demon.random - a1->m_level->m_demon.seed == 1 ) { *(_OWORD *)Block = 0; v321 = 0; v322 = 15; Block[0] = sub_14003AA10(0x20u); v321 = 22; v322 = 31; strcpy((char *)Block[0], "GJ_rateDiffBtn_001.png"); v151 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v305 = (struct cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v151 = qword_1406C2ED8; } v152 = *(_DWORD *)(v151 + 1012) - *(_DWORD *)(v151 + 1016); if ( v152 == 1 || v152 == 2 || *(_BYTE *)(v151 + 1024) ) { v153 = v322; if ( v322 < 0x19 ) { v155 = v322 >> 1; if ( v322 <= 0x7FFFFFFFFFFFFFFFLL - (v322 >> 1) ) { v66 = 31; if ( v322 + v155 > 0x1F ) v66 = v322 + v155; } v156 = sub_14003AA10(v66 + 1); v321 = 25; v322 = v66; qmemcpy(v156, "GJ_rateDiffBtnMod_001.pn", 24); v156[12] = (unsigned __int8)aGjRatediffbtnm[24]; if ( v153 > 0xF ) { v157 = Block[0]; if ( v153 + 1 >= 0x1000 ) { v157 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v157 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v157); } Block[0] = v156; } else { v154 = Block[0]; v321 = 25; memmove(Block[0], "GJ_rateDiffBtnMod_001.png", 0x19u); v154[25] = 0; } } v158 = Block; if ( v322 > 0xF ) v158 = (void **)Block[0]; v159 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v158); v160 = CCMenuItemSpriteExtra::create(v159, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onRateDemon); a1->m_demonRateBtn = v160; v161 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v160); cocos2d::CCPoint::CCPoint(v161, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); a1->m_demonRateBtn->setPosition_0(a1->m_demonRateBtn, (const cocos2d::CCPoint *)&v306); v162 = a1->m_demonRateBtn->getPosition_0(a1->m_demonRateBtn); cocos2d::CCPoint::operator=(&v309, v162); if ( v322 > 0xF ) { v163 = Block[0]; if ( v322 + 1 >= 0x1000 ) { v163 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v163 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v163); } } if ( a1->m_challenge ) v21->setVisible(v21, 0); LevelInfoLayer::updateSideButtons(a1); v164 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v305 = (struct cocos2d::CCPoint)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v164 = qword_1406C2ED8; } v165 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((unsigned int)(*(_DWORD *)(v164 + 1012) - *(_DWORD *)(v164 + 1016))); v166 = (float)(cocos2d::CCDirector::getScreenLeft(v165) + 30.0) + 0.0; cocos2d::CCPoint::CCPoint(v166, v166); v167 = cocos2d::CCNode::convertToNodeSpace(v21, &v305); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v309, v167); v168 = (_DWORD *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v306 = (GJGameLevel *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v306); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v168 = (_DWORD *)qword_1406C2ED8; } v169 = v168[253] - v168[254]; if ( v169 == 1 || v169 == 2 ) { v170 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starBtnMod_001.png"); v171 = CCMenuItemSpriteExtra::create(v170, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onRateStarsMod); v172 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v171); cocos2d::CCPoint::CCPoint(v172, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); v171->setPosition_0(v171, (const cocos2d::CCPoint *)&v306); v173 = (__int64)v171->getPosition_0(v171); cocos2d::CCPoint::operator=(&v309, v173); v168 = (_DWORD *)qword_1406C2ED8; } if ( !v168 ) { v306 = (GJGameLevel *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v306); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v168 = (_DWORD *)qword_1406C2ED8; } if ( v168[163] - v168[164] == a1->m_level->m_userID.random - a1->m_level->m_userID.seed || (v174 = GJAccountManager::sharedState(), v174->m_accountID != v174->m_unkInt1) && (v175 = GJAccountManager::sharedState(), v175->m_accountID - v175->m_unkInt1 == a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed) ) { v176 = 1; } else { v176 = 0; v177 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v306 = (GJGameLevel *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v306); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v177 = qword_1406C2ED8; } if ( *(_DWORD *)(v177 + 1012) - *(_DWORD *)(v177 + 1016) <= 1 ) goto LABEL_149; } v178 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteServerBtn_001.png"); v179 = CCMenuItemSpriteExtra::create( v178, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::confirmOwnerDelete); v180 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v179); cocos2d::CCPoint::CCPoint(v180, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); v179->setPosition_0(v179, (const cocos2d::CCPoint *)&v306); v181 = (__int64)v179->getPosition_0(v179); cocos2d::CCPoint::operator=(&v309, v181); if ( v176 ) goto LABEL_155; v177 = qword_1406C2ED8; LABEL_149: if ( !v177 ) { v306 = (GJGameLevel *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v306); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v177 = qword_1406C2ED8; } if ( *(_DWORD *)(v177 + 1012) - *(_DWORD *)(v177 + 1016) <= 0 ) { v182 = "GJ_duplicateLockedBtn_001.png"; if ( v119->m_password.random - v119->m_password.seed == 1 ) v182 = "GJ_duplicateBtn_001.png"; v183 = cocos2d::CCSprite::createWithSpriteFrameName(v182); v184 = CCMenuItemSpriteExtra::create(v183, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::tryCloneLevel); a1->m_cloneBtn = v184; v185 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v184); cocos2d::CCPoint::CCPoint(v185, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); a1->m_cloneBtn->setPosition_0(a1->m_cloneBtn, (const cocos2d::CCPoint *)&v306); v186 = a1->m_cloneBtn->getPosition_0(a1->m_cloneBtn); cocos2d::CCPoint::operator=(&v309, v186); LOBYTE(v187) = a1->m_level->m_password.random != a1->m_level->m_password.seed; a1->m_cloneBtn->setVisible(a1->m_cloneBtn, v187); m_cloneBtn = a1->m_cloneBtn; v189 = m_cloneBtn->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v190 = m_cloneBtn->isVisible(m_cloneBtn); v189->setEnabled(a1->m_cloneBtn, v190); goto LABEL_156; } LABEL_155: v191 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png"); v192 = CCMenuItemSpriteExtra::create(v191, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::confirmClone); v193 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v21->addChild_1)(v21, v192); cocos2d::CCPoint::CCPoint(v193, 0.0); cocos2d::CCPoint::operator+(&v309, &v306); v192->setPosition_0(v192, (const cocos2d::CCPoint *)&v306); v194 = (__int64)v192->getPosition_0(v192); cocos2d::CCPoint::operator=(&v309, v194); LABEL_156: v195 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v196 = CCMenuItemSpriteExtra::create(v195, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onBack); v311 = v196; HIDWORD(v196->m_pfnSelector.adj) = 1070386381; v197 = cocos2d::CCMenu::create(v196, 0); a1->addChild_0(a1, v197, 1); v198 = v197->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v200 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v199); cocos2d::CCDirector::getScreenTop(v200); v202 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v201); v203 = cocos2d::CCDirector::getScreenLeft(v202) + 24.0; cocos2d::CCPoint::CCPoint(v203, v203); v198->setPosition_0(v197, v204); v205 = a1->m_level; v206 = (unsigned int)(v205->m_dailyID.random - v205->m_dailyID.seed); if ( v205->m_dailyID.random - v205->m_dailyID.seed <= 0 ) { v207 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v306 = (GJGameLevel *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v306); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v207 = (GameStatsManager *)qword_1406C2EE8; } if ( GameStatsManager::hasCompletedLevel(v207, a1->m_level) ) { if ( a1->m_level->m_demon.random - a1->m_level->m_demon.seed == 1 ) { v208 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v305 = (struct cocos2d::CCPoint)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v208 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedDemonLevel(v208, a1->m_level); } v209 = a1->m_level; v206 = (unsigned int)(v209->m_stars.random - v209->m_stars.seed); if ( v209->m_stars.random - v209->m_stars.seed > 0 ) { v210 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v305 = (struct cocos2d::CCPoint)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0(*(_QWORD *)&v305); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v210 = (GameStatsManager *)qword_1406C2EE8; } GameStatsManager::completedStarLevel(v210, a1->m_level); } } } v211 = (GJGameLevel *)cocos2d::CCMenu::create(v206); v306 = v211; v212 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v213 = CCMenuItemSpriteExtra::create(v212, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onLevelInfo); HIDWORD(v213->m_pfnSelector.adj) = 1067030938; v211->addChild_1(v211, v213); v214 = v211->__vftable; v216 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v215); cocos2d::CCDirector::getScreenBottom(v216); v218 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v217); v219 = cocos2d::CCDirector::getScreenLeft(v218) + 30.0; cocos2d::CCPoint::CCPoint(v219, v219); v214->setPosition_0(v211, v220); a1->addChild_0(a1, v211, 2); v222 = cocos2d::CCMenu::create(v221); v223 = ((float (__fastcall *)(LevelInfoLayer *, __int64, __int64))a1->addChild_0)(a1, v222, 21); v224 = *(_QWORD *)v222; cocos2d::CCPoint::CCPoint(v223, (float)(v310 - 85.0) - 0.0); (*(void (__fastcall **)(__int64, __int64))(v224 + 184))(v222, v225); v226 = cocos2d::CCSprite::createWithSpriteFrameName("garageRope_001.png"); v227 = CCMenuItemSpriteExtra::create(v226, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onGarage); HIDWORD(v227->m_pfnSelector.adj) = 1067030938; v228 = (__int64)v227->getNormalImage(v227); v229 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v228 + 200LL))(v228); v230 = cocos2d::CCPoint::operator=(&v227->m_unselectedDuration, v229); LODWORD(v227->m_duration) = 1; cocos2d::CCPoint::CCPoint(*(float *)&v230, 0.0); cocos2d::CCPoint::operator=((char *)&v227->m_selectSound.m_data.m_capacity + 4, v231); v227->m_offset.x = 0.2; v227->m_offset.y = 0.2; (*(void (__fastcall **)(__int64, CCMenuItemSpriteExtra *))(*(_QWORD *)v222 + 448LL))(v222, v227); v232 = "gj_heartOff_001.png"; if ( a1->m_level->m_levelFavorited ) v232 = "gj_heartOn_001.png"; v233 = cocos2d::CCSprite::createWithSpriteFrameName(v232); v234 = CCMenuItemSpriteExtra::create(v233, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onFavorite); HIDWORD(v234->m_pfnSelector.adj) = 1066192077; v235 = ((float (__fastcall *)(GJGameLevel *, CCMenuItemSpriteExtra *, __int64))v211->addChild_0)(v211, v234, 100); cocos2d::CCPoint::CCPoint(v235, 38.0); v236 = (__int64)v211->getPosition_0(v211); cocos2d::CCPoint::operator+(v236, &v307); v237 = v234->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v238 = cocos2d::CCNode::convertToNodeSpace(v211, &v305); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v237->setPosition_0)(v234, v238); v239 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v239->setScale_0)(v239); ((void (__fastcall *)(struct cocos2d::CCSprite *))v239->setRotation)(v239); v240 = CCMenuItemSpriteExtra::create(v239, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::confirmMoveToTop); HIDWORD(v240->m_pfnSelector.adj) = 1066192077; v241 = ((float (__fastcall *)(GJGameLevel *, CCMenuItemSpriteExtra *, __int64))v211->addChild_0)(v211, v240, 100); v242 = v240->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v241, (float)(v310 - 73.0) - 0.0); v243 = cocos2d::CCNode::convertToNodeSpace(v211, &v319); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v242->setPosition_0)(v240, v243); v244 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *))v244->setScale_0)(v244); cocos2d::CCSprite::setFlipY(v244, 1); ((void (__fastcall *)(cocos2d::CCSprite *))v244->setRotation)(v244); v245 = CCMenuItemSpriteExtra::create( v244, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::confirmMoveToBottom); v313 = v245; HIDWORD(v245->m_pfnSelector.adj) = 1066192077; v246 = ((float (__fastcall *)(GJGameLevel *, CCMenuItemSpriteExtra *, __int64))v211->addChild_0)(v211, v245, 100); cocos2d::CCPoint::CCPoint(v246, 0.0); v247 = (__int64)v240->getPosition_0(v240); cocos2d::CCPoint::operator+(v247, &v307); v245->setPosition_0(v245, (const cocos2d::CCPoint *)&v307); if ( a1->m_challenge ) v211->setVisible(v211, 0); v248 = a1->m_level; m_songID = v248->m_songID; if ( m_songID ) { SongObject = SongInfoObject::create_1(m_songID); v251 = 0; } else { SongObject = LevelTools::getSongObject(v248->m_audioTrack); v251 = 1; } v252 = CustomSongWidget::create(SongObject, nullptr, 0, 0, 1, v251, 0, 0, 0); a1->m_songWidget = v252; a1->addChild_1(a1, v252); v253 = a1->m_songWidget->__vftable; v255 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v254); v256 = cocos2d::CCDirector::getScreenBottom(v255) + 45.0; cocos2d::CCPoint::CCPoint(v256, v310 * 0.5); v253->setPosition_0(a1->m_songWidget, v257); if ( SongObject->m_unloaded ) CustomSongWidget::onGetSongInfo(a1->m_songWidget, nullptr); v312 = Buf1; v258 = (__int64 *)sub_14003BDB0((__int64)Buf1, (__int64)&a1->m_level->m_sfxIDs); v259 = (__int64 *)sub_14003BDB0((__int64)Block, (__int64)&a1->m_level->m_songIDs); CustomSongWidget::updateWithMultiAssets(a1->m_songWidget, v259, v258, a1->m_level->m_songSize); v261 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v260); v262 = v261->__vftable; v264 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v263); cocos2d::CCDirector::getScreenBottom(v264); v266 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v265); v267 = cocos2d::CCDirector::getScreenLeft(v266) + 30.0; cocos2d::CCPoint::CCPoint(v267, v267); v262->setPosition_0(v261, v268); a1->addChild_0(a1, v261, 2); v269 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v269->setScale_0)(v269); v270 = CCMenuItemSpriteExtra::create(v269, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onLevelOptions); v271 = ((float (__fastcall *)(cocos2d::CCNode *, CCMenuItemSpriteExtra *))v261->addChild_1)(v261, v270); v272 = v270->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v273 = cocos2d::CCPoint::CCPoint(v271, 30.0); v274 = cocos2d::CCNode::convertToNodeSpace(v261, (const struct cocos2d::CCPoint *)&v312); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v272->setPosition_0)(v270, v274); v275 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v276 = cocos2d::CCString::createWithFormat("%i", v119->m_levelFolder); v277 = cocos2d::CCString::getCString(v276); v278 = cocos2d::CCLabelBMFont::create(v277, (const char *)&qword_14052A4D8); a1->m_folderLabel = v278; v275->addChild_0(v275, v278, 1); v279 = a1->m_folderLabel->__vftable; v275->getContentSize(v275); v280 = (float *)v275->getContentSize(v275); cocos2d::CCPoint::CCPoint(*(float *)&v273, *v280 * 0.5); v279->setPosition_0(a1->m_folderLabel, v281); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_folderLabel, 24.0, 0.55000001, 0.0); ((void (__fastcall *)(struct cocos2d::CCSprite *))v275->setScale_0)(v275); v282 = CCMenuItemSpriteExtra::create(v275, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onSetFolder); v283 = v306; v284 = ((float (__fastcall *)(GJGameLevel *, CCMenuItemSpriteExtra *))v306->addChild_1)(v306, v282); v285 = v282->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v284, (float)(v310 - 73.0) - 0.0); v286 = cocos2d::CCNode::convertToNodeSpace(v283, (const struct cocos2d::CCPoint *)&v312); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v285->setPosition_0)(v282, v286); v287 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_listAddBtn_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v287->setScale_0)(v287); v288 = CCMenuItemSpriteExtra::create(v287, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelInfoLayer::onAddToList); v289 = ((float (__fastcall *)(GJGameLevel *, CCMenuItemSpriteExtra *))v306->addChild_1)(v306, v288); cocos2d::CCPoint::CCPoint(v289, 0.0); v290 = (__int64)v282->getPosition_0(v282); v291 = cocos2d::CCPoint::operator+(v290, &v306); v288->setPosition_0(v288, (const cocos2d::CCPoint *)&v306); if ( v119->m_dailyID.random - v119->m_dailyID.seed > 0 || v119->m_gauntletLevel ) { v282->setVisible(v282, 0); v282->setEnabled(v282, 0); v240->setVisible(v240, 0); v240->setEnabled(v240, 0); v294 = v313; v313->setVisible(v313, 0); v294->setEnabled(v294, 0); v234->setVisible(v234, 0); v234->setEnabled(v234, 0); v288->setVisible(v288, 0); v288->setEnabled(v288, 0); } if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v293, v292) + 197) ) { GameToolbox::addBackButton(a1, v311); v295 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); a1->m_playSprite->addChild_1(a1->m_playSprite, v295); v296 = v295->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_playSprite->getContentSize(a1->m_playSprite); v297 = a1->m_playSprite->getContentSize(a1->m_playSprite); cocos2d::CCPoint::CCPoint(*(float *)&v291, v297->width * 0.5); v296->setPosition_0(v295, v298); } v299 = a1->m_level; m_savedTime = v299->m_savedTime; if ( (m_savedTime || v299->m_savedPoints) && v299->m_levelType != Editor && v299->m_demon.random - v299->m_demon.seed == 1 ) { if ( m_savedTime ) { v301 = (GameLevelManager *)qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v317 = operator new(0x3D0u); qword_1406C2EC0 = sub_140141280((__int64)v317); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v301 = (GameLevelManager *)qword_1406C2EC0; } GameLevelManager::getLevelLeaderboard(v301, a1->m_level, (LevelLeaderboardType)4, Time); } if ( a1->m_level->m_savedPoints ) { v302 = (GameLevelManager *)qword_1406C2EC0; if ( !qword_1406C2EC0 ) { v317 = operator new(0x3D0u); qword_1406C2EC0 = sub_140141280((__int64)v317); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0); v302 = (GameLevelManager *)qword_1406C2EC0; } GameLevelManager::getLevelLeaderboard(v302, a1->m_level, (LevelLeaderboardType)4, Points); } } v303 = qword_1406C2ED8; if ( !qword_1406C2ED8 ) { v312 = (void **)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00((__int64)v312); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v303 = qword_1406C2ED8; } *(_BYTE *)(v303 + 1036) = 0; return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source