// // LevelCell::loadCustomLevelCell from 0x60fc24 to 0x6125d0 (10668 bytes) // // 2 xrefs: // > LevelCell::loadFromLevel @ 0x6126c0 // > @ 0x2e320 // // 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 // void LevelCell::loadCustomLevelCell(LevelCell *a1) { GJGameLevel *m_level; // x1 _BOOL4 v3; // w28 float v4; // s9 cocos2d::CCLabelBMFont *v5; // x26 cocos2d::CCArray **v6; // x0 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x19 float m_height; // s0 void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 GameLevelManager *v10; // x0 GJGameLevel *SavedDailyLevel; // x0 GJGameLevel *v12; // x1 _DWORD *v13; // x20 _BOOL4 v14; // w25 cocos2d::CCLabelBMFont *v15; // x23 unsigned __int64 v16; // x19 cocos2d::CCArray *m_pTargetArray; // x24 cocos2d::CCArray *v18; // x2 unsigned __int64 v19; // x19 cocos2d::CCArray **v20; // x0 char *v21; // x0 GJGameLevel *v22; // x0 const char *v23; // x6 const char *v24; // x5 const char *v25; // x1 cocos2d::CCNode *v26; // x19 GameStatsManager *v27; // x0 float v28; // s8 CCMenuItemSpriteExtra *v29; // x0 float v30; // s0 float m_width; // s9 float *v32; // x0 float v33; // s0 float v34; // s1 CCMenuItemSpriteExtra *m_button; // x19 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 int v37; // w23 _BOOL4 m_compactView; // w1 void *v39; // x0 __int64 v40; // x19 float v41; // s8 float v42; // s0 float v43; // s0 float v44; // s1 CCMenuItemSpriteExtra *v45; // x19 void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCLabelBMFont_vtbl *v48; // x1 float *v49; // x0 float v50; // s0 float v51; // s1 float v52; // s9 float v53; // s8 MusicDownloadManager *v54; // x0 SongInfoObject *SongInfoObject; // x0 SongInfoObject *v56; // x23 int m_nongType; // w0 const char *v58; // x0 cocos2d::CCSprite *v59; // x19 float v60; // s0 cocos2d::CCSprite_vtbl *v61; // x2 cocos2d::CCLabelBMFont *v62; // x24 cocos2d::CCArray **v63; // x0 void (__fastcall *v64)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x19 void (__fastcall *v65)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 int AverageDifficulty; // w0 GJGameLevel *v67; // x1 unsigned int v68; // w20 cocos2d::CCString *v69; // x0 void (__fastcall *v70)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 void (__fastcall *v71)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 __int64 v72; // x19 GJGameLevel *v73; // x0 int v74; // w0 GJDifficultySprite *v75; // x19 GameStatsManager *v76; // x0 _BOOL4 hasCompletedStarLevel; // w27 const char *v78; // x0 cocos2d::CCSprite *v79; // x23 void (__fastcall *v80)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCString *v81; // x0 cocos2d::CCLabelBMFont *v82; // x20 void (__fastcall *v83)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCSprite *v84; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v86)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 __int64 v87; // x19 GJGameLevel *v88; // x0 int m_coins; // w1 float v90; // s13 int v91; // w19 float v92; // s8 char *CoinKey; // x0 GameStatsManager *v94; // x0 GameStatsManager *v95; // x0 _BOOL4 hasPendingUserCoin; // w27 cocos2d::CCSprite *v97; // x20 void (__fastcall *v98)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v99; // x1 cocos2d::CCArray **v100; // x0 float x; // s0 float v102; // s11 float v103; // s8 float v104; // s10 float v105; // s9 cocos2d::CCSprite *v106; // x27 void (__fastcall *v107)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCSprite *v108; // x23 void (__fastcall *v109)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 __int64 v110; // x19 cocos2d::CCSprite *v111; // x19 void (__fastcall *v112)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 __int64 v113; // x20 GJGameLevel *v114; // x0 int v115; // w1 float v116; // s13 float v117; // s8 cocos2d::CCLabelBMFont *v118; // x20 cocos2d::CCArray **v119; // x0 void (__fastcall *v120)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24 cocos2d::CCSprite *v121; // x0 const cocos2d::CCPoint *(__fastcall *v122)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v123)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v124; // x24 void (__fastcall *v125)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float v126; // s12 float v127; // s9 float v128; // s9 __int64 v129; // x0 cocos2d::CCLabelBMFont *v130; // x20 cocos2d::CCArray **v131; // x0 void (__fastcall *v132)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24 void (__fastcall *v133)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v134; // x23 int v135; // w23 void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // x24 cocos2d::CCSpriteFrameCache *v137; // x0 cocos2d::CCSpriteFrame *v138; // x0 void (__fastcall *v139)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float v140; // s14 float v141; // s9 float v142; // s9 __int64 v143; // x0 cocos2d::CCLabelBMFont *v144; // x20 cocos2d::CCArray **v145; // x0 void (__fastcall *v146)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x23 void (__fastcall *v147)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v148; // x23 cocos2d::CCSprite *v149; // x23 void (__fastcall *v150)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 __int64 v151; // x24 void (__fastcall *v152)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float v153; // s10 float v154; // s9 float v155; // s13 __int64 v156; // x0 GameStatsManager *v157; // x0 int BaseCurrencyForLevel; // w0 unsigned int v159; // w28 GameStatsManager *v160; // x0 int AwardedCurrencyForLevel; // w27 cocos2d::CCString *v162; // x0 size_t v163; // x0 cocos2d::CCLabelBMFont *v164; // x20 void (__fastcall *v165)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24 void (__fastcall *v166)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v167; // x23 cocos2d::CCArray **v168; // x0 void (__fastcall *v169)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 __int64 v170; // x20 float v171; // s9 float v172; // s8 float v173; // s8 __int64 v174; // x0 unsigned int NormalPercent; // w0 float v176; // s10 float v177; // s9 float v178; // s11 float v179; // s8 float v180; // s0 GJGameLevel *v181; // x0 cocos2d::CCSprite *v182; // x19 void (__fastcall *v183)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 float v184; // s0 float v185; // s1 cocos2d::CCLabelBMFont *v186; // x1 cocos2d::CCArray **v187; // x0 cocos2d::CCPoint *p_m_textOffset; // x0 GameLevelManager *v189; // x0 __int64 SavedLevel; // x0 cocos2d::CCLabelBMFont *v191; // x19 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCArray **p_m_pTargetArray; // x0 void (__fastcall *v194)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCSprite *v195; // x23 GameStatsManager *v196; // x0 unsigned int BaseDiamonds; // w28 GameStatsManager *v198; // x0 unsigned int AwardedDiamondsForLevel; // w27 cocos2d::CCString *v200; // x0 size_t v201; // x0 cocos2d::CCLabelBMFont *v202; // x20 void (__fastcall *v203)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x19 float v204; // s8 float v205; // s0 void (__fastcall *v206)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCSprite *v207; // x0 const cocos2d::CCPoint *(__fastcall *v208)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v209)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 __int64 v210; // x19 cocos2d::CCArray **v211; // x0 __int64 v212; // x28 float v213; // s9 float v214; // s9 float v215; // s0 void (__fastcall *v216)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2 unsigned int *v217; // x1 int v218; // w2 void (__fastcall *v219)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x3 float *v220; // x0 float v221; // s0 float v222; // s1 float width; // s9 float v224; // s9 float v225; // s8 float v226; // s0 cocos2d::CCSprite *v227; // x20 long double v228; // q0 float v229; // s0 float v230; // s1 cocos2d::CCSprite *v231; // x19 void (__fastcall *v232)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 float v233; // s0 float v234; // s1 unsigned int *v235; // x1 int v236; // w2 void (__fastcall *v237)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x2 void (__fastcall *v238)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 void (__fastcall *v239)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 unsigned int *v242; // x23 unsigned int v243; // w19 int v244; // w1 unsigned int *v245; // x20 unsigned int v246; // w19 int v247; // w1 cocos2d::CCString *v248; // x0 cocos2d::CCLabelBMFont *v249; // x20 long double v250; // q0 float v251; // s0 void (__fastcall *v252)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 ButtonSprite *v253; // x0 cocos2d::CCNode *v254; // x19 CCMenuItemSpriteExtra *v255; // x19 void (__fastcall *v256)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 const cocos2d::CCPoint *v257; // x23 ButtonSprite *v258; // x0 cocos2d::CCNode *v259; // x19 CCMenuItemSpriteExtra *v260; // x19 const cocos2d::CCPoint *v261; // x23 ButtonSprite *v262; // x0 cocos2d::CCNode *v263; // x19 CCMenuItemSpriteExtra *v264; // x19 const cocos2d::CCPoint *v265; // x23 const char *v266; // x6 cocos2d::CCNode *v267; // x0 CCMenuItemSpriteExtra *v268; // x24 cocos2d::CCMenu *m_mainMenu; // x27 void (__fastcall *v270)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 GameLevelManager *v271; // x0 unsigned int *v272; // x1 int v273; // w2 unsigned int *v274; // x1 int v275; // w2 unsigned int *v276; // x1 int v277; // w2 unsigned int *p_m_caption; // x28 int m_data; // w1 unsigned int *v280; // x1 int v281; // w2 unsigned int *v282; // x1 int v283; // w2 unsigned int *v284; // x1 int v285; // w2 unsigned int *v286; // x1 int v287; // w2 void (__fastcall *v288)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x23 void (__fastcall *v289)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 unsigned int *v290; // x1 int v291; // w2 _BOOL4 hasCompletedLevel; // [xsp+A4h] [xbp+A4h] GJGameLevel *v293; // [xsp+A8h] [xbp+A8h] cocos2d::CCLabelBMFont *v294; // [xsp+B0h] [xbp+B0h] cocos2d::CCNode *v295; // [xsp+C8h] [xbp+C8h] void (__fastcall *v296)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [xsp+D0h] [xbp+D0h] int seed; // [xsp+D8h] [xbp+D8h] void (__fastcall *v298)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+D8h] [xbp+D8h] void (__fastcall *v299)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+D8h] [xbp+D8h] int m_levelLength; // [xsp+E0h] [xbp+E0h] int random; // [xsp+E0h] [xbp+E0h] const char *v302; // [xsp+E0h] [xbp+E0h] const char *CString; // [xsp+E0h] [xbp+E0h] ButtonSprite *v304; // [xsp+100h] [xbp+100h] BYREF void *v305; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCLabelBMFont *v306; // [xsp+110h] [xbp+110h] BYREF __int64 v307; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCPoint v308; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCPoint v309; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCLabelBMFont *v310; // [xsp+130h] [xbp+130h] BYREF cocos2d::CCPoint v311; // [xsp+138h] [xbp+138h] BYREF cocos2d::CCLabelBMFont *v312; // [xsp+140h] [xbp+140h] BYREF cocos2d::CCPoint v313; // [xsp+148h] [xbp+148h] BYREF cocos2d::CCLabelBMFont *v314; // [xsp+150h] [xbp+150h] BYREF cocos2d::CCLabelBMFont *v315; // [xsp+158h] [xbp+158h] BYREF cocos2d::CCLabelBMFont *v316; // [xsp+160h] [xbp+160h] BYREF cocos2d::CCPoint v317; // 0:kr00_8.8 cocos2d::CCPoint v318; // 0:kr08_8.8 cocos2d::CCPoint v319; // 0:kr10_8.8 cocos2d::SEL_MenuHandler v320; // 0:x2.16 cocos2d::SEL_MenuHandler v321; // 0:x2.16 cocos2d::SEL_MenuHandler v322; // 0:x2.16 cocos2d::SEL_MenuHandler v323; // 0:x2.16 cocos2d::SEL_MenuHandler v324; // 0:x2.16 cocos2d::SEL_MenuHandler v325; // 0:x2.16 m_level = a1->m_level; v3 = m_level->m_dailyID.random - m_level->m_dailyID.seed > 0; m_levelLength = m_level->m_levelLength; if ( a1->m_compactView ) { GameToolbox::intToString((__int64 *)&v315, (GameToolbox *)(unsigned int)m_level->m_listPosition); v191 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v191); cocos2d::CCLabelBMFont::limitLabelWidth(v191, 20.0, 0.45, 0.0); setPosition = v191->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 16.0, a1->m_height * 0.5); setPosition(v191, (const cocos2d::CCPoint *)&v316); p_m_pTargetArray = &v315[-1].m_pTargetArray; if ( &v315[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v315[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v315[-1].m_nExtraKerning; v315[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } m_level = a1->m_level; v4 = 15.0; } else { v4 = 0.0; } sub_D18D28(&v316, &m_level->m_levelName); v5 = cocos2d::CCLabelBMFont::create(); v6 = &v316[-1].m_pTargetArray; if ( &v316[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v276 = (unsigned int *)&v316[-1].m_nExtraKerning; do v277 = __ldaxr(v276); while ( __stlxr(v277 - 1, v276) ); } else { v277 = v316[-1].m_nExtraKerning; v316[-1].m_nExtraKerning = v277 - 1; } if ( v277 <= 0 ) operator delete(v6); } a1->m_mainLayer->addChild(a1->m_mainLayer, v5); setAnchorPoint = v5->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); setAnchorPoint(v5, (const cocos2d::CCPoint *)&v316); v5->setScale(v5, 1.0); m_height = a1->m_height; v9 = v5->setPosition; if ( a1->m_compactView ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, v4 + 50.0, (float)(m_height * 0.5) + 16.0); v9(v5, (const cocos2d::CCPoint *)&v316); cocos2d::CCLabelBMFont::limitLabelWidth(v5, 120.0, 0.5, 0.0); } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 50.0, (float)(m_height * 0.5) + 30.0); v9(v5, (const cocos2d::CCPoint *)&v316); cocos2d::CCLabelBMFont::limitLabelWidth(v5, 190.0, 0.8, 0.0); } v304 = (ButtonSprite *)&byte_124B6C8; if ( v3 ) { v10 = GameLevelManager::sharedState(); SavedDailyLevel = GameLevelManager::getSavedDailyLevel( v10, a1->m_level->m_dailyID.random - a1->m_level->m_dailyID.seed); v12 = a1->m_level; v293 = SavedDailyLevel; if ( v12->m_levelType == Editor ) goto LABEL_120; } else { v189 = GameLevelManager::sharedState(); SavedLevel = GameLevelManager::getSavedLevel(v189, a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed); v12 = a1->m_level; v293 = (GJGameLevel *)SavedLevel; if ( v12->m_levelType == Editor ) goto LABEL_120; } sub_D18D28(&v305, &v12->m_levelString); sub_D153B8((int)&v306, &byte_F288A0); v13 = v305; v14 = 1; v15 = v306; v16 = *((_QWORD *)v305 - 3); m_pTargetArray = v306[-1].m_pTargetArray; if ( (unsigned __int64)m_pTargetArray > v16 ) v18 = *((cocos2d::CCArray **)v305 - 3); else v18 = v306[-1].m_pTargetArray; if ( !memcmp(v305, v306, (size_t)v18) ) { v19 = v16 - (_QWORD)m_pTargetArray; if ( v19 + 0x80000000 <= 0xFFFFFFFF && !(_DWORD)v19 ) { if ( v293 ) { v14 = 0; if ( !v293->m_levelNotDownloaded ) v14 = v293->m_levelVersion == a1->m_level->m_levelVersion; } else { v14 = 0; } } } v20 = &v15[-1].m_pTargetArray; if ( &v15[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v242 = (unsigned int *)&v15[-1].m_nExtraKerning; do v243 = __ldaxr(v242); while ( __stlxr(v243 - 1, v242) ); v244 = v243; } else { v244 = v15[-1].m_nExtraKerning; v15[-1].m_nExtraKerning = v244 - 1; } if ( v244 <= 0 ) operator delete(v20); v13 = v305; } v21 = (char *)(v13 - 6); if ( v13 - 6 != (_DWORD *)&qword_124B6B0 ) { if ( &pthread_create ) { v245 = v13 - 2; do v246 = __ldaxr(v245); while ( __stlxr(v246 - 1, v245) ); v247 = v246; } else { v247 = *(v13 - 2); *(v13 - 2) = v247 - 1; } if ( v247 <= 0 ) operator delete(v21); } if ( !v14 ) { v22 = a1->m_level; if ( v22->m_gameVersion > 22 ) { sub_D1798C(&v304, "NA", 2); v24 = "GJ_button_04.png"; } else if ( !v293 || v293->m_levelNotDownloaded || v293->m_levelVersion >= v22->m_levelVersion ) { sub_D1798C(&v304, "Get It", 6); v24 = "GJ_button_02.png"; } else { sub_D1798C(&v304, "Update", 6); v24 = "GJ_button_03.png"; } if ( !v3 ) goto LABEL_26; goto LABEL_121; } LABEL_120: sub_D1798C(&v304, "View", 4); v24 = "GJ_button_01.png"; if ( !v3 ) { LABEL_26: if ( a1->m_compactView ) v25 = (const char *)&qword_28; else v25 = (_BYTE *)(&dword_30 + 2); v26 = (cocos2d::CCNode *)ButtonSprite::create(v304, v25, 0, 1, 0.6, "bigFont.fnt", v24, v23, 30.0); v27 = GameStatsManager::sharedState(); v28 = 0.0; hasCompletedLevel = GameStatsManager::hasCompletedLevel(v27, a1->m_level); goto LABEL_30; } LABEL_121: v26 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v26->setScale(v26, 0.7); v28 = 18.0; hasCompletedLevel = a1->m_level->m_orbCompletion.random - a1->m_level->m_orbCompletion.seed > 99; LABEL_30: v320.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v320.adj = (size_t)LevelCell::onClick; v29 = CCMenuItemSpriteExtra::create(v26, nullptr, v320); a1->m_button = v29; if ( v3 || a1->m_level->m_localOrSaved ) v30 = 1.0; else v30 = 1.4; CCMenuItemSpriteExtra::setSizeMult(v29, v30); a1->m_button->setTag(a1->m_button, 0); a1->m_mainMenu->addChild(a1->m_mainMenu, a1->m_button); m_width = a1->m_width; v32 = (float *)v26->getContentSize(v26); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v316, (float)((float)(m_width - (float)(*v32 * 0.5)) - 9.0) + v28, a1->m_height * 0.5); cocos2d::CCPoint::operator=(&a1->m_point, v33, v34); m_button = a1->m_button; v36 = m_button->setPosition; v317 = cocos2d::CCNode::convertToNodeSpace(a1->m_mainMenu, &a1->m_point); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v36)( m_button, &v316, v317.x, v317.y); if ( a1->m_listType == Level4 ) { v253 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_flipYBtn_001.png"); v254 = (cocos2d::CCNode *)ButtonSprite::create( v253, (cocos2d::CCSprite *)((char *)&off_18 + 6), 0, 1, 30.0, 1.0, (cocos2d::CCSprite *)"GJ_button_05.png", nullptr); v254->setScale(v254, 0.6); v322.adj = (size_t)LevelCell::onClick; v322.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v255 = CCMenuItemSpriteExtra::create(v254, nullptr, v322); v255->setTag(v255, 3); a1->m_mainMenu->addChild(a1->m_mainMenu, v255); v256 = v255->setPosition; v257 = a1->m_button->getPosition(a1->m_button); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 16.0, -8.0); cocos2d::CCPoint::operator+(&v316, v257, &v315); v256(v255, (const cocos2d::CCPoint *)&v316); v258 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png"); v259 = (cocos2d::CCNode *)ButtonSprite::create( v258, (cocos2d::CCSprite *)((char *)&off_18 + 6), 0, 1, 30.0, 1.0, (cocos2d::CCSprite *)"GJ_button_06.png", nullptr); v259->setScale(v259, 0.6); v323.adj = (size_t)LevelCell::onClick; v323.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v260 = CCMenuItemSpriteExtra::create(v259, nullptr, v323); v260->setTag(v260, 2); a1->m_mainMenu->addChild(a1->m_mainMenu, v260); v298 = v260->setPosition; v261 = a1->m_button->getPosition(a1->m_button); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, -12.0, -8.0); cocos2d::CCPoint::operator+(&v316, v261, &v315); v298(v260, (const cocos2d::CCPoint *)&v316); v262 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png"); v263 = (cocos2d::CCNode *)ButtonSprite::create( v262, (cocos2d::CCSprite *)((char *)&off_18 + 6), 0, 1, 30.0, 1.0, (cocos2d::CCSprite *)"GJ_button_01.png", nullptr); v263->setScale(v263, 0.6); v324.adj = (size_t)LevelCell::onClick; v324.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v264 = CCMenuItemSpriteExtra::create(v263, nullptr, v324); v264->setTag(v264, 1); a1->m_mainMenu->addChild(a1->m_mainMenu, v264); v299 = v264->setPosition; v265 = a1->m_button->getPosition(a1->m_button); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, -40.0, -8.0); cocos2d::CCPoint::operator+(&v316, v265, &v315); v299(v264, (const cocos2d::CCPoint *)&v316); v267 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Delete", (const char *)&qword_28, 0, 1, 0.6, "bigFont.fnt", "GJ_button_06.png", v266, 30.0); v325.adj = (size_t)LevelCell::onClick; v325.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v268 = CCMenuItemSpriteExtra::create(v267, nullptr, v325); v268->setTag(v268, 4); a1->m_mainMenu->addChild(a1->m_mainMenu, v268); m_mainMenu = a1->m_mainMenu; v270 = v268->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v314, -v28, 0.0); cocos2d::CCPoint::operator+(&v315, &a1->m_point, &v314); v319 = cocos2d::CCNode::convertToNodeSpace(m_mainMenu, (const cocos2d::CCPoint *)&v315); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v270)( v268, &v316, v319.x, v319.y); LevelCell::updateCellMode(a1, a1->m_cellMode); v37 = a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed; if ( v37 > 0 ) goto LABEL_35; } else { v37 = a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed; if ( v37 > 0 ) goto LABEL_35; } v271 = GameLevelManager::sharedState(); v37 = GameLevelManager::accountIDForUserID(v271, a1->m_level->m_userID.random - a1->m_level->m_userID.seed); LABEL_35: m_compactView = a1->m_compactView; v306 = (cocos2d::CCLabelBMFont *)&byte_124B6C8; if ( !m_compactView ) sub_D15FD4(&v306, "By ", 3); sub_D18D28(&v307, &a1->m_level->m_creatorName); sub_D15E14(&v306, &v307); v39 = (void *)(v307 - 24); if ( (__int64 *)(v307 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v274 = (unsigned int *)(v307 - 8); do v275 = __ldaxr(v274); while ( __stlxr(v275 - 1, v274) ); } else { v275 = *(_DWORD *)(v307 - 8); *(_DWORD *)(v307 - 8) = v275 - 1; } if ( v275 <= 0 ) operator delete(v39); } v294 = cocos2d::CCLabelBMFont::create(); cocos2d::CCPoint::CCPoint(&v308); if ( a1->m_compactView ) { cocos2d::CCLabelBMFont::limitLabelWidth(v294, 80.0, 0.45, 0.0); v40 = (__int64)v5->getPosition(v5); width = v5->getContentSize(v5)->width; v224 = width * v5->getScale(v5); v225 = v294->getContentSize(v294)->width * 0.5; v226 = v294->getScale(v294); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, (float)(v224 + (float)(v225 * v226)) + 5.0, 0.0); } else { cocos2d::CCLabelBMFont::limitLabelWidth(v294, 140.0, 0.7, 0.0); v40 = (__int64)v5->getPosition(v5); v41 = v294->getContentSize(v294)->width * 0.5; v42 = v294->getScale(v294); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, (float)(v41 * v42) + 2.0, -22.0); } cocos2d::CCPoint::operator+(&v316, v40, &v315); cocos2d::CCPoint::operator=(&v308, v43, v44); v321.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v321.adj = (size_t)LevelCell::onViewProfile; v45 = CCMenuItemSpriteExtra::create(v294, nullptr, v321); a1->m_mainMenu->addChild(a1->m_mainMenu, v45); v46 = v45->setPosition; v318 = cocos2d::CCNode::convertToNodeSpace(a1->m_mainMenu, &v308); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v46)( v45, &v316, v318.x, v318.y); if ( !v37 ) { setColor = v294->setColor; LOWORD(v316) = -166; BYTE2(v316) = -1; setColor(v294, (const cocos2d::ccColor3B *)&v316); v45->setEnabled(v45, 0); } cocos2d::CCPoint::CCPoint(&v309); v48 = v5->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( a1->m_compactView ) { v220 = (float *)v48->getPosition(v5); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, *v220 + 1.0, (float)(a1->m_height * 0.5) + -1.0); cocos2d::CCPoint::operator=(&v309, v221, v222); v52 = 0.36; v53 = 150.0; } else { v49 = (float *)v48->getPosition(v5); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, *v49 + 2.0, (float)(a1->m_height * 0.5) + -12.0); cocos2d::CCPoint::operator=(&v309, v50, v51); v52 = 0.45; v53 = 195.0; } v54 = MusicDownloadManager::sharedState(); SongInfoObject = MusicDownloadManager::getSongInfoObject(v54, a1->m_level->m_songID); v56 = SongInfoObject; if ( SongInfoObject ) { m_nongType = SongInfoObject->m_nongType; if ( m_nongType > 0 ) { if ( m_nongType == 2 ) v58 = "chompo_small_001.png"; else v58 = "ncs_small_001.png"; v59 = cocos2d::CCSprite::createWithSpriteFrameName(v58); a1->m_mainLayer->addChild(a1->m_mainLayer, v59); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 14.0, -1.0); cocos2d::CCPoint::operator+(&v315, &v309, &v316); if ( v56->m_nongType == 2 ) { *(float *)&v315 = *(float *)&v315 + 3.0; *((float *)&v315 + 1) = *((float *)&v315 + 1) - 0.5; v60 = v309.x + 40.0; v53 = v53 - 20.0; } else { v60 = v309.x + 34.0; v53 = v53 - 15.0; } v61 = v59->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v309.x = v60; v61->setPosition(v59, (const cocos2d::CCPoint *)&v315); } } GJGameLevel::getSongName((__int64 *)&v310, a1->m_level); v62 = cocos2d::CCLabelBMFont::create(); v63 = &v310[-1].m_pTargetArray; if ( &v310[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v272 = (unsigned int *)&v310[-1].m_nExtraKerning; do v273 = __ldaxr(v272); while ( __stlxr(v273 - 1, v272) ); } else { v273 = v310[-1].m_nExtraKerning; v310[-1].m_nExtraKerning = v273 - 1; } if ( v273 <= 0 ) operator delete(v63); } a1->m_mainLayer->addChild(a1->m_mainLayer, v62); v64 = v62->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v64(v62, (const cocos2d::CCPoint *)&v316); v62->setPosition(v62, &v309); cocos2d::CCLabelBMFont::limitLabelWidth(v62, v53, v52, 0.0); if ( a1->m_level->m_songID <= 0 ) { v237 = v62->setColor; LOWORD(v316) = -11736; BYTE2(v316) = -1; v237(v62, (const cocos2d::ccColor3B *)&v316); } else { v65 = v62->setColor; LOWORD(v316) = -32001; BYTE2(v316) = -1; v65(v62, (const cocos2d::ccColor3B *)&v316); } AverageDifficulty = GJGameLevel::getAverageDifficulty(a1->m_level); v67 = a1->m_level; v68 = AverageDifficulty; if ( v67->m_demon.random - v67->m_demon.seed == 1 ) v68 = GJGameLevel::demonIconForDifficulty((DemonDifficultyType)v67->m_demonDifficulty); v69 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn_001.png", (const char *)v68); cocos2d::CCString::getCString(v69); v295 = cocos2d::CCNode::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v295, 2); v295->setContentSize(v295, &stru_1241FF8); v70 = v295->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 26.0, a1->m_height * 0.5); v70(v295, (const cocos2d::CCPoint *)&v316); if ( a1->m_compactView ) { v295->setScale(v295, 0.7); v71 = v295->setPosition; v72 = (__int64)v295->getPosition(v295); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 18.0, 1.0); cocos2d::CCPoint::operator+(&v316, v72, &v315); v71(v295, (const cocos2d::CCPoint *)&v316); } cocos2d::CCPoint::CCPoint(&v311, 0.0, 0.0); v73 = a1->m_level; if ( v73->m_coins <= 0 || a1->m_compactView ) { if ( v73->m_stars.random - v73->m_stars.seed <= 0 ) goto LABEL_62; } else if ( v73->m_stars.random - v73->m_stars.seed > 0 ) { v311.y = v311.y + 14.0; goto LABEL_62; } v311.y = v311.y + 5.0; LABEL_62: if ( v3 ) v311.y = v311.y + 10.0; if ( v73->m_autoLevel ) v74 = -1; else v74 = v68; v75 = GJDifficultySprite::create(v74, Short); GJDifficultySprite::updateFeatureStateFromLevel(v75, a1->m_level); v295->addChild_0(v295, v75, 3); v75->setPosition(v75, &v311); v76 = GameStatsManager::sharedState(); hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v76, a1->m_level); if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed <= 0 ) goto LABEL_71; v78 = m_levelLength == 5 ? "moon_small01_001.png" : "star_small01_001.png"; v79 = cocos2d::CCSprite::createWithSpriteFrameName(v78); v295->addChild(v295, v79); v80 = v79->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 8.0, -30.0); cocos2d::CCPoint::operator+(&v316, &v311, &v315); v80(v79, (const cocos2d::CCPoint *)&v316); v81 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)(unsigned int)(a1->m_level->m_stars.random - a1->m_level->m_stars.seed)); cocos2d::CCString::getCString(v81); v82 = cocos2d::CCLabelBMFont::create(); v295->addChild(v295, v82); v83 = v82->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 1.0, 0.5); v83(v82, (const cocos2d::CCPoint *)&v316); v84 = v79; getPosition = v79->getPosition; v86 = v82->setPosition; v87 = (__int64)getPosition(v84); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, -8.0, 0.0); cocos2d::CCPoint::operator+(&v316, v87, &v315); v86(v82, (const cocos2d::CCPoint *)&v316); v82->setScale(v82, 0.4); if ( hasCompletedStarLevel ) { v194 = v82->setColor; LOWORD(v316) = -1; BYTE2(v316) = 50; v194(v82, (const cocos2d::ccColor3B *)&v316); if ( !v3 ) { LABEL_72: v88 = a1->m_level; m_coins = v88->m_coins; if ( m_coins > 0 ) { if ( v88->m_stars.random - v88->m_stars.seed <= 0 ) v90 = -31.5; else v90 = -45.5; goto LABEL_75; } goto LABEL_89; } } else { LABEL_71: if ( !v3 ) goto LABEL_72; } v195 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); v295->addChild(v295, v195); v314 = (cocos2d::CCLabelBMFont *)&byte_124B6C8; v196 = GameStatsManager::sharedState(); BaseDiamonds = GameStatsManager::getBaseDiamonds(v196, a1->m_level->m_stars.random - a1->m_level->m_stars.seed); v198 = GameStatsManager::sharedState(); AwardedDiamondsForLevel = GameStatsManager::getAwardedDiamondsForLevel(v198, a1->m_level); v200 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i/%i", (const char *)AwardedDiamondsForLevel, BaseDiamonds); CString = cocos2d::CCString::getCString(v200); v201 = strlen(CString); sub_D1798C(&v314, CString, v201); v202 = cocos2d::CCLabelBMFont::create(); v295->addChild(v295, v202); v203 = v202->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 1.0, 0.5); v203(v202, (const cocos2d::CCPoint *)&v316); v202->setScale(v202, 0.35); v204 = v202->getContentSize(v202)->width; v205 = v202->getScale(v202); v206 = v195->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, (float)((float)(v204 * v205) * 0.5) + 2.0, -44.5); cocos2d::CCPoint::operator+(&v316, &v311, &v315); v206(v195, (const cocos2d::CCPoint *)&v316); v207 = v195; v208 = v195->getPosition; v209 = v202->setPosition; v210 = (__int64)v208(v207); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, -8.0, 0.0); cocos2d::CCPoint::operator+(&v316, v210, &v315); v209(v202, (const cocos2d::CCPoint *)&v316); if ( BaseDiamonds == AwardedDiamondsForLevel ) { v289 = v202->setColor; LOWORD(v316) = -156; BYTE2(v316) = -1; v289(v202, (const cocos2d::ccColor3B *)&v316); } v211 = &v314[-1].m_pTargetArray; if ( &v314[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v290 = (unsigned int *)&v314[-1].m_nExtraKerning; do v291 = __ldaxr(v290); while ( __stlxr(v291 - 1, v290) ); } else { v291 = v314[-1].m_nExtraKerning; v314[-1].m_nExtraKerning = v291 - 1; } if ( v291 <= 0 ) operator delete(v211); } v88 = a1->m_level; m_coins = v88->m_coins; if ( m_coins > 0 ) { v90 = -60.0; LABEL_75: v91 = 0; random = v88->m_coinsVerified.random; seed = v88->m_coinsVerified.seed; do { if ( v91 == 1 ) { if ( m_coins != 2 ) { LABEL_79: v92 = 0.0; goto LABEL_80; } v92 = 5.0; } else if ( v91 == 2 ) { v92 = 10.0; } else { if ( v91 ) goto LABEL_79; if ( m_coins == 2 ) { v92 = -5.0; } else { v92 = 0.0; if ( m_coins > 2 ) v92 = -10.0; } } LABEL_80: CoinKey = (char *)GJGameLevel::getCoinKey(v88, ++v91); sub_D153B8((int)&v314, CoinKey); v94 = GameStatsManager::sharedState(); if ( GameStatsManager::hasUserCoin(v94, (const char *)v314) ) { hasPendingUserCoin = 1; } else { v95 = GameStatsManager::sharedState(); hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v95, (const char *)v314); } v97 = cocos2d::CCSprite::createWithSpriteFrameName("usercoin_small01_001.png"); if ( a1->m_compactView ) { a1->m_mainLayer->addChild(a1->m_mainLayer, v97); v97->setScale(v97, 0.7); v296 = v97->setPosition; v212 = (__int64)v62->getPosition(v62); v213 = v62->getContentSize(v62)->width; v214 = (float)(v213 * v62->getScale(v62)) + 18.0; v215 = v97->getScale(v97); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v214 + (float)(v92 * v215), 0.0); cocos2d::CCPoint::operator+(&v316, v212, &v315); v296(v97, (const cocos2d::CCPoint *)&v316); if ( random != seed ) { LABEL_84: if ( !hasPendingUserCoin ) { v219 = v97->setColor; LOWORD(v316) = -23131; BYTE2(v316) = -91; v219(v97, (const cocos2d::ccColor3B *)&v316); } v99 = v314; v100 = &v314[-1].m_pTargetArray; if ( &v314[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) goto LABEL_87; LABEL_139: if ( &pthread_create ) { v217 = (unsigned int *)&v99[-1].m_nExtraKerning; do v218 = __ldaxr(v217); while ( __stlxr(v218 - 1, v217) ); } else { v218 = v99[-1].m_nExtraKerning; v99[-1].m_nExtraKerning = v218 - 1; } if ( v218 <= 0 ) operator delete(v100); goto LABEL_87; } } else { v295->addChild(v295, v97); v98 = v97->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v92, v90); cocos2d::CCPoint::operator+(&v316, &v311, &v315); v98(v97, (const cocos2d::CCPoint *)&v316); if ( random != seed ) goto LABEL_84; } v216 = v97->setColor; if ( hasPendingUserCoin ) { LOWORD(v316) = -20481; BYTE2(v316) = 75; } else { LOWORD(v316) = 29093; BYTE2(v316) = 48; } v216(v97, (const cocos2d::ccColor3B *)&v316); v99 = v314; v100 = &v314[-1].m_pTargetArray; if ( &v314[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) goto LABEL_139; LABEL_87: v88 = a1->m_level; m_coins = v88->m_coins; } while ( m_coins > v91 && v91 <= 2 ); } LABEL_89: x = v5->getPosition(v5)->x; if ( a1->m_compactView ) { v102 = 60.0; v103 = x + 6.0; v104 = 0.4; v105 = 8.5; } else { v105 = 14.0; v103 = x + 9.0; v102 = 80.0; v104 = 0.6; } v106 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v106); v107 = v106->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, v103, v105); v107(v106, (const cocos2d::CCPoint *)&v316); v106->setScale(v106, v104); v108 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v108); v109 = v108->setPosition; v110 = (__int64)v106->getPosition(v106); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v102, 0.0); cocos2d::CCPoint::operator+(&v316, v110, &v315); v109(v108, (const cocos2d::CCPoint *)&v316); v108->setScale(v108, v104); v111 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v111); v112 = v111->setPosition; v113 = (__int64)v108->getPosition(v108); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v102, 0.0); cocos2d::CCPoint::operator+(&v316, v113, &v315); v112(v111, (const cocos2d::CCPoint *)&v316); v111->setScale(v111, v104); if ( a1->m_compactView ) { v114 = a1->m_level; v115 = v114->m_stars.random - v114->m_stars.seed; if ( v115 <= 0 ) v116 = 20.0; else v116 = 14.4; v117 = 0.3; } else { v114 = a1->m_level; v117 = 0.4; v115 = v114->m_stars.random - v114->m_stars.seed; if ( v115 <= 0 ) v116 = 25.0; else v116 = 18.0; } GJGameLevel::lengthKeyToString((__int64 *)&v312, (GJGameLevel *)(unsigned int)v114->m_levelLength, v115); v118 = cocos2d::CCLabelBMFont::create(); v119 = &v312[-1].m_pTargetArray; if ( &v312[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v280 = (unsigned int *)&v312[-1].m_nExtraKerning; do v281 = __ldaxr(v280); while ( __stlxr(v281 - 1, v280) ); } else { v281 = v312[-1].m_nExtraKerning; v312[-1].m_nExtraKerning = v281 - 1; } if ( v281 <= 0 ) operator delete(v119); } a1->m_mainLayer->addChild(a1->m_mainLayer, v118); v120 = v118->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v120(v118, (const cocos2d::CCPoint *)&v316); v121 = v106; v122 = v106->getPosition; v123 = v118->setPosition; v124 = (__int64)v122(v121); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 10.0, 0.0); cocos2d::CCPoint::operator+(&v316, v124, &v315); v123(v118, (const cocos2d::CCPoint *)&v316); v118->setScale(v118, v117); cocos2d::CCLabelBMFont::limitLabelWidth(v118, 50.0, v117, 0.0); v125 = v108->setPosition; v126 = v118->getPosition(v118)->x; v127 = v118->getContentSize(v118)->width; v128 = (float)(v126 + (float)(v127 * v118->getScale(v118))) + v116; v129 = (__int64)v108->getPosition(v108); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, v128, *(float *)(v129 + 4)); v125(v108, (const cocos2d::CCPoint *)&v316); GameToolbox::intToShortString((GameToolbox *)(unsigned int)a1->m_level->m_downloads, (__int64)&v315); v130 = cocos2d::CCLabelBMFont::create(); v131 = &v315[-1].m_pTargetArray; if ( &v315[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v284 = (unsigned int *)&v315[-1].m_nExtraKerning; do v285 = __ldaxr(v284); while ( __stlxr(v285 - 1, v284) ); } else { v285 = v315[-1].m_nExtraKerning; v315[-1].m_nExtraKerning = v285 - 1; } if ( v285 <= 0 ) operator delete(v131); } a1->m_mainLayer->addChild(a1->m_mainLayer, v130); v132 = v130->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v132(v130, (const cocos2d::CCPoint *)&v316); v133 = v130->setPosition; v134 = (__int64)v108->getPosition(v108); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 9.0, 0.0); cocos2d::CCPoint::operator+(&v316, v134, &v315); v133(v130, (const cocos2d::CCPoint *)&v316); v130->setScale(v130, v117); cocos2d::CCLabelBMFont::limitLabelWidth(v130, 45.0, v117, 0.0); v135 = a1->m_level->m_likes - a1->m_level->m_dislikes; setDisplayFrame = v111->setDisplayFrame; v137 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); if ( v135 < 0 ) v138 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v137, "GJ_dislikesIcon_001.png"); else v138 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v137, "GJ_likesIcon_001.png"); setDisplayFrame(v111, v138); v139 = v111->setPosition; v140 = v130->getPosition(v130)->x; v141 = v130->getContentSize(v130)->width; v142 = (float)(v140 + (float)(v141 * v130->getScale(v130))) + v116; v143 = (__int64)v111->getPosition(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, v142, *(float *)(v143 + 4)); v139(v111, (const cocos2d::CCPoint *)&v316); GameToolbox::intToShortString((GameToolbox *)(unsigned int)v135, (__int64)&v316); v144 = cocos2d::CCLabelBMFont::create(); v145 = &v316[-1].m_pTargetArray; if ( &v316[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v282 = (unsigned int *)&v316[-1].m_nExtraKerning; do v283 = __ldaxr(v282); while ( __stlxr(v283 - 1, v282) ); } else { v283 = v316[-1].m_nExtraKerning; v316[-1].m_nExtraKerning = v283 - 1; } if ( v283 <= 0 ) operator delete(v145); } a1->m_mainLayer->addChild(a1->m_mainLayer, v144); v146 = v144->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v146(v144, (const cocos2d::CCPoint *)&v316); v147 = v144->setPosition; v148 = (__int64)v111->getPosition(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 10.0, 0.0); cocos2d::CCPoint::operator+(&v316, v148, &v315); v147(v144, (const cocos2d::CCPoint *)&v316); v144->setScale(v144, v117); cocos2d::CCLabelBMFont::limitLabelWidth(v144, 45.0, v117, 0.0); if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed > 1 ) { v149 = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v149); v150 = v149->setPosition; v151 = (__int64)v111->getPosition(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v102, 0.0); cocos2d::CCPoint::operator+(&v316, v151, &v315); v150(v149, (const cocos2d::CCPoint *)&v316); v149->setScale(v149, v104); v152 = v149->setPosition; v153 = v144->getPosition(v144)->x; v154 = v144->getContentSize(v144)->width; v155 = (float)(v153 + (float)(v154 * v144->getScale(v144))) + v116; v156 = (__int64)v149->getPosition(v149); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, v155, *(float *)(v156 + 4)); v152(v149, (const cocos2d::CCPoint *)&v316); v157 = GameStatsManager::sharedState(); BaseCurrencyForLevel = GameStatsManager::getBaseCurrencyForLevel(v157, a1->m_level); v159 = BaseCurrencyForLevel + (int)(float)((float)BaseCurrencyForLevel * 0.25); v160 = GameStatsManager::sharedState(); AwardedCurrencyForLevel = GameStatsManager::getAwardedCurrencyForLevel(v160, a1->m_level); v314 = (cocos2d::CCLabelBMFont *)&byte_124B6C8; if ( (int)v159 <= AwardedCurrencyForLevel ) v162 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)v159); else v162 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i/%i", (const char *)(unsigned int)AwardedCurrencyForLevel, v159); v302 = cocos2d::CCString::getCString(v162); v163 = strlen(v302); sub_D1798C(&v314, v302, v163); v164 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v164); v165 = v164->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v165(v164, (const cocos2d::CCPoint *)&v316); v166 = v164->setPosition; v167 = (__int64)v149->getPosition(v149); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 10.0, 0.0); cocos2d::CCPoint::operator+(&v316, v167, &v315); v166(v164, (const cocos2d::CCPoint *)&v316); v164->setScale(v164, v117); if ( v159 == AwardedCurrencyForLevel ) { v238 = v164->setColor; LOWORD(v316) = -156; BYTE2(v316) = -1; v238(v164, (const cocos2d::ccColor3B *)&v316); } cocos2d::CCLabelBMFont::limitLabelWidth(v164, 45.0, v117, 0.0); v168 = &v314[-1].m_pTargetArray; if ( &v314[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v286 = (unsigned int *)&v314[-1].m_nExtraKerning; do v287 = __ldaxr(v286); while ( __stlxr(v287 - 1, v286) ); } else { v287 = v314[-1].m_nExtraKerning; v314[-1].m_nExtraKerning = v287 - 1; } if ( v287 <= 0 ) operator delete(v168); } } v169 = v111->setPosition; v170 = (__int64)v111->getPosition(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 0.0, 1.0); cocos2d::CCPoint::operator+(&v316, v170, &v315); v169(v111, (const cocos2d::CCPoint *)&v316); v171 = v5->getPosition(v5)->x; v172 = v5->getContentSize(v5)->width; v173 = (float)(v171 + (float)(v172 * v5->getScale(v5))) + 10.0; v174 = (__int64)v5->getPosition(v5); cocos2d::CCPoint::CCPoint(&v313, v173, *(float *)(v174 + 4) - 1.0); if ( a1->m_compactView ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 16.0, 10.0); cocos2d::CCPoint::operator=(&v313, v229, v230); } if ( hasCompletedLevel ) { v227 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png"); if ( !a1->m_compactView ) { v239 = v227->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v239(v227, (const cocos2d::CCPoint *)&v316); } a1->m_mainLayer->addChild(a1->m_mainLayer, v227); v227->setPosition(v227, &v313); if ( a1->m_compactView ) LODWORD(v228) = 0.5; else LODWORD(v228) = 1061997773; v227->setScale(v227, v228); } else if ( v293 ) { NormalPercent = GJGameLevel::getNormalPercent(v293); if ( NormalPercent ) { v248 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%%", (const char *)NormalPercent); cocos2d::CCString::getCString(v248); v249 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v249, 10); if ( a1->m_compactView ) LODWORD(v250) = 1053609165; else LODWORD(v250) = 1058642330; v249->setScale(v249, v250); if ( a1->m_compactView ) { v251 = 1.0; v252 = v249->setPosition; } else { v288 = v249->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v288(v249, (const cocos2d::CCPoint *)&v316); v252 = v249->setPosition; if ( a1->m_compactView ) v251 = 1.0; else v251 = 0.0; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v251, 0.0); cocos2d::CCPoint::operator+(&v316, &v313, &v315); v252(v249, (const cocos2d::CCPoint *)&v316); } } if ( a1->m_compactView ) { v176 = 14.4; v177 = 0.8; } else { v176 = 18.0; v177 = 1.0; } v178 = v308.x; v179 = v294->getContentSize(v294)->width * 0.5; v180 = v294->getScale(v294); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v314, (float)(v178 + (float)(v179 * v180)) + (float)(v177 * 6.0), v308.y - 1.0); v181 = a1->m_level; if ( v181->m_originalLevel.random != v181->m_originalLevel.seed ) { v182 = cocos2d::CCSprite::createWithSpriteFrameName("collaborationIcon_001.png"); v183 = v182->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v183(v182, (const cocos2d::CCPoint *)&v316); a1->m_mainLayer->addChild(a1->m_mainLayer, v182); v182->setPosition(v182, (const cocos2d::CCPoint *)&v314); v182->setScale(v182, v177); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, 15.0, 0.0); cocos2d::CCPoint::operator+(&v316, &v314, &v315); cocos2d::CCPoint::operator=(&v314, v184, v185); v181 = a1->m_level; } if ( v181->m_objectCount.random - v181->m_objectCount.seed > (int)&elf_hash_bucket[9874] ) { v231 = cocos2d::CCSprite::createWithSpriteFrameName("highObjectIcon_001.png"); v232 = v231->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v316, 0.0, 0.5); v232(v231, (const cocos2d::CCPoint *)&v316); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v231, 10); v231->setPosition(v231, (const cocos2d::CCPoint *)&v314); v231->setScale(v231, v177); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v315, v176, 0.0); cocos2d::CCPoint::operator+(&v316, &v314, &v315); cocos2d::CCPoint::operator=(&v314, v233, v234); v186 = v306; v187 = &v306[-1].m_pTargetArray; if ( &v306[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) goto LABEL_117; } else { v186 = v306; v187 = &v306[-1].m_pTargetArray; if ( &v306[-1].m_pTargetArray == (cocos2d::CCArray **)&qword_124B6B0 ) goto LABEL_117; } if ( &pthread_create ) { v235 = (unsigned int *)&v186[-1].m_nExtraKerning; do v236 = __ldaxr(v235); while ( __stlxr(v236 - 1, v235) ); } else { v236 = v186[-1].m_nExtraKerning; v186[-1].m_nExtraKerning = v236 - 1; } if ( v236 <= 0 ) operator delete(v187); LABEL_117: p_m_textOffset = &v304[-1].m_textOffset; if ( &v304[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_caption = (unsigned int *)&v304[-1].m_caption; do m_data = __ldaxr(p_m_caption); while ( __stlxr(m_data - 1, p_m_caption) ); } else { m_data = (int)v304[-1].m_caption.m_data.m_data; LODWORD(v304[-1].m_caption.m_data.m_data) = m_data - 1; } if ( m_data <= 0 ) operator delete(p_m_textOffset); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source