// // InfoLayer::init from 0x4301a0 to 0x431456 (4790 bytes) // // 1 xrefs: // > InfoLayer::create @ 0x431588 // // 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) { CommentKeyType v8; // r3 GameManager *v9; // r0 GameManager *v10; // r0 GameManager *v11; // r0 float v12; // s19 GJUserScore *m_score; // r3 cocos2d::CCDirector *v14; // r0 cocos2d::CCNode *v15; // r10 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCMenu *v18; // r0 cocos2d::CCString *v19; // r0 cocos2d::CCLabelBMFont *v20; // r6 void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v22; // r7 void (__fastcall *v23)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 float v24; // s15 float v25; // r10 float v26; // r2 GJLevelList *m_levelList; // r3 int m_accountID; // r9 GJGameLevel *m_level; // r3 int random; // r2 int seed; // r3 GameLevelManager *v32; // r0 cocos2d::CCString *v33; // r0 cocos2d::CCLabelBMFont *v34; // r6 float v35; // s17 int v36; // r0 float v37; // r2 float x; // s17 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float v40; // s17 float v41; // s17 int v42; // r0 int v43; // r11 float v44; // s17 int v45; // r2 bool v46; // r3 CCMenuItemSpriteExtra *v47; // r7 void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2 cocos2d::CCNode *v50; // r10 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r3 GJLevelList *v52; // r1 int i; // r2 int v54; // r10 unsigned int v55; // r3 int v56; // r2 float v57; // s17 cocos2d::CCNode *v58; // r8 void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 GJGameLevel *v60; // r3 GameManager *v61; // r0 ButtonSprite *v62; // r10 CCMenuItemSpriteExtra *v63; // r10 void (__fastcall *v64)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v65; // r7 float v66; // s17 float v67; // r0 cocos2d::CCSprite *v68; // r0 CCMenuItemSpriteExtra *v69; // r6 cocos2d::CCMenu *m_buttonMenu; // r10 void (__fastcall *v71)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCSprite *v72; // r0 CCMenuItemSpriteExtra *v73; // r0 CCMenuItemSpriteExtra *m_reportBtn; // r7 cocos2d::CCMenu *v75; // r11 void (__fastcall *v76)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 GameLevelManager *v77; // r7 int ID; // r0 _BOOL4 v79; // r7 cocos2d::CCNode *v80; // r0 int (__fastcall *v81)(const cocos2d::CCObject *__hidden); // r2 cocos2d::CCSprite *v82; // r0 CCMenuItemSpriteExtra *v83; // r11 cocos2d::CCMenu *v84; // r10 void (__fastcall *v85)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 LoadingCircle *v86; // r0 cocos2d::CCLayer *m_mainLayer; // r3 LoadingCircle *m_loadingCircle; // r0 cocos2d::CCSprite *m_sprite; // r10 void (__fastcall *v90)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v91; // r9 float v92; // s17 cocos2d::CCSprite *v93; // r11 CCMenuItemSpriteExtra *v94; // r0 cocos2d::CCMenu_vtbl *v95; // r3 void (__fastcall *v96)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v97; // r10 CCMenuItemSpriteExtra *v98; // r0 cocos2d::CCMenu_vtbl *v99; // r3 CCMenuItemSpriteExtra *m_rightArrow; // r11 void (__fastcall *v101)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCLabelBMFont *v102; // r0 cocos2d::CCLabelBMFont *m_pageLabel; // r10 void (__fastcall *v104)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCDirector *v105; // r0 float v106; // s22 cocos2d::CCDirector *v107; // r0 float v108; // r0 cocos2d::CCLabelBMFont *v109; // r10 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v111; // r9 CCMenuItemSpriteExtra *SpriteButton; // r0 CCMenuItemSpriteExtra_vtbl *v113; // r3 CCMenuItemSpriteExtra *v114; // r0 CCMenuItemSpriteExtra_vtbl *v115; // r3 CCMenuItemSpriteExtra *v116; // r0 ButtonSprite *v117; // r0 const char *v118; // r1 CCMenuItemSpriteExtra *v119; // r0 ButtonSprite *v120; // r7 GameManager *v121; // r0 const char *v122; // r1 ButtonSprite *v123; // r0 CCMenuItemSpriteExtra *v124; // r0 CCMenuItemSpriteExtra *m_commentsBtn; // r10 cocos2d::CCMenu *v126; // r9 void (__fastcall *v127)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v128; // r0 cocos2d::CCLabelBMFont *m_noComments; // r7 void (__fastcall *v130)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 GameLevelManager *v131; // r9 const char *v132; // r7 GameManager *v133; // r0 _BOOL4 v134; // r0 GameLevelManager *v135; // r0 GameManager *v136; // r0 cocos2d::CCSprite *v137; // r6 CCMenuItemSpriteExtra *v138; // r0 CCMenuItemSpriteExtra *m_refreshCommentsBtn; // r5 cocos2d::CCMenu *v140; // r10 void (__fastcall *v141)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v143; // r0 CCMenuItemSpriteExtra *v144; // r9 cocos2d::CCMenu *v145; // r11 void (__fastcall *v146)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float v147; // r2 float v148; // r3 cocos2d::CCPoint v149; // [sp+8h] [bp-CCh] cocos2d::CCPoint v150; // [sp+8h] [bp-CCh] cocos2d::CCPoint v151; // [sp+8h] [bp-CCh] _BOOL4 v152; // [sp+10h] [bp-C4h] _BOOL4 GameVariable; // [sp+14h] [bp-C0h] int v154; // [sp+18h] [bp-BCh] int v155; // [sp+20h] [bp-B4h] CCMenuItemSpriteExtra *m_leftArrow; // [sp+20h] [bp-B4h] char *v157; // [sp+28h] [bp-ACh] BYREF cocos2d::CCSize v158; // [sp+2Ch] [bp-A8h] BYREF cocos2d::CCPoint v159; // [sp+34h] [bp-A0h] BYREF cocos2d::CCPoint v160; // [sp+3Ch] [bp-98h] BYREF cocos2d::CCPoint v161; // [sp+44h] [bp-90h] BYREF void (*v162)(InfoLayer *, cocos2d::CCObject *); // [sp+4Ch] [bp-88h] int v163; // [sp+50h] [bp-84h] void (*v164)(InfoLayer *, cocos2d::CCObject *); // [sp+54h] [bp-80h] int v165; // [sp+58h] [bp-7Ch] void (*v166)(InfoLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-78h] int v167; // [sp+60h] [bp-74h] char *v168[2]; // [sp+64h] [bp-70h] BYREF char *v169[2]; // [sp+6Ch] [bp-68h] BYREF _DWORD v170[2]; // [sp+74h] [bp-60h] BYREF _DWORD v171[2]; // [sp+7Ch] [bp-58h] BYREF cocos2d::SEL_MenuHandler v172; // [sp+84h] [bp-50h] BYREF cocos2d::SEL_MenuHandler v173; // [sp+8Ch] [bp-48h] BYREF cocos2d::SEL_MenuHandler v174; // [sp+94h] [bp-40h] BYREF cocos2d::SEL_MenuHandler v175; // [sp+9Ch] [bp-38h] BYREF cocos2d::CCPoint v176; // [sp+A4h] [bp-30h] BYREF cocos2d::CCRect v177; // [sp+ACh] [bp-28h] BYREF cocos2d::CCRect v178; // [sp+BCh] [bp-18h] BYREF cocos2d::CCSize v179; // 0:^0.8 cocos2d::CCRect v180; // 0:kr00_16.16 cocos2d::CCRect v181; // 0:r2.8,8:^0.8 v154 = FLAlertLayer::init(a1, (cocos2d::_ccColor4B)150); if ( !v154 ) return v154; if ( a3 ) { a1->m_score = a3; cocos2d::CCObject::retain(a3); v8 = 1; LABEL_6: a1->m_mode = v8; goto LABEL_8; } if ( a4 ) { a1->m_levelList = a4; cocos2d::CCObject::retain(a4); v8 = User; goto LABEL_6; } a1->m_level = a2; cocos2d::CCObject::retain(a2); a1->m_mode = 0; LABEL_8: v9 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v9, "0075"); if ( GameVariable ) { v10 = GameManager::sharedState(); GameManager::setGameVariable(v10, "0089", 0); } v11 = GameManager::sharedState(); if ( GameManager::getGameVariable(v11, "0089") ) { v12 = -4.0; v152 = 1; } else { v12 = -4.0; m_score = a1->m_score; v152 = m_score != nullptr; if ( !m_score ) v12 = -53.0; } GameLevelManager::sharedState()->m_commentUploadDelegate = &a1->CommentUploadDelegate; v14 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v158, v14); cocos2d::CCRect::CCRect(&v178, 0.0, 0.0, 80.0, 80.0); v180.origin.x = v147; v180.origin.y = v148; v180.size = v179; v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v178, v180); ((void (__fastcall *)(cocos2d::CCNode *, int))v15->__vftable[1].~CCNode_0)(v15, 255); setContentSize = v15->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v178, 440.0, 290.0); setContentSize(v15, (const cocos2d::CCSize *)&v178); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, -1); setPosition = v15->setPosition; cocos2d::CCPoint::CCPoint(&v178.origin, v158.width * 0.5, v158.height * 0.5); setPosition(v15, &v178.origin); v18 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v18; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v18, 10); if ( a1->m_score ) { sub_775C20(&v178); v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s's comments", (const char *)LODWORD(v178.origin.x)); cocos2d::CCString::getCString(v19); sub_774008(&v178); v20 = cocos2d::CCLabelBMFont::create(); v21 = v20->setPosition; cocos2d::CCPoint::CCPoint(&v178.origin, v158.width * 0.5, (float)((float)(v158.height * 0.5) + 145.0) - 16.0); v21(v20, &v178.origin); cocos2d::CCLabelBMFont::limitLabelWidth(v20, 180.0, 0.55, 0.0); a1->m_mainLayer->addChild(a1->m_mainLayer, v20); goto LABEL_68; } sub_775C20(&v160); v22 = cocos2d::CCLabelBMFont::create(); v23 = v22->setPosition; v24 = 16.0; if ( !v152 ) v24 = 20.0; cocos2d::CCPoint::CCPoint(&v178.origin, v158.width * 0.5, (float)((float)(v158.height * 0.5) + 145.0) - v24); v23(v22, &v178.origin); if ( v152 ) v25 = 150.0; else v25 = 300.0; if ( v152 ) v26 = 0.6; else v26 = 1.0; cocos2d::CCLabelBMFont::limitLabelWidth(v22, v25, v26, 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 ) { v32 = GameLevelManager::sharedState(); m_accountID = GameLevelManager::accountIDForUserID(v32, a1->m_level->m_userID.random - a1->m_level->m_userID.seed); } } sub_775C20(&v161); v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"By %s", (const char *)LODWORD(v161.x)); cocos2d::CCString::getCString(v33); v34 = cocos2d::CCLabelBMFont::create(); v35 = v158.width * 0.5; v36 = (int)v22->getPosition(v22); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v173, v35, *(float *)(v36 + 4) - 26.0); if ( v152 ) v37 = 0.5; else v37 = 0.8; cocos2d::CCLabelBMFont::limitLabelWidth(v34, v25, v37, 0.0); if ( v152 ) { v22->getScaledContentSize((cocos2d::CCSize *)&v177, v22); x = v177.origin.x; v34->getScaledContentSize((cocos2d::CCSize *)&v178, v34); v39 = v22->setPosition; v40 = (float)(v158.width * 0.5) - (float)((float)((float)(x + v178.origin.x) + 15.0) * 0.5); v22->getScaledContentSize((cocos2d::CCSize *)&v177, v22); v41 = v40 + (float)(v177.origin.x * 0.5); v42 = (int)v22->getPosition(v22); cocos2d::CCPoint::CCPoint(&v178.origin, v41, *(float *)(v42 + 4)); v39(v22, &v178.origin); v43 = (int)v22->getPosition(v22); v22->getScaledContentSize((cocos2d::CCSize *)&v175, v22); v44 = *(float *)&v175.ptr * 0.5; v34->getScaledContentSize((cocos2d::CCSize *)&v176, v34); cocos2d::CCPoint::CCPoint(&v177.origin, (float)(v44 + (float)(v176.x * 0.5)) + 15.0, 0.0); cocos2d::CCPoint::operator+(&v178, v43, &v177); cocos2d::CCPoint::operator=((PlayerObject *)&v173, COERCE_FLOAT(&v178), v45, v46); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v22, 20); v163 = 0; v162 = InfoLayer::onMore; v47 = CCMenuItemSpriteExtra::create( v34, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onMore, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47); v48 = v47->setPosition; cocos2d::CCNode::convertToNodeSpace(&v178.origin, a1->m_buttonMenu, (const cocos2d::CCPoint *)&v173); v48(v47, &v178.origin); if ( !m_accountID ) { setColor = v34->setColor; LOWORD(v178.origin.x) = -166; BYTE2(v178.origin.x) = -1; setColor(v34, (const cocos2d::ccColor3B *)&v178); v47->setEnabled(v47, 0); } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v174, v158.width * 0.5, (float)(v158.height * 0.5) + 52.0); if ( !v152 ) { cocos2d::CCRect::CCRect(&v177, 0.0, 0.0, 80.0, 80.0); cocos2d::CCRect::CCRect(&v178, &v177); v50 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v178, v181); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v175, 340.0, 55.0); v50->setContentSize(v50, (const cocos2d::CCSize *)&v175); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v50, -1); v50->setPosition(v50, (const cocos2d::CCPoint *)&v174); getTag = v50->__vftable[1].getTag; LOWORD(v178.origin.x) = 16514; BYTE2(v178.origin.x) = 33; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v50, &v178); sub_776584((int)v168, "(No description provided)"); v52 = a1->m_levelList; if ( v52 ) GJLevelList::getUnpackedDescription((GJLevelList *)v169, (stl::StringData::Internal *)v52); else GJGameLevel::getUnpackedLevelDescription((GJGameLevel *)v169, (stl::StringData::Internal *)a1->m_level); sub_776584((int)v170, (char *)&unk_939830); v155 = sub_774DBC(v169, v170); sub_774008(v170); if ( v155 ) sub_7753D4((int)v168, v169[0]); sub_776584((int)v171, byte_965AA5); sub_776584((int)&v172, (char *)&unk_939830); for ( i = 0; ; i = *((_DWORD *)v172.ptr - 3) + v54 ) { v54 = sub_774834(v168, v171, i); if ( v54 == -1 ) break; sub_776454(v168, v54, *(_DWORD *)(v171[0] - 12), &v172); } v55 = *((_DWORD *)v168[0] - 3); if ( a1->m_levelList ) v56 = 300; else v56 = 180; if ( v55 > v56 ) { v55 = v56; } else if ( v55 <= 0x46 ) { v57 = 1.0; goto LABEL_55; } v57 = (float)((float)((float)(int)(180 - v55) / (float)v56) * 0.3) + 0.7; LABEL_55: sub_776584((int)&v176, v168[0]); cocos2d::CCPoint::CCPoint(&v178.origin, 0.5, 0.5); v58 = (cocos2d::CCNode *)TextArea::create( (TextArea *)&v176, (std::string)"chatFont.fnt", (const char *)0x3F800000, COERCE_INT(295.0 / v57), &v178.origin, (cocos2d::CCPoint)0x141A00000LL); sub_774008(&v176); a1->m_mainLayer->addChild(a1->m_mainLayer, v58); v59 = v58->setPosition; cocos2d::CCPoint::CCPoint(&v176, 0.0, 1.0); cocos2d::CCPoint::operator+(&v178, &v174, &v176); v59(v58, &v178.origin); v58->setScale(v58, COERCE_FLOAT(LODWORD(v57))); sub_774008(&v172); sub_774008(v171); sub_774008(v169); sub_774008(v168); } InfoLayer::setupLevelInfo(a1); if ( !v152 ) { v60 = a1->m_level; if ( v60 ) { if ( v60->m_originalLevel.random != v60->m_originalLevel.seed ) { v61 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v61, "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 ) { v62 = ButtonSprite::create( (ButtonSprite *)"Original", (const char *)off_DC, 0, 0.45, 0, "bigFont.fnt", "GJ_button_01.png", (const char *)0x41C80000, 0.0); ((void (__fastcall *)(ButtonSprite *, int))v62->setScale)(v62, 1061997773); v165 = 0; v164 = InfoLayer::onOriginal; v63 = CCMenuItemSpriteExtra::create( v62, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onOriginal, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v63); CCMenuItemSpriteExtra::setSizeMult(v63, 1.2); v64 = v63->setPosition; v65 = (int)v47->getPosition(v47); v66 = v34->getContentSize(v34)->width * 0.5; v67 = v34->getScale(v34); cocos2d::CCPoint::CCPoint(&v177.origin, (float)(v66 * v67) + 70.0, 0.0); cocos2d::CCPoint::operator+(&v178, v65, &v177); v64(v63, &v178.origin); } } } } v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_chatBtn_001.png"); v167 = 0; v166 = InfoLayer::onComment; v69 = CCMenuItemSpriteExtra::create( v68, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onComment, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v69, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v69); m_buttonMenu = a1->m_buttonMenu; v71 = v69->setPosition; cocos2d::CCPoint::CCPoint( &v177.origin, (float)((float)(v158.width * 0.5) + 220.0) - 10.0, (float)((float)(v158.height * 0.5) - 145.0) + 10.0); cocos2d::CCNode::convertToNodeSpace(&v178.origin, m_buttonMenu, &v177.origin); v71(v69, &v178.origin); v72 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); v168[1] = nullptr; v168[0] = (char *)InfoLayer::confirmReport; v73 = CCMenuItemSpriteExtra::create( v72, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::confirmReport, (unsigned int)a1)); a1->m_reportBtn = v73; CCMenuItemSpriteExtra::setSizeMult(v73, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_reportBtn); m_reportBtn = a1->m_reportBtn; v75 = a1->m_buttonMenu; v76 = m_reportBtn->setPosition; cocos2d::CCPoint::CCPoint( &v177.origin, (float)((float)(v158.width * 0.5) - 220.0) + 10.0, (float)((float)(v158.height * 0.5) - 145.0) + 10.0); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v75, &v177.origin); v76(m_reportBtn, &v178.origin); v77 = GameLevelManager::sharedState(); ID = InfoLayer::getID(a1); v79 = !GameLevelManager::hasReportedLevel(v77, ID); v80 = a1->m_reportBtn->getNormalImage(a1->m_reportBtn); v81 = v80->__vftable[1].getTag; if ( v79 ) { LOWORD(v178.origin.x) = -1; BYTE2(v178.origin.x) = -1; } else { memset(&v178, 75, 3); } v81(v80); a1->m_reportBtn->setEnabled(a1->m_reportBtn, v79); if ( GameVariable ) { v69->setVisible(v69, 0); v69->setEnabled(v69, 0); } sub_774008(&v161); sub_774008(&v160); LABEL_68: v82 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v169[1] = nullptr; v169[0] = (char *)InfoLayer::onClose; v83 = CCMenuItemSpriteExtra::create( v82, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v83); CCMenuItemSpriteExtra::setSizeMult(v83, 1.6); v84 = a1->m_buttonMenu; v85 = v83->setPosition; cocos2d::CCPoint::CCPoint( &v177.origin, (float)((float)(v158.width * 0.5) - 220.0) + 10.0, (float)((float)(v158.height * 0.5) + 145.0) - 10.0); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v84, &v177.origin); v85(v83, &v178.origin); v86 = LoadingCircle::create(); m_mainLayer = a1->m_mainLayer; a1->m_loadingCircle = v86; v86->m_parentLayer = 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; v90 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v178.origin, v158.width * 0.5, v12 + (float)(v158.height * 0.5)); v90(m_sprite, &v178.origin); v91 = cocos2d::CCMenu::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v91, 10); v92 = (float)(v158.height * 0.5) - 53.0; v93 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v93->setScale)(v93, 1061997773); v170[1] = 0; v170[0] = InfoLayer::onPrevPage; v94 = CCMenuItemSpriteExtra::create( v93, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onPrevPage, (unsigned int)a1)); v95 = v91->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_leftArrow = v94; v95->addChild(v91, v94); m_leftArrow = a1->m_leftArrow; v96 = m_leftArrow->setPosition; cocos2d::CCPoint::CCPoint(&v177.origin, (float)(v158.width * 0.5) - 195.0, v92); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v91, &v177.origin); v96(m_leftArrow, &v178.origin); CCMenuItemSpriteExtra::setSizeMult(a1->m_leftArrow, 2.0); v97 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v97, 1); ((void (__fastcall *)(cocos2d::CCSprite *, int))v97->setScale)(v97, 1061997773); v171[1] = 0; v171[0] = InfoLayer::onNextPage; v98 = CCMenuItemSpriteExtra::create( v97, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onNextPage, (unsigned int)a1)); v99 = v91->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_rightArrow = v98; v99->addChild(v91, v98); m_rightArrow = a1->m_rightArrow; v101 = m_rightArrow->setPosition; cocos2d::CCPoint::CCPoint(&v177.origin, (float)(v158.width * 0.5) + 195.0, v92); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v91, &v177.origin); v101(m_rightArrow, &v178.origin); CCMenuItemSpriteExtra::setSizeMult(a1->m_rightArrow, 2.0); a1->m_leftArrow->setVisible(a1->m_leftArrow, 0); a1->m_rightArrow->setVisible(a1->m_rightArrow, 0); v102 = cocos2d::CCLabelBMFont::create(); a1->m_pageLabel = v102; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v102, 10); m_pageLabel = a1->m_pageLabel; v104 = m_pageLabel->setPosition; v105 = cocos2d::CCDirector::sharedDirector(); v106 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v105)); v107 = cocos2d::CCDirector::sharedDirector(); v108 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v107)); cocos2d::CCPoint::CCPoint(&v178.origin, v106 - 7.0, v108 - 2.0); v104(m_pageLabel, &v178.origin); v109 = a1->m_pageLabel; setAnchorPoint = v109->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v178.origin, 1.0, 1.0); setAnchorPoint(v109, &v178.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_pageLabel->setScale)(a1->m_pageLabel, 1053609165); v111 = cocos2d::CCMenu::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v111, 10); v172 = (cocos2d::SEL_MenuHandler)(unsigned int)InfoLayer::toggleCommentMode; cocos2d::CCPoint::CCPoint(&v178.origin, 0.0, -0.5); LODWORD(v149.x) = &v178; SpriteButton = InfoLayer::getSpriteButton(a1, "GJ_likesIcon_001.png", v172, v111, 0.7, v149); v113 = SpriteButton->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_likeBtn = SpriteButton; v113->setTag(SpriteButton, 0); v173.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleCommentMode; v173.adj = 0; cocos2d::CCPoint::CCPoint(&v178.origin, 0.0, -1.0); LODWORD(v150.x) = &v178; v114 = InfoLayer::getSpriteButton(a1, "GJ_timeIcon_001.png", v173, v111, 0.7, v150); v115 = v114->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_timeBtn = v114; v115->setTag(v114, 1); if ( a1->m_score ) { if ( !GameVariable ) { LABEL_75: v175.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleSmallCommentMode; v175.adj = 0; cocos2d::CCPoint::CCPoint(&v178.origin, 0.0, -1.5); LODWORD(v151.x) = &v178; v119 = InfoLayer::getSpriteButton(a1, "GJ_smallModeIcon_001.png", v175, v111, 0.7, v151); v120 = (ButtonSprite *)v119->getNormalImage(v119); v121 = GameManager::sharedState(); if ( GameManager::getGameVariable(v121, "0088") ) v122 = "GJ_button_02.png"; else v122 = "GJ_button_01.png"; ButtonSprite::updateBGImage(v120, v122); } } else if ( !GameVariable ) { v174.ptr = (void (__cdecl *)(cocos2d::CCObject *))InfoLayer::toggleExtendedMode; v174.adj = 0; cocos2d::CCPoint::CCPoint(&v178.origin, 0.0, -1.0); LODWORD(v151.x) = &v178; v116 = InfoLayer::getSpriteButton(a1, "GJ_extendedIcon_001.png", v174, v111, 0.7, v151); v117 = (ButtonSprite *)v116->getNormalImage(v116); if ( v152 ) v118 = "GJ_button_02.png"; else v118 = "GJ_button_01.png"; ButtonSprite::updateBGImage(v117, v118); goto LABEL_75; } InfoLayer::updateCommentModeButtons(a1); cocos2d::CCPoint::CCPoint( &v159, (float)(v158.width * 0.5) - 195.0, (float)((float)(v158.height * 0.5) + 145.0) - 110.0); v111->setPosition(v111, &v159); cocos2d::CCMenu::alignItemsVerticallyWithPadding(v111, 4.0); v123 = ButtonSprite::create( (ButtonSprite *)"Load Comments", (const char *)off_DC, 0, 0.6, 0, "bigFont.fnt", "GJ_button_01.png", (const char *)0x41C80000, *(float *)&v152); v176.y = 0.0; LODWORD(v176.x) = InfoLayer::onGetComments; v124 = CCMenuItemSpriteExtra::create( v123, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onGetComments, (unsigned int)a1)); a1->m_commentsBtn = v124; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v124); CCMenuItemSpriteExtra::setSizeMult(a1->m_commentsBtn, 2.0); m_commentsBtn = a1->m_commentsBtn; v126 = a1->m_buttonMenu; v127 = m_commentsBtn->setPosition; cocos2d::CCPoint::CCPoint(&v177.origin, v158.width * 0.5, v12 + (float)(v158.height * 0.5)); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v126, &v177.origin); v127(m_commentsBtn, &v178.origin); PlatformToolbox::isNetworkAvailable(); v128 = cocos2d::CCLabelBMFont::create(); a1->m_noComments = v128; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v128, 10); m_noComments = a1->m_noComments; v130 = m_noComments->setPosition; cocos2d::CCPoint::CCPoint(&v178.origin, v158.width * 0.5, v12 + (float)(v158.height * 0.5)); v130(m_noComments, &v178.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_noComments->setScale)(a1->m_noComments, 1061997773); 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); } v131 = GameLevelManager::sharedState(); v132 = (const char *)InfoLayer::getID(a1); v133 = GameManager::sharedState(); v134 = GameManager::getGameVariable(v133, "0069"); GameLevelManager::getCommentKey((int)&v157, (int)v131, v132, 0, v134, a1->m_mode); if ( !GameVariable && ((v135 = GameLevelManager::sharedState(), GameLevelManager::getStoredLevelComments(v135, v157)) || (v136 = GameManager::sharedState(), GameManager::getGameVariable(v136, "0090"))) ) { InfoLayer::loadPage(a1, 0, 0); } else { InfoLayer::setupCommentsBrowser(a1, nullptr); } if ( !a1->m_score ) { v143 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v177.origin.y = 0.0; LODWORD(v177.origin.x) = InfoLayer::onLevelInfo; v144 = CCMenuItemSpriteExtra::create( v143, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onLevelInfo, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v144, 2.0); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v144); v145 = a1->m_buttonMenu; v146 = v144->setPosition; cocos2d::CCPoint::CCPoint( &v161, (float)((float)(v158.width * 0.5) + 220.0) - 17.0, (float)((float)(v158.height * 0.5) + 145.0) - 17.0); cocos2d::CCNode::convertToNodeSpace(&v178.origin, v145, &v161); v146(v144, &v178.origin); } v137 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v137->setScale)(v137, 1058642330); v178.origin.y = 0.0; LODWORD(v178.origin.x) = InfoLayer::onRefreshComments; v138 = CCMenuItemSpriteExtra::create( v137, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onRefreshComments, (unsigned int)a1)); a1->m_refreshCommentsBtn = v138; CCMenuItemSpriteExtra::setSizeMult(v138, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_refreshCommentsBtn); m_refreshCommentsBtn = a1->m_refreshCommentsBtn; v140 = a1->m_buttonMenu; v141 = m_refreshCommentsBtn->setPosition; cocos2d::CCPoint::CCPoint(&v160, (float)(v158.width * 0.5) + 195.0, (float)(v158.height * 0.5) + 0.0); cocos2d::CCNode::convertToNodeSpace(&v161, v140, &v160); v141(m_refreshCommentsBtn, &v161); if ( GameVariable ) { 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); } sub_774008(&v157); return v154; }
GD Web Decomp Icon

GD Web Decomp

Raw Source