// // ShareListLayer::init from 0x592994 to 0x5933d0 (2620 bytes) // // 1 xrefs: // > ShareListLayer::create @ 0x593440 // // 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 ShareListLayer::init(ShareListLayer *a1, GJLevelList *a2) { cocos2d::CCDirector *v4; // r0 cocos2d::CCLayer *v5; // r0 ShareListLayer_vtbl *v6; // r3 cocos2d::CCNode *v7; // r5 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r8 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCLabelBMFont *v10; // r8 void (__fastcall *v11)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCNode *v12; // r11 void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 int v14; // r8 cocos2d::CCNode *v15; // r5 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // r3 int v17; // r6 int i; // r2 int v19; // r0 int v20; // r5 unsigned int v21; // r3 float v22; // s17 cocos2d::CCNode *v23; // r5 void (__fastcall *v24)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCMenu *v25; // r0 cocos2d::CCArray *v26; // r0 cocos2d::CCArray *v27; // r7 const char *v28; // r1 ButtonSprite *v29; // r0 CCMenuItemSpriteExtra *v30; // r5 ButtonSprite *v31; // r0 CCMenuItemSpriteExtra *v32; // r5 cocos2d::CCMenu *m_buttonMenu; // r8 cocos2d::CCSprite *v34; // r0 CCMenuItemSpriteExtra *v35; // r7 cocos2d::CCMenu *v36; // r9 void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCMenu *v38; // r11 GJLevelList *m_list; // r2 cocos2d::CCLayer *m_mainLayer; // r10 CCMenuItemToggler *v41; // r9 CCMenuItemSpriteExtra *v42; // r10 cocos2d::CCMenu *v43; // r8 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCArray *v45; // r0 cocos2d::CCArray *v46; // r8 cocos2d::CCMenu *v47; // r11 cocos2d::CCLayer *v48; // r10 CCMenuItemSpriteExtra *v49; // r7 cocos2d::CCMenu *v50; // r9 void (__fastcall *v51)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v52; // r7 void (__fastcall *v53)(cocos2d::CCSprite *, cocos2d::CCPoint *); // r6 const char *v54; // r0 cocos2d::CCString *v55; // r0 cocos2d::CCLabelBMFont *v56; // r6 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r4 void (__fastcall *v58)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 int v59; // r7 float v61; // r2 float v62; // r3 int v63; // [sp+3Ch] [bp-90h] char *v64; // [sp+48h] [bp-84h] BYREF char *v65; // [sp+4Ch] [bp-80h] BYREF char v66[4]; // [sp+50h] [bp-7Ch] BYREF int v67; // [sp+54h] [bp-78h] BYREF int v68; // [sp+58h] [bp-74h] BYREF char v69; // [sp+5Ch] [bp-70h] BYREF int v70; // [sp+60h] [bp-6Ch] BYREF char v71[4]; // [sp+64h] [bp-68h] BYREF char v72[4]; // [sp+68h] [bp-64h] BYREF char v73[4]; // [sp+6Ch] [bp-60h] BYREF cocos2d::CCSprite *v74; // [sp+70h] [bp-5Ch] BYREF cocos2d::CCSize v75; // [sp+74h] [bp-58h] BYREF cocos2d::CCPoint v76; // [sp+7Ch] [bp-50h] BYREF cocos2d::CCSize v77; // [sp+84h] [bp-48h] BYREF cocos2d::CCPoint v78; // [sp+8Ch] [bp-40h] BYREF cocos2d::CCPoint v79; // [sp+94h] [bp-38h] BYREF void (*v80)(ShareListLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-30h] int v81; // [sp+A0h] [bp-2Ch] void (*v82)(ShareListLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-28h] int v83; // [sp+A8h] [bp-24h] void (*v84)(ShareListLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-20h] int v85; // [sp+B0h] [bp-1Ch] cocos2d::CCPoint v86; // [sp+B4h] [bp-18h] BYREF cocos2d::CCRect v87; // [sp+BCh] [bp-10h] BYREF cocos2d::CCRect v88; // [sp+CCh] [bp+0h] BYREF cocos2d::CCSize v89; // 0:^0.8 cocos2d::CCRect v90; // 0:kr00_16.16 cocos2d::CCRect v91; // 0:r2.8,8:^0.8 v88.origin.x = -1.034e-25; v63 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v88); if ( v63 ) { FLAlertLayer::incrementForcePrio(a1); a1->m_list = a2; cocos2d::CCObject::retain(a2); a1->setTouchEnabled(a1, 1); a1->setKeypadEnabled(a1, 1); v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v75, v4); v5 = cocos2d::CCLayer::create(); v6 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_mainLayer = v5; v6->addChild(a1, v5); cocos2d::CCRect::CCRect(&v88, 0.0, 0.0, 80.0, 80.0); v90.origin.x = v61; v90.origin.y = v62; v90.size = v89; v7 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v88, v90); setContentSize = v7->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v88, 420.0, 300.0); setContentSize(v7, (const cocos2d::CCSize *)&v88); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v7, -1); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint(&v88.origin, v75.width * 0.5, v75.height * 0.5); setPosition(v7, &v88.origin); sub_775C20(&v88); v10 = cocos2d::CCLabelBMFont::create(); sub_774008(&v88); a1->m_mainLayer->addChild(a1->m_mainLayer, v10); v11 = v10->setPosition; cocos2d::CCPoint::CCPoint(&v88.origin, v75.width * 0.5, (float)((float)(v75.height * 0.5) + 150.0) - 20.0); v11(v10, &v88.origin); sub_776584((int)&v87, "You cannot change the name once it is shared."); cocos2d::CCPoint::CCPoint(&v88.origin, 0.5, 1.0); v12 = (cocos2d::CCNode *)TextArea::create( (TextArea *)&v87, (std::string)"chatFont.fnt", (const char *)0x3F800000, 1137180672, &v88.origin, (cocos2d::CCPoint)COERCE_UNSIGNED_INT(20.0)); sub_774008(&v87); a1->m_mainLayer->addChild(a1->m_mainLayer, v12); v13 = v12->setPosition; v14 = (int)v10->getPosition(v10); cocos2d::CCPoint::CCPoint(&v87.origin, 0.0, -20.0); cocos2d::CCPoint::operator+(&v88, v14, &v87); v13(v12, &v88.origin); ((void (__fastcall *)(cocos2d::CCNode *, int))v12->setScale)(v12, 1061997773); cocos2d::CCPoint::CCPoint(&v76, v75.width * 0.5, (float)(v75.height * 0.5) + 45.0); cocos2d::CCRect::CCRect(&v87, 0.0, 0.0, 80.0, 80.0); cocos2d::CCRect::CCRect(&v88, &v87); v15 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v88, v91); cocos2d::CCSize::CCSize(&v77, 380.0, 80.0); v15->setContentSize(v15, &v77); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v15, -1); v15->setPosition(v15, &v76); getTag = v15->__vftable[1].getTag; LOWORD(v88.origin.x) = 16514; BYTE2(v88.origin.x) = 33; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v15, &v88); sub_776584((int)&v64, "(No description provided)"); GJLevelList::getUnpackedDescription((GJLevelList *)&v65, (stl::StringData::Internal *)a1->m_list); sub_776584((int)v66, (char *)&unk_939830); v17 = sub_774DBC(&v65, v66); sub_774008(v66); if ( v17 ) sub_7753D4((int)&v64, v65); sub_776584((int)&v67, byte_965AA5); sub_776584((int)&v68, (char *)&unk_939830); for ( i = 0; ; i = *(_DWORD *)(v68 - 12) + v20 ) { v19 = sub_774834(&v64, &v67, i); v20 = v19; if ( v19 == -1 ) break; sub_776454(&v64, v19, *(_DWORD *)(v67 - 12), &v68); } v21 = *((_DWORD *)v64 - 3); if ( v21 > 0x12C ) { v21 = 300; } else if ( v21 <= 0x46 ) { v22 = 1.0; goto LABEL_13; } v22 = (float)((float)((float)(int)(180 - v21) / 300.0) * 0.2) + 0.8; LABEL_13: sub_776584((int)&v69, v64); cocos2d::CCPoint::CCPoint(&v88.origin, 0.5, 0.5); v23 = (cocos2d::CCNode *)TextArea::create( (TextArea *)&v69, (std::string)"chatFont.fnt", (const char *)0x3F800000, COERCE_INT(320.0 / v22), &v88.origin, (cocos2d::CCPoint)(COERCE_UNSIGNED_INT(20.0) | 0x100000000LL)); sub_774008(&v69); a1->m_mainLayer->addChild(a1->m_mainLayer, v23); v24 = v23->setPosition; cocos2d::CCPoint::CCPoint(&v86, 0.0, 1.0); cocos2d::CCPoint::operator+(&v88, &v76, &v86); v24(v23, &v88.origin); v23->setScale(v23, COERCE_FLOAT(LODWORD(v22))); a1->m_joystickConnected = -1; v25 = cocos2d::CCMenu::create(); a1->m_buttonMenu = v25; v26 = (cocos2d::CCArray *)((int (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, int))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v25, 10); v27 = (cocos2d::CCArray *)cocos2d::CCArray::create(v26); v29 = ButtonSprite::create((ButtonSprite *)"Cancel", v28); v81 = 0; v80 = ShareListLayer::onClose; v30 = CCMenuItemSpriteExtra::create( v29, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(ShareListLayer::onClose, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v30); cocos2d::CCArray::addObject(v27, v30); v31 = ButtonSprite::create("Share List"); v83 = 0; v82 = ShareListLayer::onShare; v32 = CCMenuItemSpriteExtra::create( v31, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(ShareListLayer::onShare, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v32); cocos2d::CCArray::addObject(v27, v32); m_buttonMenu = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v86, v75.width * 0.5, (float)((float)(v75.height * 0.5) - 150.0) + 25.0); cocos2d::CCNode::convertToNodeSpace(&v88.origin, m_buttonMenu, &v86); GameToolbox::alignItemsHorisontally(v27, 15.0, (cocos2d::CCPoint)(unsigned int)&v88, 0); v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v85 = 0; v84 = ShareListLayer::onInfo; v35 = CCMenuItemSpriteExtra::create( v34, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(ShareListLayer::onInfo, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v35, 2.0); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v35); v36 = a1->m_buttonMenu; v37 = v35->setPosition; cocos2d::CCPoint::CCPoint( &v86, (float)((float)(v75.width * 0.5) - 210.0) + 20.0, (float)((float)(v75.height * 0.5) + 150.0) - 20.0); cocos2d::CCNode::convertToNodeSpace(&v88.origin, v36, &v86); v37(v35, &v88.origin); sub_776584((int)&v70, "Unlisted"); v38 = a1->m_buttonMenu; v86.y = 0.0; m_list = a1->m_list; LODWORD(v86.x) = ShareListLayer::onUnlisted; LOBYTE(v36) = m_list->m_unlisted; cocos2d::CCPoint::CCPoint(&v79, (float)(v75.width * 0.5) - 120.0, (float)(v75.height * 0.5) - 70.0); m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v88.origin, 8.0, 0.0); v41 = GameToolbox::createToggleButton( (int)&v70, LODWORD(v86.x), LODWORD(v86.y), (bool)v36, v38, &v79, a1, m_mainLayer, 0.8, 0.4, 0.0, (int)&v88, (int)"bigFont.fnt", 0, 0, nullptr); sub_774008(&v70); v41->setTag(v41, 0); sub_776584((int)v71, "Info"); sub_776584( (int)v72, "Makes it so that your list can only be found by searching for the exact ID. It will not be visible" " on your profile, from search, or anywhere else."); v42 = InfoAlertButton::create((int)v71, (int)v72, 1061997773); sub_774008(v72); sub_774008(v71); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v42); v43 = a1->m_buttonMenu; v44 = v42->setPosition; cocos2d::CCPoint::CCPoint(&v79, (float)((float)(v75.width * 0.5) - 120.0) - 30.0, (float)(v75.height * 0.5) - 70.0); cocos2d::CCNode::convertToNodeSpace(&v88.origin, v43, &v79); v45 = (cocos2d::CCArray *)((int (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v44)(v42, &v88); v46 = (cocos2d::CCArray *)cocos2d::CCArray::create(v45); sub_776584((int)v73, "Friends Only"); v47 = a1->m_buttonMenu; LODWORD(v88.origin.x) = ShareListLayer::onUnlisted; v88.origin.y = 0.0; LOBYTE(v41) = a1->m_list->m_friendsOnly; cocos2d::CCPoint::CCPoint(&v78, (float)(v75.width * 0.5) + 40.0, (float)(v75.height * 0.5) - 70.0); v48 = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v79, 8.0, 0.0); a1->m_friendsOnlyToggler = GameToolbox::createToggleButton( (int)v73, LODWORD(v88.origin.x), LODWORD(v88.origin.y), (bool)v41, v47, &v78, a1, v48, 0.8, 0.4, 0.0, (int)&v79, (int)"bigFont.fnt", 0, 0, v46); sub_774008(v73); a1->m_friendsOnlyToggler->setTag(a1->m_friendsOnlyToggler, 1); a1->m_friendsOnlyLabel = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(v46, 1u); sub_776584((int)&v78, "Info"); sub_776584( (int)&v79, "Makes it so that your list can only be found by friends who search for the exact ID. It will n" "ot be visible on your profile, from search, or anywhere else."); v49 = InfoAlertButton::create((int)&v78, (int)&v79, 1061997773); sub_774008(&v79); sub_774008(&v78); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v49); v50 = a1->m_buttonMenu; v51 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))((char *)&v49->copyWithZone + (unsigned int)off_5C); cocos2d::CCPoint::CCPoint(&v78, (float)((float)(v75.width * 0.5) + 40.0) - 30.0, (float)(v75.height * 0.5) - 70.0); cocos2d::CCNode::convertToNodeSpace(&v79, v50, &v78); v51(v49, &v79); ShareListLayer::updateUnlistedF(a1); GJLevelList::frameForListDifficulty((int)&v74, (const char *)a1->m_list->m_difficulty, 2); v52 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v74); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v52, 1); v53 = *(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCPoint *))((char *)&v52->copyWithZone + (unsigned int)off_5C); cocos2d::CCPoint::CCPoint(&v79, (float)(v75.width * 0.5) - 50.0, (float)(v75.height * 0.5) - 25.0); v53(v52, &v79); v54 = (const char *)GJLevelList::totalLevels(a1->m_list); v55 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i Levels", v54); cocos2d::CCString::getCString(v55); v56 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v56->setScale)(v56, 1061997773); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v56, 1); setAnchorPoint = v56->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v79, 0.0, 0.5); setAnchorPoint(v56, &v79); v58 = v56->setPosition; v59 = (*(int (__fastcall **)(cocos2d::CCSprite *))((char *)&v52->copyWithZone + (unsigned int)&dword_60))(v52); cocos2d::CCPoint::CCPoint(&v78, 30.0, 0.0); cocos2d::CCPoint::operator+(&v79, v59, &v78); v58(v56, &v79); sub_774008(&v74); sub_774008(&v68); sub_774008(&v67); sub_774008(&v65); sub_774008(&v64); } return v63; }
GD Web Decomp Icon

GD Web Decomp

Raw Source