// // ItemInfoPopup::init from 0x1003081a0 to 0x1003090cc (3884 bytes) // // 1 xrefs: // > ItemInfoPopup::create @ 0x10030654c // // 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 // // local variable allocation has failed, the output may be wrong! bool __fastcall ItemInfoPopup::init(ItemInfoPopup *a1, int a2, UnlockType a3) { __int64 v3; // x21 __int64 v4; // x22 _BOOL4 inited; // w19 cocos2d::CCDirector *v7; // x0 cocos2d::extension::CCScale9Sprite *v8; // x24 __n128 v9; // q0 __n128 v10; // q1 __n128 v11; // q0 __n128 v12; // q1 cocos2d::extension::CCScale9Sprite *v13; // x23 float32x2_t *v14; // x8 cocos2d::CCString *v15; // x0 char *CString; // x0 const char *v17; // x0 cocos2d::CCLabelBMFont *v18; // x23 __n128 v19; // q0 __n128 v20; // q1 AchievementManager *v21; // x0 __int64 v22; // x8 AchievementManager *v23; // x23 unsigned int v24; // w23 const std::string::value_type *v25; // x1 std::string *v26; // x0 cocos2d::CCSprite *v27; // x23 __n128 v28; // q0 __n128 v29; // q1 __n128 v30; // q0 __n128 v31; // q1 double v32; // d0 GJItemIcon *v33; // x23 __n128 v34; // q0 __n128 v35; // q1 double v36; // d0 ButtonSprite *v37; // x0 CCMenuItemSpriteExtra *v38; // x0 __n128 v39; // q0 cocos2d::CCMenu *m_buttonMenu; // x23 __n128 v41; // q1 GameStatsManager *v42; // x0 int ItemUnlockState; // w23 GameManager *v44; // x24 GameManager *v45; // x0 IconType v46; // w0 _BOOL8 isIconUnlocked; // x24 float32x2_t *v48; // x8 cocos2d::CCString *v49; // x0 const char *v50; // x0 unsigned int v51; // w8 const std::string::value_type *v52; // x1 cocos2d::CCString *v53; // x0 std::string *v54; // x8 float32x2_t *v55; // x9 cocos2d::CCString *v56; // x0 const char *v57; // x0 __n128 v58; // q1 float32x2_t *v59; // x8 cocos2d::CCString *v60; // x0 const char *v61; // x0 unsigned int v62; // w8 const char *v63; // x0 GameStatsManager *v64; // x0 std::string *v65; // x8 float32x2_t *v66; // x9 cocos2d::CCString *v67; // x0 const char *v68; // x0 _BOOL4 v69; // w8 _BOOL4 v70; // w9 int v71; // w8 float32x2_t *v72; // x8 cocos2d::CCString *v73; // x0 const char *v74; // x0 std::string::size_type size; // x8 unsigned int v76; // w8 const std::string::value_type *v77; // x1 float32x2_t *v78; // x8 cocos2d::CCString *v79; // x0 const char *v80; // x0 __n128 v81; // q0 cocos2d::CCObject *v82; // x24 __n128 v83; // q0 __n128 v84; // q1 double v85; // d0 std::string *v86; // x0 cocos2d::CCLabelBMFont *v87; // x25 __n128 v88; // q1 __n128 v89; // q0 double v90; // d0 float32x2_t *v91; // x25 __n128 v92; // q0 __n128 v93; // q1 double v94; // d0 std::string *v95; // x0 cocos2d::CCLabelBMFont *v96; // x24 __n128 v97; // q0 __n128 v98; // q1 double v99; // d0 GameStatsManager *v100; // x0 int v101; // w0 GameStatsManager *v102; // x0 std::string *v103; // x8 cocos2d::CCString *v104; // x0 const char *v105; // x0 cocos2d::CCLabelBMFont *v106; // x21 __n128 v107; // q0 __n128 v108; // q1 CCMenuItemSpriteExtra *v109; // x22 __int16 v111; // [xsp+10h] [xbp-160h] BYREF char v112; // [xsp+12h] [xbp-15Eh] float32x2_t v113; // [xsp+18h] [xbp-158h] BYREF std::string __dst; // [xsp+20h] [xbp-150h] BYREF std::string v115; // [xsp+38h] [xbp-138h] BYREF std::string v116; // [xsp+50h] [xbp-120h] BYREF std::string v117; // [xsp+70h] [xbp-100h] BYREF std::string v118; // [xsp+88h] [xbp-E8h] BYREF void *__p[2]; // [xsp+A0h] [xbp-D0h] BYREF __int64 v120; // [xsp+B0h] [xbp-C0h] __int128 v121; // [xsp+C0h] [xbp-B0h] BYREF __int64 v122; // [xsp+D0h] [xbp-A0h] void *v123[2]; // [xsp+D8h] [xbp-98h] BYREF char v124; // [xsp+EFh] [xbp-81h] float32x2_t v125[2]; // [xsp+F0h] [xbp-80h] BYREF char v126; // [xsp+107h] [xbp-69h] float32x2_t v127; // [xsp+108h] [xbp-68h] BYREF float32x2_t v128; // [xsp+110h] [xbp-60h] BYREF float v129; // [xsp+118h] [xbp-58h] float v130; // [xsp+11Ch] [xbp-54h] cocos2d::CCPoint v131; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v132; // 0:x3.16 cocos2d::SEL_MenuHandler v133; // 0:x3.16 cocos2d::CCRect v134; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v135; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v3 = *(_QWORD *)&a3; v4 = *(_QWORD *)&a2; inited = FLAlertLayer::init_1(a1, 150); if ( !inited ) return inited; ((void (__fastcall *)(ItemInfoPopup *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(ItemInfoPopup *, __int64))a1->setTouchEnabled)(a1, 1); a1->m_itemID = v4; a1->m_unlockType = v3; v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v7); sub_100022990((float *)v125, 0.0, 0.0, 80.0, 80.0); v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v134); sub_100022988((float *)v125, 300.0, 230.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v8->setContentSize)(v8, v125); v9 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v8, 4294967294LL); v9.n128_f32[0] = v129 * 0.5; v10.n128_f32[0] = v130 * 0.5; sub_100022980(v9, v10, &v128); v11 = ((__n128 (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v8->setPosition)(v8, &v128); v11.n128_u32[0] = 0; v12.n128_u32[0] = -22.0; sub_100022980(v11, v12, v125); sub_1000229DC(&v128, v125, &v127); sub_100022990((float *)v125, 0.0, 0.0, 80.0, 80.0); v13 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v135); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v13->setColor)(v13, algn_100644D16); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))v13->setOpacity)(v13, 60); sub_100022988((float *)v125, 260.0, 90.0); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v13->setContentSize)(v13, v125); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v13, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float32x2_t *))v13->setPosition)(v13, &v127); ItemInfoPopup::nameForUnlockType(v125, v4, v3); if ( v126 >= 0 ) v14 = v125; else v14 = (float32x2_t *)v125[0]; v15 = (cocos2d::CCString *)sub_100268F4C("%s %i", (const char *)v14, v4); CString = (char *)cocos2d::CCString::getCString(v15); sub_100009900(v123, CString); if ( v124 >= 0 ) v17 = (const char *)v123; else v17 = (const char *)v123[0]; v18 = cocos2d::CCLabelBMFont::create_1(v17, "goldFont.fnt"); v19.n128_u32[0] = v128.i32[0]; v20.n128_f32[0] = (float)(v128.f32[1] + 115.0) + -16.0; sub_100022980(v19, v20, &v121); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v18->setPosition)(v18, &v121); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v18); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v18->setScale)(v18, 0.8); v21 = AchievementManager::sharedState(); AchievementManager::achievementForUnlock((__int64)v21, v4, v3, &v121); v22 = HIBYTE(v122); if ( v122 < 0 ) v22 = *((_QWORD *)&v121 + 1); if ( v22 ) { v23 = AchievementManager::sharedState(); if ( SHIBYTE(v122) < 0 ) { sub_1000097D0(__p, (void *)v121, *((unsigned __int64 *)&v121 + 1)); } else { *(_OWORD *)__p = v121; v120 = v122; } v24 = (unsigned int)AchievementManager::limitForAchievement(v23, (const char *)__p); if ( SHIBYTE(v120) < 0 ) operator delete(__p[0]); if ( v24 - 2 <= 2 ) { sub_100009900(&v118, "gj_subzeroLogo_001.png"); if ( v24 == 4 ) { v25 = "GJ_md_001.png"; } else { if ( v24 != 2 ) goto LABEL_22; v25 = "gj_worldLogo_001.png"; } std::string::assign(&v118, v25); LABEL_22: if ( (v118.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v26 = &v118; else v26 = (std::string *)v118.__r_.__value_.__r.__words[0]; v27 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v26); v28 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCSprite *))a1->m_mainLayer->addChild)( a1->m_mainLayer, v27); v28.n128_u32[0] = 0; v29.n128_u32[0] = 1.0; sub_100022980(v28, v29, &v117); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v27->setAnchorPoint)(v27, &v117); v30 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v27->setScale)(v27, 0.4); v30.n128_u32[0] = -1022623744; v31.n128_u32[0] = 1121058816; sub_100022980(v30, v31, &v116); *(float32x2_t *)&v32 = sub_1000229DC(&v128, (float32x2_t *)&v116, (float32x2_t *)&v117); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *, double))v27->setPosition)(v27, &v117, v32); if ( SHIBYTE(v118.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v118.__r_.__value_.__l.__data_); } } v33 = GJItemIcon::create( (UnlockType)v3, v4, (cocos2d::ccColor3B)-5263441, (cocos2d::ccColor3B)-1, 0, 1, 1, (cocos2d::ccColor3B)-1); ((void (__fastcall *)(GJItemIcon *, float))v33->setScale)(v33, 1.25); v34 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, GJItemIcon *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v33, 12); v35.n128_u32[0] = 1113587712; v34.n128_u32[0] = 0; sub_100022980(v34, v35, &v117); *(float32x2_t *)&v36 = sub_1000229DC(&v128, (float32x2_t *)&v117, (float32x2_t *)&v118); ((void (__fastcall *)(GJItemIcon *, std::string *, double))v33->setPosition)(v33, &v118, v36); a1->m_buttonMenu = cocos2d::CCMenu::create(); ((void (__fastcall *)(cocos2d::CCLayer *))a1->m_mainLayer->addChild_0)(a1->m_mainLayer); v37 = sub_10005F294("OK"); v132.ptr = (void (__cdecl *)(cocos2d::CCObject *))ItemInfoPopup::onClose; v132.adj = 0; v38 = CCMenuItemSpriteExtra::create(v37, nullptr, a1, v132); v39 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)( a1->m_buttonMenu, v38); m_buttonMenu = a1->m_buttonMenu; v39.n128_f32[0] = v129 * 0.5; v41.n128_f32[0] = (float)((float)(v130 * 0.5) + -115.0) + 25.0; sub_100022980(v39, v41, &v118); ((void (__fastcall *)(cocos2d::CCMenu *, std::string *))m_buttonMenu->setPosition)(m_buttonMenu, &v118); v42 = GameStatsManager::sharedState(); ItemUnlockState = GameStatsManager::getItemUnlockState(v42, v4, (UnlockType)v3); v44 = GameManager::sharedState(); v45 = GameManager::sharedState(); v46 = GameManager::unlockTypeToIconType(v45, v3); isIconUnlocked = GameManager::isIconUnlocked(v44, v4, v46); sub_100009900(&v118, ""); sub_100009900(&v117, ""); sub_100009900(&v116, ""); if ( ItemUnlockState > 4 ) { if ( ItemUnlockState > 6 ) { if ( ItemUnlockState == 7 ) { std::string::assign(&v116, "Mechanic Shop"); v53 = (cocos2d::CCString *)sub_100268F4C("You can buy this %s at the Mechanic!"); } else { if ( ItemUnlockState != 8 ) goto LABEL_59; std::string::assign(&v116, "Diamond Shop"); v53 = (cocos2d::CCString *)sub_100268F4C("You can buy this %s in the diamond shop!"); } } else if ( ItemUnlockState == 5 ) { std::string::assign(&v116, "Secret Shop"); v53 = (cocos2d::CCString *)sub_100268F4C( "There may or may not exist a shop where you can buy this %s."); } else { std::string::assign(&v116, "Community Shop"); v53 = (cocos2d::CCString *)sub_100268F4C("You can buy this %s in the community shop!"); } goto LABEL_58; } if ( ItemUnlockState > 2 ) { if ( ItemUnlockState == 3 ) { std::string::assign(&v116, "Special Chest"); v59 = v125; if ( v126 < 0 ) v59 = (float32x2_t *)v125[0]; v60 = (cocos2d::CCString *)sub_100268F4C( "You can find this %s in a special chest!", (const char *)v59); v61 = cocos2d::CCString::getCString(v60); std::string::assign(&v118, v61); std::string::assign(&v117, ""); v62 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 10.0) - 1; if ( v62 >= 9 ) v52 = "IMPOSSIBRU!"; else v52 = off_1007ED560[v62]; goto LABEL_137; } std::string::assign(&v116, "Shop"); v53 = (cocos2d::CCString *)sub_100268F4C("You can buy this %s in the shop!"); LABEL_58: v63 = cocos2d::CCString::getCString(v53); std::string::assign(&v118, v63); goto LABEL_59; } if ( ItemUnlockState == 1 ) { GJGarageLayer::titleForUnlock(v4, v3, &v115); if ( SHIBYTE(v116.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v116.__r_.__value_.__l.__data_); v116 = v115; GJGarageLayer::descriptionForUnlock(v4, v3, &v115); if ( (v115.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v54 = &v115; else v54 = (std::string *)v115.__r_.__value_.__r.__words[0]; v55 = v125; if ( v126 < 0 ) v55 = (float32x2_t *)v125[0]; v56 = (cocos2d::CCString *)sub_100268F4C( "%s to unlock this %s!", (const char *)v54, (const char *)v55); v57 = cocos2d::CCString::getCString(v56); std::string::assign(&v118, v57); if ( SHIBYTE(v115.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v115.__r_.__value_.__l.__data_); goto LABEL_93; } if ( ItemUnlockState == 2 ) { std::string::assign(&v116, "Secret Chest"); v48 = v125; if ( v126 < 0 ) v48 = (float32x2_t *)v125[0]; v49 = (cocos2d::CCString *)sub_100268F4C( "You can find this %s in a secret chest!", (const char *)v48); v50 = cocos2d::CCString::getCString(v49); std::string::assign(&v118, v50); std::string::assign(&v117, ""); v51 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 10.0) - 1; if ( v51 >= 9 ) v52 = "A key... My kingdom for a key..."; else v52 = off_1007ED518[v51]; LABEL_137: std::string::assign(&v117, v52); } LABEL_59: v64 = GameStatsManager::sharedState(); GameStatsManager::getSpecialUnlockDescription(&v115, v64, v4, v3, isIconUnlocked); if ( SHIBYTE(v115.__r_.__value_.__r.__words[2]) < 0 ) { if ( !v115.__r_.__value_.__l.__size_ ) { LABEL_67: operator delete(v115.__r_.__value_.__l.__data_); goto LABEL_68; } v65 = (std::string *)v115.__r_.__value_.__r.__words[0]; LABEL_64: v66 = v125; if ( v126 < 0 ) v66 = (float32x2_t *)v125[0]; v67 = (cocos2d::CCString *)sub_100268F4C( "%s to unlock this %s!", (const char *)v65, (const char *)v66); v68 = cocos2d::CCString::getCString(v67); std::string::assign(&v118, v68); std::string::assign(&v117, ""); if ( (SHIBYTE(v115.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 ) goto LABEL_68; goto LABEL_67; } if ( *((_BYTE *)&v115.__r_.__value_.__s + 23) ) { v65 = &v115; goto LABEL_64; } LABEL_68: v69 = ItemUnlockState == 0; if ( ItemUnlockState ) v70 = 0; else v70 = isIconUnlocked; if ( v70 ) { if ( (v3 & 0xFFFFFFFE) == 2 ) v71 = 4; else v71 = 2; if ( (_DWORD)v3 == 1 ) v71 = 5; if ( v71 > (int)v4 ) { std::string::assign(&v116, "Default"); v72 = v125; if ( v126 < 0 ) v72 = (float32x2_t *)v125[0]; v73 = (cocos2d::CCString *)sub_100268F4C("This %s is unlocked by default.", (const char *)v72); v74 = cocos2d::CCString::getCString(v73); std::string::assign(&v118, v74); goto LABEL_93; } v69 = 1; } if ( !isIconUnlocked && v69 ) { size = HIBYTE(v118.__r_.__value_.__r.__words[2]); if ( (v118.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) size = v118.__r_.__value_.__l.__size_; if ( !size ) { v76 = llroundf(vcvts_n_f32_s32(rand(), 0x1Fu) * 10.0) - 1; if ( v76 >= 0xA ) v77 = "Soon..."; else v77 = off_1007ED5A8[v76]; std::string::assign(&v116, v77); v78 = v125; if ( v126 < 0 ) v78 = (float32x2_t *)v125[0]; v79 = (cocos2d::CCString *)sub_100268F4C( "This %s can be unlocked in update 2.21.", (const char *)v78); v80 = cocos2d::CCString::getCString(v79); std::string::assign(&v118, v80); } } LABEL_93: if ( SHIBYTE(v118.__r_.__value_.__r.__words[2]) < 0 ) { if ( !v118.__r_.__value_.__l.__size_ ) goto LABEL_106; sub_1000097D0(&__dst, v118.__r_.__value_.__l.__data_, v118.__r_.__value_.__l.__size_); } else { if ( !*((_BYTE *)&v118.__r_.__value_.__s + 23) ) goto LABEL_106; v81 = *(__n128 *)&v118.__r_.__value_.__l.__data_; __dst = v118; } v81.n128_u32[0] = 0.5; v58.n128_u32[0] = 1.0; sub_100022980(v81, v58, &v115); v82 = TextArea::create((__int64)&__dst, (__int64)"bigFont.fnt", (__int64 *)&v115, 0, 1.0, 600.0, 42.0); if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__dst.__r_.__value_.__l.__data_); v83 = ((__n128 (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCObject *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v82, 10); v83.n128_u32[0] = 0; v84.n128_u32[0] = -2.0; sub_100022980(v83, v84, &v113); *(float32x2_t *)&v85 = sub_1000229DC(&v127, &v113, (float32x2_t *)&v115); ((void (__fastcall *)(cocos2d::CCObject *, std::string *, double))v82->__vftable[2].isEqual)(v82, &v115, v85); ((void (__fastcall *)(cocos2d::CCObject *, float))v82->__vftable[2].copyWithZone)(v82, 0.4); if ( SHIBYTE(v117.__r_.__value_.__r.__words[2]) < 0 ) { if ( !v117.__r_.__value_.__l.__size_ ) goto LABEL_106; v86 = (std::string *)v117.__r_.__value_.__r.__words[0]; } else { if ( !*((_BYTE *)&v117.__r_.__value_.__s + 23) ) goto LABEL_106; v86 = &v117; } v87 = cocos2d::CCLabelBMFont::create_1((const char *)v86, "chatFont.fnt"); v88.n128_u32[0] = -1039400960; v89.n128_u32[0] = 0; sub_100022980(v89, v88, &v113); *(float32x2_t *)&v90 = sub_1000229DC(&v127, &v113, (float32x2_t *)&v115); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v87->setPosition)(v87, &v115, v90); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v87); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v87->setScale)(v87, 0.6); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _BYTE *))v87->setColor)(v87, algn_100644D16); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v87->setOpacity)(v87, 75); v91 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCObject *))v82->__vftable[2].acceptVisitor)(v82); v92.n128_u32[0] = 0; v93.n128_u32[0] = 5.0; sub_100022980(v92, v93, &v113); *(float32x2_t *)&v94 = sub_1000229DC(v91, &v113, (float32x2_t *)&v115); ((void (__fastcall *)(cocos2d::CCObject *, std::string *, double))v82->__vftable[2].isEqual)(v82, &v115, v94); LABEL_106: if ( SHIBYTE(v116.__r_.__value_.__r.__words[2]) < 0 ) { if ( !v116.__r_.__value_.__l.__size_ ) goto LABEL_113; v95 = (std::string *)v116.__r_.__value_.__r.__words[0]; } else { if ( !*((_BYTE *)&v116.__r_.__value_.__s + 23) ) goto LABEL_113; v95 = &v116; } v96 = cocos2d::CCLabelBMFont::create_1((const char *)v95, "goldFont.fnt"); v97.n128_u32[0] = 0; v98.n128_u32[0] = 30.0; sub_100022980(v97, v98, &v113); *(float32x2_t *)&v99 = sub_1000229DC(&v127, &v113, (float32x2_t *)&v115); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, double))v96->setPosition)(v96, &v115, v99); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v96); cocos2d::CCLabelBMFont::limitLabelWidth(v96, 180.0, 0.55, 0.0); if ( ItemUnlockState == 4 ) ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v96->setScale)(v96, 0.6); LABEL_113: v100 = GameStatsManager::sharedState(); v101 = GameStatsManager::accountIDForIcon(v100, v4, (UnlockType)v3); a1->m_accountID = v101; if ( v101 ) { v102 = GameStatsManager::sharedState(); GameStatsManager::usernameForAccountID(v102, a1->m_accountID, &v115); if ( SHIBYTE(v115.__r_.__value_.__r.__words[2]) < 0 ) { if ( !v115.__r_.__value_.__l.__size_ ) { LABEL_122: operator delete(v115.__r_.__value_.__l.__data_); goto LABEL_123; } v103 = (std::string *)v115.__r_.__value_.__r.__words[0]; LABEL_119: v104 = (cocos2d::CCString *)sub_100268F4C("By %s", (const char *)v103); v105 = cocos2d::CCString::getCString(v104); v106 = cocos2d::CCLabelBMFont::create_1(v105, "goldFont.fnt"); v107.n128_f32[0] = (float)((float)(v129 * 0.5) + 150.0) + -60.0; v108.n128_f32[0] = (float)((float)(v130 * 0.5) + -115.0) + 21.0; sub_100022980(v107, v108, &v113); cocos2d::CCLabelBMFont::limitLabelWidth(v106, 100.0, 0.5, 0.0); v133.ptr = (void (__cdecl *)(cocos2d::CCObject *))ItemInfoPopup::onCredit; v133.adj = 0; v109 = CCMenuItemSpriteExtra::create(v106, nullptr, a1, v133); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild)( a1->m_buttonMenu, v109); v131 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const cocos2d::CCPoint *)&v113); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int16 *, float, float))v109->setPosition)( v109, &v111, v131.x, v131.y); if ( a1->m_accountID <= 0 ) { v112 = -1; v111 = -166; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))v106->setColor)(v106, &v111); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v109->setEnabled)(v109, 0); } if ( (SHIBYTE(v115.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 ) goto LABEL_123; goto LABEL_122; } if ( *((_BYTE *)&v115.__r_.__value_.__s + 23) ) { v103 = &v115; goto LABEL_119; } } LABEL_123: if ( SHIBYTE(v116.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v116.__r_.__value_.__l.__data_); if ( SHIBYTE(v117.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v117.__r_.__value_.__l.__data_); if ( SHIBYTE(v118.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v118.__r_.__value_.__l.__data_); if ( SHIBYTE(v122) < 0 ) operator delete((void *)v121); if ( v124 < 0 ) operator delete(v123[0]); if ( v126 < 0 ) operator delete(*(void **)v125); return inited; }
GD Web Decomp Icon

GD Web Decomp

Raw Source