// // ShareListLayer::init from 0x6d73e4 to 0x6d7f44 (2912 bytes) // // 1 xrefs: // > ShareListLayer::create @ 0x6d7ffc // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:57:08 +0000 // int __fastcall ShareListLayer::init(ShareListLayer *this, GJLevelList *a2) { cocos2d::CCDirector *v4; // r0 cocos2d::CCLayer *WinSize; // r0 int v6; // r0 int v7; // r3 int v8; // r8 void (__fastcall *v9)(int, int *); // r9 void (__fastcall *v10)(int, int *); // r9 const char *v11; // r2 cocos2d::CCLabelBMFont *v12; // r0 int v13; // r8 void (__fastcall *v14)(int, int *); // r10 int v15; // r10 void (__fastcall *v16)(int, int *); // r9 int v17; // r11 int v18; // r5 void (__fastcall *v19)(int, int *); // r3 int v20; // r2 const char *v21; // r8 EmoteSprite *v22; // r0 char *v23; // r5 size_t v24; // r0 int v25; // r0 int v26; // r2 int v27; // r3 EmoteSprite *v28; // r0 int v29; // r0 int v30; // r2 int v31; // r3 int v32; // r0 float v33; // s18 size_t v34; // r0 EmoteSprite *v35; // r0 int v36; // r0 int v37; // r5 void (__fastcall *v38)(int, int *); // r10 cocos2d::CCMenu *v39; // r0 int v40; // r0 cocos2d::CCArray *v41; // r0 cocos2d::CCArray *v42; // r5 const char *v43; // r1 ButtonSprite *v44; // r0 cocos2d::CCObject *v45; // r6 char *v46; // r3 ButtonSprite *v47; // r0 cocos2d::CCObject *v48; // r6 const cocos2d::CCPoint *v49; // r10 const char *v50; // r1 int v51; // r0 int v52; // r9 const cocos2d::CCPoint *v53; // r11 void (__fastcall *v54)(int, int *); // r10 const cocos2d::CCPoint *v55; // r11 int v56; // r8 cocos2d::CCNodeRGBA *ToggleButton; // r8 int v58; // r10 const cocos2d::CCPoint *v59; // r9 int (__fastcall *v60)(int, int *); // r11 cocos2d::CCArray *v61; // r0 cocos2d::CCArray *v62; // r8 const cocos2d::CCPoint *v63; // r10 int v64; // r9 int v65; // r11 int v66; // r8 const cocos2d::CCPoint *v67; // r11 void (__fastcall *v68)(int, int *); // r9 const cocos2d::CCPoint *v69; // r9 const cocos2d::CCPoint *v70; // r8 int v71; // r1 int v72; // r2 int v73; // r3 int v74; // r1 int v75; // r2 int v76; // r3 const char *v77; // r1 cocos2d::CCSprite *v78; // r0 int v79; // r7 void (__fastcall *v80)(int, float *); // r6 const char *v81; // r0 cocos2d::CCString *v82; // r0 cocos2d::CCLabelBMFont *CString; // r0 const char *v84; // r2 int v85; // r6 void (__fastcall *v86)(int, float *); // r4 void (__fastcall *v87)(int, float *); // r9 int v88; // r7 char *v90; // [sp+Ch] [bp-160h] int v91; // [sp+38h] [bp-134h] int v92; // [sp+3Ch] [bp-130h] _DWORD v93[8]; // [sp+48h] [bp-124h] BYREF float v94; // [sp+68h] [bp-104h] BYREF float v95; // [sp+6Ch] [bp-100h] _BYTE v96[8]; // [sp+70h] [bp-FCh] BYREF _BYTE v97[8]; // [sp+78h] [bp-F4h] BYREF _BYTE v98[8]; // [sp+80h] [bp-ECh] BYREF float v99[8]; // [sp+88h] [bp-E4h] BYREF int (__fastcall *v100)(ShareListLayer *, cocos2d::CCObject *); // [sp+A8h] [bp-C4h] int v101; // [sp+ACh] [bp-C0h] int (__fastcall *v102)(ShareListLayer *, cocos2d::CCObject *); // [sp+B0h] [bp-BCh] int v103; // [sp+B4h] [bp-B8h] int (__fastcall *v104)(int, cocos2d::CCObject *); // [sp+B8h] [bp-B4h] BYREF int v105; // [sp+BCh] [bp-B0h] int v106[2]; // [sp+C0h] [bp-ACh] BYREF char *v107; // [sp+C8h] [bp-A4h] unsigned __int8 v108; // [sp+CCh] [bp-A0h] BYREF char v109; // [sp+CDh] [bp-9Fh] BYREF char *v110; // [sp+D4h] [bp-98h] int v111[3]; // [sp+D8h] [bp-94h] BYREF int v112[3]; // [sp+E4h] [bp-88h] BYREF int v113[3]; // [sp+F0h] [bp-7Ch] BYREF int v114[3]; // [sp+FCh] [bp-70h] BYREF int v115[3]; // [sp+108h] [bp-64h] BYREF int v116[3]; // [sp+114h] [bp-58h] BYREF int v117[3]; // [sp+120h] [bp-4Ch] BYREF int v118[3]; // [sp+12Ch] [bp-40h] BYREF int v119[2]; // [sp+138h] [bp-34h] BYREF cocos2d::CCLabelBMFont *v120; // [sp+140h] [bp-2Ch] _BYTE v121[16]; // [sp+144h] [bp-28h] BYREF int v122; // [sp+154h] [bp-18h] BYREF int v123; // [sp+158h] [bp-14h] v122 = -1778384896; v91 = cocos2d::CCLayerColor::initWithColor(this, &v122); if ( !v91 ) return v91; FLAlertLayer::incrementForcePrio(this); *((_DWORD *)this + 130) = a2; cocos2d::CCObject::retain(a2); (*(void (__fastcall **)(ShareListLayer *, int))(*(_DWORD *)this + 500))(this, 1); v4 = (cocos2d::CCDirector *)(*(int (__fastcall **)(ShareListLayer *, int))(*(_DWORD *)this + 536))(this, 1); cocos2d::CCDirector::sharedDirector(v4); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v94); v6 = cocos2d::CCLayer::create(WinSize); v7 = *(_DWORD *)this; *((_DWORD *)this + 115) = v6; (*(void (__fastcall **)(ShareListLayer *, int))(v7 + 228))(this, v6); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v122, 0.0, 0.0, 80.0, 80.0); v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", &v122); v9 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v8 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v122, 420.0, 300.0); v9(v8, &v122); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v8, -1); v10 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v8 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, v94 * 0.5, v95 * 0.5); v10(v8, &v122); std::string::basic_string(v119, *((_DWORD *)this + 130) + 348); if ( (v119[0] & 1) != 0 ) v12 = v120; else v12 = (cocos2d::CCLabelBMFont *)((char *)v119 + 1); v13 = cocos2d::CCLabelBMFont::create(v12, "goldFont.fnt", v11); std::string::~string((int)v119); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v13); v14 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v13 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, v94 * 0.5, (float)((float)(v95 * 0.5) + 150.0) - 20.0); v14(v13, &v122); v119[0] = 0; v119[1] = 0; v120 = nullptr; std::string::__init(v119, "You cannot change the name once it is shared.", 0x35u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, 0.5, 1.0); v15 = TextArea::create( (int)v119, "chatFont.fnt", 1065353216, 1137180672, (const cocos2d::CCPoint *)&v122, COERCE_INT(20.0), 0, 0); std::string::~string((int)v119); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v15); v16 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v15 + 92); v17 = (*(int (__fastcall **)(int))(*(_DWORD *)v13 + 96))(v13); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v121, 0.0, -20.0); cocos2d::CCPoint::operator+(&v122, v17, v121); v16(v15, &v122); (*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 80))(v15, 1061997773); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, v94 * 0.5, (float)(v95 * 0.5) + 45.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v121, 0.0, 0.0, 80.0, 80.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v122, (const cocos2d::CCRect *)v121); v18 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", &v122); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v97, 380.0, 80.0); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v18 + 160))(v18, v97); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v18, -1); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v18 + 92))(v18, v96); v19 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v18 + 480); LOWORD(v122) = 16514; BYTE2(v122) = 33; v19(v18, &v122); v106[0] = 0; v106[1] = 0; v107 = nullptr; std::string::__init(v106, "(No description provided)", 0x19u); GJLevelList::getUnpackedDescription((GJLevelList *)&v108, *((_DWORD *)this + 130), v20, (int)&v108); memset(v111, 0, sizeof(v111)); std::string::__init(v111, &unk_B6B226, 0); v21 = (const char *)sub_6D4936(&v108, (unsigned __int8 *)v111); std::string::~string((int)v111); if ( !v21 ) { if ( (v108 & 1) != 0 ) v23 = v110; else v23 = &v109; v24 = strlen(v23); std::string::assign(v106, v23, v24); } v22 = (EmoteSprite *)GameToolbox::stripNonBreakingSpaces(v106); v25 = EmoteSprite::maxEmotesComment(v22); v28 = (EmoteSprite *)EmoteSprite::effectiveLength((unsigned __int8 *)v106, v25, v26, v27); if ( (int)v28 > 280 ) { v32 = 280; } else { v29 = EmoteSprite::maxEmotesComment(v28); v32 = EmoteSprite::effectiveLength((unsigned __int8 *)v106, v29, v30, v31); if ( v32 <= 70 ) { v33 = 1.0; goto LABEL_17; } } v33 = (float)((float)((float)(180 - v32) / 280.0) * 0.2) + 0.8; LABEL_17: if ( (v106[0] & 1) == 0 ) v21 = (char *)v106 + 1; v112[0] = 0; if ( (v106[0] & 1) != 0 ) v21 = v107; v112[1] = 0; v112[2] = 0; v34 = strlen(v21); std::string::__init(v112, v21, v34); v35 = (EmoteSprite *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, 0.5, 0.5); v36 = EmoteSprite::maxEmotesComment(v35); v37 = TextArea::create( (int)v112, "chatFont.fnt", 1065353216, COERCE_INT(352.0 / v33), (const cocos2d::CCPoint *)&v122, COERCE_INT(20.0), 1, v36); std::string::~string((int)v112); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v37); v38 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v37 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v104, 0.0, 1.0); cocos2d::CCPoint::operator+(&v122, v96, &v104); v38(v37, &v122); v39 = (cocos2d::CCMenu *)(*(int (__fastcall **)(int, float))(*(_DWORD *)v37 + 80))(v37, COERCE_FLOAT(LODWORD(v33))); *((_DWORD *)this + 125) = -1; v40 = cocos2d::CCMenu::create(v39); *((_DWORD *)this + 111) = v40; v41 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))( *((_DWORD *)this + 115), v40, 10); v42 = (cocos2d::CCArray *)cocos2d::CCArray::create(v41); v44 = ButtonSprite::create((ButtonSprite *)"Cancel", v43); v99[3] = 0.0; LODWORD(v99[2]) = ShareListLayer::onClose; v45 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v44, 0, (int)this, (int)ShareListLayer::onClose, 0); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v45 + 80))(v45, 1061997773); *((_DWORD *)v45 + 79) = 1061997773; (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v45); cocos2d::CCArray::addObject(v42, v45); if ( *(_BYTE *)(*((_DWORD *)this + 130) + 327) ) v46 = "GJ_button_04.png"; else v46 = "GJ_button_01.png"; v47 = ButtonSprite::create((ButtonSprite *)"Share List", nullptr, 0, 1.0, 0.0, "goldFont.fnt", v46, v90); v99[5] = 0.0; LODWORD(v99[4]) = ShareListLayer::onShare; v48 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v47, 0, (int)this, (int)ShareListLayer::onShare, 0); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v48 + 80))(v48, 1061997773); *((_DWORD *)v48 + 79) = 1061997773; (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v48); cocos2d::CCArray::addObject(v42, v48); v49 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v104, v94 * 0.5, (float)((float)(v95 * 0.5) - 150.0) + 25.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v122, v49); GameToolbox::alignItemsHorisontally(*(float *)&v42, 15.0, (int)&v122, 0); v51 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v50); v99[7] = 0.0; LODWORD(v99[6]) = ShareListLayer::onInfo; v52 = CCMenuItemSpriteExtra::create(v51, 0, (int)this, (int)ShareListLayer::onInfo, 0); CCMenuItemSpriteExtra::setSizeMult(v52, 2.0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v52); v53 = *((const cocos2d::CCPoint **)this + 111); v54 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v52 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v104, (float)((float)(v94 * 0.5) - 210.0) + 20.0, (float)((float)(v95 * 0.5) + 150.0) - 20.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v122, v53); v54(v52, &v122); memset(v113, 0, sizeof(v113)); std::string::__init(v113, "Unlisted", 8u); v92 = *(unsigned __int8 *)(*((_DWORD *)this + 130) + 325); v101 = 0; v100 = ShareListLayer::onUnlisted; v55 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v104, (float)(v94 * 0.5) - 50.0, (float)(v95 * 0.5) - 70.0); v56 = *((_DWORD *)this + 115); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, 8.0, 0.0); ToggleButton = GameToolbox::createToggleButton( (int)v113, (int)v100, v101, v92, v55, (int)&v104, (int)this, v56, 0.8, 0.4, 0.0, (int)&v122, "bigFont.fnt", 0, 0, nullptr); std::string::~string((int)v113); (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD))(*(_DWORD *)ToggleButton + 36))(ToggleButton, 0); memset(v114, 0, sizeof(v114)); std::string::__init(v114, "Info", 4u); memset(v115, 0, sizeof(v115)); std::string::__init( v115, "Makes it so that your list can only be found by searching for the exact ID. It will not be visible o" "n your profile, from search, or anywhere else.", 0xA2u); v58 = InfoAlertButton::create((char *)v114, (int)v115, 1061997773); std::string::~string((int)v115); std::string::~string((int)v114); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v58); v59 = *((const cocos2d::CCPoint **)this + 111); v60 = *(int (__fastcall **)(int, int *))(*(_DWORD *)v58 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v104, (float)((float)(v94 * 0.5) - 50.0) - 30.0, (float)(v95 * 0.5) - 70.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v122, v59); v61 = (cocos2d::CCArray *)v60(v58, &v122); v62 = (cocos2d::CCArray *)cocos2d::CCArray::create(v61); memset(v116, 0, sizeof(v116)); std::string::__init(v116, "Friends\nOnly", 0xCu); v103 = 0; v102 = ShareListLayer::onUnlisted; v63 = *((const cocos2d::CCPoint **)this + 111); v64 = *(unsigned __int8 *)(*((_DWORD *)this + 130) + 326); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v104, (float)(v94 * 0.5) + 100.0, (float)(v95 * 0.5) - 70.0); v65 = *((_DWORD *)this + 115); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v122, 8.0, 0.0); *((_DWORD *)this + 131) = GameToolbox::createToggleButton( (int)v116, (int)v102, v103, v64, v63, (int)&v104, (int)this, v65, 0.8, 0.4, 0.0, (int)&v122, "bigFont.fnt", 0, 0, v62); std::string::~string((int)v116); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 131) + 36))(*((_DWORD *)this + 131), 1); *((_DWORD *)this + 132) = cocos2d::CCArray::objectAtIndex(v62, 1u); memset(v117, 0, sizeof(v117)); std::string::__init(v117, "Info", 4u); memset(v118, 0, sizeof(v118)); std::string::__init( v118, "Makes it so that your list can only be found by friends who search for the exact ID. It will not" " be visible on your profile, from search, or anywhere else.", 0xB3u); v66 = InfoAlertButton::create((char *)v117, (int)v118, 1061997773); std::string::~string((int)v118); std::string::~string((int)v117); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v66); v67 = *((const cocos2d::CCPoint **)this + 111); v68 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v66 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v104, (float)((float)(v94 * 0.5) + 100.0) - 30.0, (float)(v95 * 0.5) - 70.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v122, v67); v68(v66, &v122); v69 = *((const cocos2d::CCPoint **)this + 115); v104 = ShareListLayer::onNotifyFriends; v105 = 0; v70 = *((const cocos2d::CCPoint **)this + 111); v123 = 0; v122 = (int)ShareListLayer::onNotifyFollowers; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v99, (float)(v94 * 0.5) - 180.0, (float)(v95 * 0.5) - 50.0); GameToolbox::createNotifyToggles( v93, v69, v70, (int)this, (char)v104, v105, v122, v123, v99, 38.0, (float)(v95 * 0.5) - 14.0); v71 = v93[1]; v72 = v93[2]; v73 = v93[3]; *((_DWORD *)this + 133) = v93[0]; *((_DWORD *)this + 134) = v71; *((_DWORD *)this + 135) = v72; *((_DWORD *)this + 136) = v73; v74 = v93[5]; v75 = v93[6]; v76 = v93[7]; *((_DWORD *)this + 137) = v93[4]; *((_DWORD *)this + 138) = v74; *((_DWORD *)this + 139) = v75; *((_DWORD *)this + 140) = v76; ShareListLayer::updateUnlistedF(this); GJLevelList::frameForListDifficulty(v119, *(const char **)(*((_DWORD *)this + 130) + 292), 2); if ( (v119[0] & 1) != 0 ) v78 = v120; else v78 = (cocos2d::CCSprite *)((char *)v119 + 1); v79 = cocos2d::CCSprite::createWithSpriteFrameName(v78, v77); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v79, 1); v80 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v79 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v99, (float)(v94 * 0.5) - 50.0, (float)(v95 * 0.5) - 25.0); v80(v79, v99); v81 = (const char *)GJLevelList::totalLevels(*((GJLevelList **)this + 130)); v82 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i Levels", v81); CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v82); v85 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v84); (*(void (__fastcall **)(int, int))(*(_DWORD *)v85 + 80))(v85, 1061997773); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v85, 1); v86 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v85 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v99, 0.0, 0.5); v86(v85, v99); v87 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v85 + 92); v88 = (*(int (__fastcall **)(int))(*(_DWORD *)v79 + 96))(v79); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, 30.0, 0.0); cocos2d::CCPoint::operator+(v99, v88, v98); v87(v85, v99); std::string::~string((int)v119); std::string::~string((int)&v108); std::string::~string((int)v106); return v91; }
GD Web Decomp Icon

GD Web Decomp

Raw Source