// // InfoLayer::init from 0x7e3c88 to 0x7e5908 (7296 bytes) // // 2 xrefs: // > InfoLayer::create @ 0x7e5aa4 // > @ 0xa8a38 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // bool InfoLayer::init(InfoLayer *a1, GJGameLevel *a2, GJUserScore *a3, GJLevelList *a4) { char v6; // w25 GameManager *v7; // x0 bool v8; // w0 _BOOL4 v9; // w24 GameManager *v10; // x0 float v11; // s12 cocos2d::CCDirector *v12; // x0 cocos2d::CCNode *v13; // x21 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x23 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 cocos2d::CCMenu *v16; // x0 cocos2d::CCLayer *m_mainLayer; // x3 double v18; // d0 cocos2d::CCString *v19; // x0 void *v20; // x0 cocos2d::CCLabelBMFont *v21; // x26 void (__fastcall *v22)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v23; // x0 CCMenuItemSpriteExtra *v24; // x26 void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 LoadingCircle *v26; // x0 LoadingCircle *m_loadingCircle; // x0 cocos2d::CCSprite *m_sprite; // x26 void (__fastcall *v29)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCMenu *v30; // x26 float v31; // s15 CCMenuItemSpriteExtra *v32; // x0 cocos2d::CCMenu_vtbl *v33; // x2 cocos2d::CCSprite *v34; // x28 CCMenuItemSpriteExtra *v35; // x0 cocos2d::CCMenu_vtbl *v36; // x2 CCMenuItemSpriteExtra *m_rightArrow; // x28 cocos2d::CCLabelBMFont *v38; // x0 cocos2d::CCLayer *v39; // x3 cocos2d::CCLabelBMFont *m_pageLabel; // x26 void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCDirector *v42; // x0 float v43; // s0 float v44; // s8 cocos2d::CCDirector *v45; // x0 float v46; // s0 cocos2d::CCLabelBMFont *v47; // x26 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCMenu *v49; // x26 CCMenuItemSpriteExtra *SpriteButton; // x0 CCMenuItemSpriteExtra_vtbl *v51; // x2 CCMenuItemSpriteExtra *v52; // x0 CCMenuItemSpriteExtra_vtbl *v53; // x2 const char *v54; // x6 cocos2d::CCNode *v55; // x0 CCMenuItemSpriteExtra *v56; // x0 cocos2d::CCMenu *v57; // x2 CCMenuItemSpriteExtra *m_commentsBtn; // x26 cocos2d::CCMenu *v59; // x28 void (__fastcall *v60)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v61; // x0 cocos2d::CCLabelBMFont *m_noComments; // x26 void (__fastcall *v63)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 unsigned int v64; // w26 GameManager *v65; // x0 cocos2d::CCSprite *v66; // x26 CCMenuItemSpriteExtra *v67; // x0 CCMenuItemSpriteExtra *m_refreshCommentsBtn; // x26 cocos2d::CCMenu *v69; // x27 void (__fastcall *v70)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 char *v71; // x0 GameManager *v73; // x0 bool GameVariable; // w0 GameManager *v75; // x0 unsigned int *v76; // x19 int v77; // w1 cocos2d::CCLabelBMFont *v78; // x26 void (__fastcall *v79)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 float v80; // s1 float v81; // s11 float v82; // s1 GJLevelList *m_levelList; // x1 int m_accountID; // w28 double v85; // d0 cocos2d::CCString *v86; // x0 __int64 v87; // x0 float v88; // s1 float x; // s9 float v90; // s9 float v91; // s9 __int64 v92; // x0 float v93; // s9 float v94; // s0 float v95; // s1 void (__fastcall *v96)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCNode *v98; // x23 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 GJLevelList *v100; // x0 unsigned __int64 v101; // x21 size_t v102; // x2 int v103; // w26 __int64 v104; // x21 __int64 v105; // x23 unsigned __int64 v106; // x2 int v107; // w0 unsigned __int64 v108; // x23 float v109; // s8 cocos2d::CCNode *v110; // x26 void *v111; // x0 void (__fastcall *v112)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 void *v113; // x0 char *v114; // x0 char *v115; // x0 char *v116; // x0 unsigned int *v117; // x1 int v118; // w2 GJGameLevel *v119; // x0 GameManager *v120; // x0 const char *v121; // x6 cocos2d::CCSprite *v122; // x0 CCMenuItemSpriteExtra *v123; // x27 void (__fastcall *v124)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCMenu *m_buttonMenu; // x28 cocos2d::CCSprite *v126; // x0 CCMenuItemSpriteExtra *v127; // x0 CCMenuItemSpriteExtra *m_reportBtn; // x28 void (__fastcall *v129)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 GameLevelManager *v130; // x26 int ID; // w0 _BOOL4 v132; // w26 void (*v133)(void); // x2 char *v134; // x0 cocos2d::CCArray **p_m_pTargetArray; // x0 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 GameLevelManager *v138; // x0 cocos2d::CCSprite *v139; // x0 CCMenuItemSpriteExtra *v140; // x26 cocos2d::CCMenu *v141; // x28 void (__fastcall *v142)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 CCMenuItemSpriteExtra *v143; // x0 ButtonSprite *v144; // x0 CCMenuItemSpriteExtra *v145; // x0 ButtonSprite *v146; // x28 GameManager *v147; // x0 bool v148; // w0 const char *v149; // x1 size_t v150; // x0 cocos2d::CCNode *v151; // x23 CCMenuItemSpriteExtra *v152; // x26 void (__fastcall *v153)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v154; // x27 float v155; // s8 float v156; // s0 unsigned int *v157; // x3 int v158; // w1 unsigned int *v159; // x1 int v160; // w2 GJGameLevel *m_level; // x1 int random; // w2 int seed; // w0 unsigned int *v164; // x1 int v165; // w2 GameManager *v166; // x0 unsigned int *v167; // x1 int v168; // w2 unsigned int *v169; // x1 int v170; // w2 unsigned int *v171; // x1 int v172; // w2 unsigned int *v173; // x1 int v174; // w2 GameLevelManager *v175; // x0 unsigned __int64 v176; // [xsp+A8h] [xbp+A8h] char *v177; // [xsp+B0h] [xbp+B0h] char *v178; // [xsp+B0h] [xbp+B0h] CCMenuItemSpriteExtra *v179; // [xsp+C0h] [xbp+C0h] CCMenuItemSpriteExtra *m_leftArrow; // [xsp+C8h] [xbp+C8h] void (__fastcall *v181)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+C8h] [xbp+C8h] __int64 v182; // [xsp+C8h] [xbp+C8h] cocos2d::CCMenu *v183; // [xsp+D0h] [xbp+D0h] cocos2d::CCSprite *v184; // [xsp+D0h] [xbp+D0h] cocos2d::CCLabelBMFont *v185; // [xsp+D0h] [xbp+D0h] cocos2d::CCLabelBMFont *v186; // [xsp+D0h] [xbp+D0h] cocos2d::CCLabelBMFont *v187; // [xsp+D0h] [xbp+D0h] cocos2d::CCMenu *v188; // [xsp+D0h] [xbp+D0h] int v190; // [xsp+E0h] [xbp+E0h] float v192; // [xsp+100h] [xbp+100h] float v193; // [xsp+104h] [xbp+104h] cocos2d::CCLabelBMFont *v194; // [xsp+108h] [xbp+108h] BYREF char *v195; // [xsp+110h] [xbp+110h] BYREF cocos2d::CCPoint v196; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCPoint v197; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCSize v198; // [xsp+128h] [xbp+128h] BYREF char *v199; // [xsp+130h] [xbp+130h] BYREF char *v200; // [xsp+138h] [xbp+138h] BYREF char *v201; // [xsp+140h] [xbp+140h] BYREF cocos2d::CCPoint v202; // [xsp+148h] [xbp+148h] BYREF char *v203; // [xsp+150h] [xbp+150h] BYREF cocos2d::CCRect v204; // [xsp+158h] [xbp+158h] BYREF cocos2d::CCRect v205; // [xsp+168h] [xbp+168h] BYREF cocos2d::CCPoint v206; // 0:kr08_8.8 cocos2d::CCPoint v207; // 0:kr10_8.8 cocos2d::CCPoint v208; // 0:kr18_8.8 cocos2d::CCPoint v209; // 0:kr20_8.8 cocos2d::CCPoint v210; // 0:kr28_8.8 cocos2d::CCPoint v211; // 0:kr30_8.8 cocos2d::CCPoint v212; // 0:kr38_8.8 cocos2d::CCPoint v213; // 0:kr40_8.8 cocos2d::CCPoint v214; // 0:kr48_8.8 cocos2d::SEL_MenuHandler v215; // 0:x2.16 cocos2d::SEL_MenuHandler v216; // 0:x2.16 cocos2d::SEL_MenuHandler v217; // 0:x2.16 cocos2d::SEL_MenuHandler v218; // 0:x2.16 cocos2d::SEL_MenuHandler v219; // 0:x2.16 cocos2d::SEL_MenuHandler v220; // 0:x2.16 cocos2d::SEL_MenuHandler v221; // 0:x2.16 cocos2d::SEL_MenuHandler v222; // 0:x2.16 cocos2d::SEL_MenuHandler v223; // 0:x2.16 cocos2d::SEL_MenuHandler v224; // 0:x2.16 cocos2d::SEL_MenuHandler v225; // 0:x2.16 cocos2d::SEL_MenuHandler v226; // 0:x2.16 cocos2d::SEL_MenuHandler v227; // 0:x2.16 cocos2d::SEL_MenuHandler v228; // 0:x2.16 cocos2d::CCPoint v229; // 0:s1.4,4:s2.4 cocos2d::CCPoint v230; // 0:s1.4,4:s2.4 cocos2d::CCPoint v231; // 0:s1.4,4:s2.4 cocos2d::CCPoint v232; // 0:s1.4,4:s2.4 cocos2d::CCRect v233; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v234; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v6 = FLAlertLayer::init(a1, 0x96u); if ( !v6 ) return v6; if ( a3 ) { a1->m_score = a3; cocos2d::CCObject::retain(a3); a1->m_mode = (unsigned int)&dword_0 + 1; } else { if ( a4 ) { a1->m_levelList = a4; cocos2d::CCObject::retain(a4); a1->m_mode = (unsigned int)&dword_0 + 2; v73 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v73, "0075"); v9 = GameVariable; if ( !GameVariable ) goto LABEL_5; LABEL_23: v75 = GameManager::sharedState(); GameManager::setGameVariable(v75, "0089", 0); goto LABEL_5; } a1->m_level = a2; cocos2d::CCObject::retain(a2); a1->m_mode = 0; } v7 = GameManager::sharedState(); v8 = GameManager::getGameVariable(v7, "0075"); v9 = v8; if ( v8 ) goto LABEL_23; LABEL_5: v10 = GameManager::sharedState(); if ( GameManager::getGameVariable(v10, "0089") || a1->m_score ) { v190 = (unsigned int)&dword_0 + 1; v11 = -4.0; } else { v190 = 0; v11 = -53.0; } GameLevelManager::sharedState()->m_commentUploadDelegate = &a1->CommentUploadDelegate; v12 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v12); cocos2d::CCRect::CCRect(&v205, 0.0, 0.0, 80.0, 80.0); v13 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v205, v233); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v13->__vftable[1].~CCNode_0)(v13, 0xFFFFFFFFLL); setContentSize = v13->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v205, 440.0, 290.0); setContentSize(v13, (const cocos2d::CCSize *)&v205); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v13, -1); setPosition = v13->setPosition; cocos2d::CCPoint::CCPoint(&v205.origin, v192 * 0.5, v193 * 0.5); setPosition(v13, &v205.origin); v16 = cocos2d::CCMenu::create(); m_mainLayer = a1->m_mainLayer; a1->m_buttonMenu = v16; m_mainLayer->addChild_0(m_mainLayer, v16, 10); if ( a1->m_score ) { *(_QWORD *)&v18 = sub_D18D28(&v205).n128_u64[0]; v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s's comments", *(const char **)&v205.origin, v18); cocos2d::CCString::getCString(v19); v20 = (void *)(*(_QWORD *)&v205.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v205.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v159 = (unsigned int *)(*(_QWORD *)&v205.origin - 8LL); do v160 = __ldaxr(v159); while ( __stlxr(v160 - 1, v159) ); } else { v160 = *(_DWORD *)(*(_QWORD *)&v205.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v205.origin - 8LL) = v160 - 1; } if ( v160 <= 0 ) operator delete(v20); } v21 = cocos2d::CCLabelBMFont::create(); v22 = v21->setPosition; cocos2d::CCPoint::CCPoint(&v205.origin, v192 * 0.5, (float)((float)(v193 * 0.5) + 145.0) - 16.0); v22(v21, &v205.origin); cocos2d::CCLabelBMFont::limitLabelWidth(v21, 180.0, 0.55, 0.0); a1->m_mainLayer->addChild(a1->m_mainLayer, v21); goto LABEL_11; } sub_D18D28(&v194); v78 = cocos2d::CCLabelBMFont::create(); v79 = v78->setPosition; if ( v190 ) v80 = 16.0; else v80 = 20.0; cocos2d::CCPoint::CCPoint(&v205.origin, v192 * 0.5, (float)((float)(v193 * 0.5) + 145.0) - v80); v79(v78, &v205.origin); if ( v190 ) { v81 = 150.0; v82 = 0.6; } else { v81 = 300.0; v82 = 1.0; } cocos2d::CCLabelBMFont::limitLabelWidth(v78, v81, v82, 0.0); m_levelList = a1->m_levelList; if ( m_levelList ) { m_accountID = m_levelList->m_accountID; } else { m_level = a1->m_level; random = m_level->m_accountID.random; seed = m_level->m_accountID.seed; m_accountID = random - seed; if ( random == seed ) { v175 = GameLevelManager::sharedState(); m_accountID = GameLevelManager::accountIDForUserID( v175, a1->m_level->m_userID.random - a1->m_level->m_userID.seed); } } *(_QWORD *)&v85 = sub_D18D28(&v195).n128_u64[0]; v86 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"By %s", v195, v85); cocos2d::CCString::getCString(v86); v187 = cocos2d::CCLabelBMFont::create(); v87 = (__int64)v78->getPosition(v78); cocos2d::CCPoint::CCPoint(&v196, v192 * 0.5, *(float *)(v87 + 4) - 26.0); if ( v190 ) v88 = 0.5; else v88 = 0.8; cocos2d::CCLabelBMFont::limitLabelWidth(v187, v81, v88, 0.0); if ( v190 ) { v78->getScaledContentSize(v78); x = v205.origin.x; v187->getScaledContentSize((cocos2d::CCNode *)&v204); v181 = v78->setPosition; v90 = -(float)((float)((float)((float)(x + v204.origin.x) + 15.0) * 0.5) - (float)(v192 * 0.5)); ((void (__fastcall *)(cocos2d::CCRect *__return_ptr, cocos2d::CCLabelBMFont *))v78->getScaledContentSize)( &v204, v78); v91 = v90 + (float)(v204.origin.x * 0.5); v92 = (__int64)v78->getPosition(v78); cocos2d::CCPoint::CCPoint(&v205.origin, v91, *(float *)(v92 + 4)); v181(v78, &v205.origin); v182 = (__int64)v78->getPosition(v78); ((void (__fastcall *)(cocos2d::CCPoint *__return_ptr, cocos2d::CCLabelBMFont *))v78->getScaledContentSize)( &v202, v78); v93 = v202.x * 0.5; ((void (__fastcall *)(char **__return_ptr, cocos2d::CCLabelBMFont *))v187->getScaledContentSize)(&v203, v187); cocos2d::CCPoint::CCPoint(&v204.origin, (float)(v93 + (float)(*(float *)&v203 * 0.5)) + 15.0, 0.0); cocos2d::CCPoint::operator+(&v205, v182, &v204); cocos2d::CCPoint::operator=(&v196, v94, v95); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v78, 20); v222.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v222.adj = (size_t)InfoLayer::onMore; v179 = CCMenuItemSpriteExtra::create(v187, nullptr, v222); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v179); v96 = v179->setPosition; v211 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v196); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v96)(v179, &v205, v211.x, v211.y); if ( !m_accountID ) { setColor = v187->setColor; LOWORD(v205.origin.x) = -166; BYTE2(v205.origin.x) = -1; setColor(v187, (const cocos2d::ccColor3B *)&v205); v179->setEnabled(v179, 0); } cocos2d::CCPoint::CCPoint(&v197, v192 * 0.5, (float)(v193 * 0.5) + 52.0); if ( !v190 ) { cocos2d::CCRect::CCRect(&v204, 0.0, 0.0, 80.0, 80.0); cocos2d::CCRect::CCRect(&v205, &v204); v98 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v205, v234); cocos2d::CCSize::CCSize(&v198, 340.0, 55.0); v98->setContentSize(v98, &v198); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v98, -1); v98->setPosition(v98, &v197); getTag = v98->__vftable[1].getTag; LOWORD(v205.origin.x) = 16514; BYTE2(v205.origin.x) = 33; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v98, &v205); sub_D153B8((int)&v199, "(No description provided)"); v100 = a1->m_levelList; if ( v100 ) GJLevelList::getUnpackedDescription(v100, &v200); else GJGameLevel::getUnpackedLevelDescription((__int64 *)&v200, a1->m_level); sub_D153B8((int)&v203, &byte_F288A0); v177 = v203; v101 = *((_QWORD *)v200 - 3); v176 = *((_QWORD *)v203 - 3); if ( v176 > v101 ) v102 = *((_QWORD *)v200 - 3); else v102 = *((_QWORD *)v203 - 3); v103 = memcmp(v200, v203, v102); if ( !v103 ) { v103 = 0x7FFFFFFF; v104 = v101 - v176; if ( v104 <= 0x7FFFFFFF ) { if ( v104 >= (__int64)0xFFFFFFFF80000000LL ) v103 = v104; else v103 = 0x80000000; } } if ( v177 - 24 == (char *)&qword_124B6B0 ) goto LABEL_50; if ( &pthread_create ) { v157 = (unsigned int *)(v177 - 8); do v158 = __ldaxr(v157); while ( __stlxr(v158 - 1, v157) ); } else { v158 = *((_DWORD *)v177 - 2); *((_DWORD *)v177 - 2) = v158 - 1; } if ( v158 > 0 ) { LABEL_50: if ( !v103 ) { LABEL_51: sub_D153B8((int)&v201, byte_EBED68); sub_D153B8((int)&v202, &byte_F288A0); while ( 1 ) { v105 = sub_D1641C((int)&v199, v201); if ( v105 == -1 ) break; ((void (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD))sub_D1861C)( &v199, v105, *((_QWORD *)v201 - 3), v202, *(_QWORD *)(*(_QWORD *)&v202 - 24LL)); } if ( a1->m_levelList ) { v106 = 300; v107 = 300; } else { v106 = 180; v107 = 180; } v108 = *((_QWORD *)v199 - 3); if ( v108 <= v106 ) { if ( v108 <= 0x46 ) { v109 = 1.0; LABEL_59: sub_D153B8((int)&v205, v199); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, 0.5, 0.5); v110 = (cocos2d::CCNode *)TextArea::create( (__int64)&v205, "chatFont.fnt", (const cocos2d::CCPoint *)&v203, 1, 1.0, 295.0 / v109, 20.0); v111 = (void *)(*(_QWORD *)&v205.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v205.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v167 = (unsigned int *)(*(_QWORD *)&v205.origin - 8LL); do v168 = __ldaxr(v167); while ( __stlxr(v168 - 1, v167) ); } else { v168 = *(_DWORD *)(*(_QWORD *)&v205.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v205.origin - 8LL) = v168 - 1; } if ( v168 <= 0 ) operator delete(v111); } a1->m_mainLayer->addChild(a1->m_mainLayer, v110); v112 = v110->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v203, 0.0, 1.0); cocos2d::CCPoint::operator+(&v205, &v197, &v203); v112(v110, &v205.origin); v110->setScale(v110, v109); v113 = (void *)(*(_QWORD *)&v202 - 24LL); if ( (__int64 *)(*(_QWORD *)&v202 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v173 = (unsigned int *)(*(_QWORD *)&v202 - 8LL); do v174 = __ldaxr(v173); while ( __stlxr(v174 - 1, v173) ); } else { v174 = *(_DWORD *)(*(_QWORD *)&v202 - 8LL); *(_DWORD *)(*(_QWORD *)&v202 - 8LL) = v174 - 1; } if ( v174 <= 0 ) operator delete(v113); } v114 = v201 - 24; if ( v201 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v171 = (unsigned int *)(v201 - 8); do v172 = __ldaxr(v171); while ( __stlxr(v172 - 1, v171) ); } else { v172 = *((_DWORD *)v201 - 2); *((_DWORD *)v201 - 2) = v172 - 1; } if ( v172 <= 0 ) operator delete(v114); } v115 = v200 - 24; if ( v200 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v169 = (unsigned int *)(v200 - 8); do v170 = __ldaxr(v169); while ( __stlxr(v170 - 1, v169) ); } else { v170 = *((_DWORD *)v200 - 2); *((_DWORD *)v200 - 2) = v170 - 1; } if ( v170 <= 0 ) operator delete(v115); } v116 = v199 - 24; if ( v199 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v117 = (unsigned int *)(v199 - 8); do v118 = __ldaxr(v117); while ( __stlxr(v118 - 1, v117) ); } else { v118 = *((_DWORD *)v199 - 2); *((_DWORD *)v199 - 2) = v118 - 1; } if ( v118 <= 0 ) operator delete(v116); } goto LABEL_69; } } else { LODWORD(v108) = v107; } v109 = (float)((float)((float)(180 - (int)v108) / (float)v107) * 0.3) + 0.7; goto LABEL_59; } } else { operator delete(v177 - 24); if ( !v103 ) goto LABEL_51; } v178 = v200; v150 = strlen(v200); sub_D1798C(&v199, v178, v150); goto LABEL_51; } LABEL_69: InfoLayer::setupLevelInfo(a1); if ( !v190 ) { v119 = a1->m_level; if ( v119 ) { if ( v119->m_originalLevel.random != v119->m_originalLevel.seed ) { v120 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v120, "0077") && a1->m_level->m_originalLevel.random - a1->m_level->m_originalLevel.seed != a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed ) { v151 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Original", (const char *)&qword_D8 + 4, 0, 0, 0.45, "bigFont.fnt", "GJ_button_01.png", v121, 25.0); v151->setScale(v151, 0.8); v228.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v228.adj = (size_t)InfoLayer::onOriginal; v152 = CCMenuItemSpriteExtra::create(v151, nullptr, v228); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v152); CCMenuItemSpriteExtra::setSizeMult(v152, 1.2); v153 = v152->setPosition; v154 = (__int64)v179->getPosition(v179); v155 = v187->getContentSize(v187)->width * 0.5; v156 = v187->getScale(v187); cocos2d::CCPoint::CCPoint(&v204.origin, (float)(v155 * v156) + 70.0, 0.0); cocos2d::CCPoint::operator+(&v205, v154, &v204); v153(v152, &v205.origin); } } } } v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_chatBtn_001.png"); v223.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v223.adj = (size_t)InfoLayer::onComment; v123 = CCMenuItemSpriteExtra::create(v122, nullptr, v223); CCMenuItemSpriteExtra::setSizeMult(v123, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v123); v124 = v123->setPosition; m_buttonMenu = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint( &v204.origin, (float)((float)(v192 * 0.5) + 220.0) - 10.0, (float)((float)(v193 * 0.5) + -145.0) + 10.0); v212 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v124)(v123, &v205, v212.x, v212.y); v126 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); v224.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v224.adj = (size_t)InfoLayer::confirmReport; v127 = CCMenuItemSpriteExtra::create(v126, nullptr, v224); a1->m_reportBtn = v127; CCMenuItemSpriteExtra::setSizeMult(v127, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_reportBtn); m_reportBtn = a1->m_reportBtn; v188 = a1->m_buttonMenu; v129 = m_reportBtn->setPosition; cocos2d::CCPoint::CCPoint( &v204.origin, (float)((float)(v192 * 0.5) + -220.0) + 10.0, (float)((float)(v193 * 0.5) + -145.0) + 10.0); v213 = cocos2d::CCNode::convertToNodeSpace(v188, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v129)( m_reportBtn, &v205, v213.x, v213.y); v130 = GameLevelManager::sharedState(); ID = InfoLayer::getID(a1); v132 = !GameLevelManager::hasReportedLevel(v130, ID); v133 = (void (*)(void))a1->m_reportBtn->getNormalImage(a1->m_reportBtn)->__vftable[1].getTag; if ( v132 ) { LOWORD(v205.origin.x) = -1; BYTE2(v205.origin.x) = -1; } else { memset(&v205, 75, 3); } v133(); a1->m_reportBtn->setEnabled(a1->m_reportBtn, v132); if ( v9 ) { v123->setVisible(v123, 0); v123->setEnabled(v123, 0); } v134 = v195 - 24; if ( v195 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v164 = (unsigned int *)(v195 - 8); do v165 = __ldaxr(v164); while ( __stlxr(v165 - 1, v164) ); } else { v165 = *((_DWORD *)v195 - 2); *((_DWORD *)v195 - 2) = v165 - 1; } if ( v165 <= 0 ) operator delete(v134); } p_m_pTargetArray = &v194[-1].m_pTargetArray; if ( &v194[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v194[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v194[-1].m_nExtraKerning; v194[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } LABEL_11: v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v215.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v215.adj = (size_t)InfoLayer::onClose; v24 = CCMenuItemSpriteExtra::create(v23, nullptr, v215); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v24); CCMenuItemSpriteExtra::setSizeMult(v24, 1.6); v25 = v24->setPosition; v183 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint( &v204.origin, (float)((float)(v192 * 0.5) + -220.0) + 10.0, (float)((float)(v193 * 0.5) + 145.0) - 10.0); v206 = cocos2d::CCNode::convertToNodeSpace(v183, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v25)(v24, &v205, v206.x, v206.y); v26 = LoadingCircle::create(); a1->m_loadingCircle = v26; v26->m_parentLayer = a1->m_mainLayer; m_loadingCircle = a1->m_loadingCircle; m_loadingCircle->m_fade = 0; cocos2d::CCObject::retain(m_loadingCircle); LoadingCircle::show(a1->m_loadingCircle); a1->m_loadingCircle->setVisible(a1->m_loadingCircle, 0); m_sprite = a1->m_loadingCircle->m_sprite; v29 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v205.origin, v192 * 0.5, v11 + (float)(v193 * 0.5)); v29(m_sprite, &v205.origin); v30 = cocos2d::CCMenu::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v30, 10); v31 = (float)(v193 * 0.5) + -53.0; v184 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); ((void (__fastcall *)(float))v184->setScale)(0.8); v216.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v216.adj = (size_t)InfoLayer::onPrevPage; v32 = CCMenuItemSpriteExtra::create(v184, nullptr, v216); v33 = v30->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_leftArrow = v32; ((void (__fastcall *)(cocos2d::CCMenu *))v33->addChild)(v30); m_leftArrow = a1->m_leftArrow; v185 = (cocos2d::CCLabelBMFont *)m_leftArrow->setPosition; cocos2d::CCPoint::CCPoint(&v204.origin, (float)(v192 * 0.5) + -195.0, v31); v207 = cocos2d::CCNode::convertToNodeSpace(v30, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v185)( m_leftArrow, &v205, v207.x, v207.y); CCMenuItemSpriteExtra::setSizeMult(a1->m_leftArrow, 2.0); v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v34, 1); v34->setScale(v34, 0.8); v217.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v217.adj = (size_t)InfoLayer::onNextPage; v35 = CCMenuItemSpriteExtra::create(v34, nullptr, v217); v36 = v30->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_rightArrow = v35; ((void (__fastcall *)(cocos2d::CCMenu *))v36->addChild)(v30); m_rightArrow = a1->m_rightArrow; v186 = (cocos2d::CCLabelBMFont *)m_rightArrow->setPosition; cocos2d::CCPoint::CCPoint(&v204.origin, (float)(v192 * 0.5) + 195.0, v31); v208 = cocos2d::CCNode::convertToNodeSpace(v30, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v186)( m_rightArrow, &v205, v208.x, v208.y); CCMenuItemSpriteExtra::setSizeMult(a1->m_rightArrow, 2.0); a1->m_leftArrow->setVisible(a1->m_leftArrow, 0); a1->m_rightArrow->setVisible(a1->m_rightArrow, 0); v38 = cocos2d::CCLabelBMFont::create(); v39 = a1->m_mainLayer; a1->m_pageLabel = v38; v39->addChild_0(v39, v38, 10); m_pageLabel = a1->m_pageLabel; v41 = m_pageLabel->setPosition; v42 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v42); v44 = v43; v45 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v45); cocos2d::CCPoint::CCPoint(&v205.origin, v44 - 7.0, v46 - 2.0); v41(m_pageLabel, &v205.origin); v47 = a1->m_pageLabel; setAnchorPoint = v47->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v205.origin, 1.0, 1.0); setAnchorPoint(v47, &v205.origin); a1->m_pageLabel->setScale(a1->m_pageLabel, 0.4); v49 = cocos2d::CCMenu::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v49, 10); cocos2d::CCPoint::CCPoint(&v205.origin, 0.0, -0.5); v218.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleCommentMode; v218.adj = 0; SpriteButton = InfoLayer::getSpriteButton(a1, "GJ_likesIcon_001.png", v218, v49, 0.7, v229); v51 = SpriteButton->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_likeBtn = SpriteButton; v51->setTag(SpriteButton, 0); cocos2d::CCPoint::CCPoint(&v205.origin, 0.0, -1.0); v219.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleCommentMode; v219.adj = 0; v52 = InfoLayer::getSpriteButton(a1, "GJ_timeIcon_001.png", v219, v49, 0.7, v230); v53 = v52->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_timeBtn = v52; v53->setTag(v52, 1); if ( a1->m_score ) { if ( v9 ) goto LABEL_13; } else { if ( v9 ) goto LABEL_13; cocos2d::CCPoint::CCPoint(&v205.origin, 0.0, -1.0); v226.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleExtendedMode; v226.adj = 0; v143 = InfoLayer::getSpriteButton(a1, "GJ_extendedIcon_001.png", v226, v49, 0.7, v231); v144 = (ButtonSprite *)v143->getNormalImage(v143); if ( v190 ) ButtonSprite::updateBGImage(v144, "GJ_button_02.png"); else ButtonSprite::updateBGImage(v144, "GJ_button_01.png"); } cocos2d::CCPoint::CCPoint(&v205.origin, 0.0, -1.5); v227.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleSmallCommentMode; v227.adj = 0; v145 = InfoLayer::getSpriteButton(a1, "GJ_smallModeIcon_001.png", v227, v49, 0.7, v232); v146 = (ButtonSprite *)v145->getNormalImage(v145); v147 = GameManager::sharedState(); v148 = GameManager::getGameVariable(v147, "0088"); v149 = "GJ_button_01.png"; if ( v148 ) v149 = "GJ_button_02.png"; ButtonSprite::updateBGImage(v146, v149); LABEL_13: InfoLayer::updateCommentModeButtons(a1); cocos2d::CCPoint::CCPoint(&v202, (float)(v192 * 0.5) + -195.0, (float)((float)(v193 * 0.5) + 145.0) - 110.0); v49->setPosition(v49, &v202); cocos2d::CCMenu::alignItemsVerticallyWithPadding(v49, 4.0); v55 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Load Comments", (const char *)&qword_D8 + 4, 0, 0, 0.6, "bigFont.fnt", "GJ_button_01.png", v54, 25.0); v220.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v220.adj = (size_t)InfoLayer::onGetComments; v56 = CCMenuItemSpriteExtra::create(v55, nullptr, v220); v57 = a1->m_buttonMenu; a1->m_commentsBtn = v56; v57->addChild(v57, v56); CCMenuItemSpriteExtra::setSizeMult(a1->m_commentsBtn, 2.0); m_commentsBtn = a1->m_commentsBtn; v59 = a1->m_buttonMenu; v60 = m_commentsBtn->setPosition; cocos2d::CCPoint::CCPoint(&v204.origin, v192 * 0.5, v11 + (float)(v193 * 0.5)); v209 = cocos2d::CCNode::convertToNodeSpace(v59, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v60)( m_commentsBtn, &v205, v209.x, v209.y); PlatformToolbox::isNetworkAvailable(); v61 = cocos2d::CCLabelBMFont::create(); a1->m_noComments = v61; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v61, 10); m_noComments = a1->m_noComments; v63 = m_noComments->setPosition; cocos2d::CCPoint::CCPoint(&v205.origin, v192 * 0.5, v11 + (float)(v193 * 0.5)); v63(m_noComments, &v205.origin); a1->m_noComments->setScale(a1->m_noComments, 0.8); a1->m_noComments->setVisible(a1->m_noComments, 0); if ( !PlatformToolbox::isNetworkAvailable() ) { a1->m_noComments->setVisible(a1->m_noComments, 1); a1->m_commentsBtn->setVisible(a1->m_commentsBtn, 0); } GameLevelManager::sharedState(); v64 = InfoLayer::getID(a1); v65 = GameManager::sharedState(); GameManager::getGameVariable(v65, "0069"); GameLevelManager::getCommentKey((const char *)v64, (__int64)&v203); if ( !v9 ) { v138 = GameLevelManager::sharedState(); if ( GameLevelManager::getStoredLevelComments(v138, v203) || (v166 = GameManager::sharedState(), GameManager::getGameVariable(v166, "0090")) ) { InfoLayer::loadPage(a1, 0, 0); if ( a1->m_score ) goto LABEL_17; LABEL_86: v139 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v225.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v225.adj = (size_t)InfoLayer::onLevelInfo; v140 = CCMenuItemSpriteExtra::create(v139, nullptr, v225); CCMenuItemSpriteExtra::setSizeMult(v140, 2.0); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v140); v141 = a1->m_buttonMenu; v142 = v140->setPosition; cocos2d::CCPoint::CCPoint( &v204.origin, (float)((float)(v192 * 0.5) + 220.0) - 17.0, (float)((float)(v193 * 0.5) + 145.0) - 17.0); v214 = cocos2d::CCNode::convertToNodeSpace(v141, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v142)(v140, &v205, v214.x, v214.y); goto LABEL_17; } } InfoLayer::setupCommentsBrowser(a1, nullptr); if ( !a1->m_score ) goto LABEL_86; LABEL_17: v66 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v66->setScale(v66, 0.6); v221.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v221.adj = (size_t)InfoLayer::onRefreshComments; v67 = CCMenuItemSpriteExtra::create(v66, nullptr, v221); a1->m_refreshCommentsBtn = v67; CCMenuItemSpriteExtra::setSizeMult(v67, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_refreshCommentsBtn); m_refreshCommentsBtn = a1->m_refreshCommentsBtn; v69 = a1->m_buttonMenu; v70 = m_refreshCommentsBtn->setPosition; cocos2d::CCPoint::CCPoint(&v204.origin, (float)(v192 * 0.5) + 195.0, (float)(v193 * 0.5) + 0.0); v210 = cocos2d::CCNode::convertToNodeSpace(v69, &v204.origin); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v70)( m_refreshCommentsBtn, &v205, v210.x, v210.y); if ( v9 ) { a1->m_refreshCommentsBtn->setVisible(a1->m_refreshCommentsBtn, 0); a1->m_refreshCommentsBtn->setEnabled(a1->m_refreshCommentsBtn, 0); a1->m_noComments->setVisible(a1->m_noComments, 0); a1->m_commentsBtn->setVisible(a1->m_commentsBtn, 0); a1->m_likeBtn->setVisible(a1->m_likeBtn, 0); a1->m_likeBtn->setEnabled(a1->m_likeBtn, 0); a1->m_timeBtn->setVisible(a1->m_timeBtn, 0); a1->m_timeBtn->setEnabled(a1->m_timeBtn, 0); } v71 = v203 - 24; if ( v203 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v76 = (unsigned int *)(v203 - 8); do v77 = __ldaxr(v76); while ( __stlxr(v77 - 1, v76) ); } else { v77 = *((_DWORD *)v203 - 2); *((_DWORD *)v203 - 2) = v77 - 1; } if ( v77 <= 0 ) operator delete(v71); } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source