// // ShareLevelSettingsLayer::init from 0x4a2cb8 to 0x4a33ca (1810 bytes) // // 1 xrefs: // > ShareLevelSettingsLayer::create @ 0x4a347c // // 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:49:52 +0000 // GameManager *__fastcall ShareLevelSettingsLayer::init( const cocos2d::CCPoint **this, GJGameLevel *a2, ShareLevelLayer *a3) { GameManager *v6; // r0 int v7; // r7 void (__fastcall *v8)(int, _DWORD *); // r8 void (__fastcall *v9)(int, _DWORD *); // r8 const char *v10; // r2 int v11; // r7 void (__fastcall *v12)(int, _DWORD *); // r8 cocos2d::CCMenu *v13; // r0 const cocos2d::CCPoint *v14; // r0 int v15; // r7 const cocos2d::CCPoint *v16; // r9 void (__fastcall *v17)(int, _DWORD *); // r8 const char *v18; // r1 int v19; // r0 int v20; // r7 const cocos2d::CCPoint *v21; // r10 void (__fastcall *v22)(int, _DWORD *); // r9 const char *v23; // r2 const cocos2d::CCPoint *v24; // r0 int v25; // r5 void (__fastcall *v26)(int, _DWORD *); // r7 const char *v27; // r1 int v28; // r7 const char *v29; // r1 int v30; // r9 cocos2d::CCNodeRGBA *v31; // r8 void (__fastcall *v32)(cocos2d::CCNodeRGBA *, _DWORD *); // r5 const char *v33; // r2 int v34; // r11 void (__fastcall *v35)(int, _DWORD *); // r5 float *v36; // r0 void (__fastcall *v37)(int, _DWORD); // r6 float *v38; // r0 void (__fastcall *v39)(int, int); // r6 int v40; // r1 int v41; // r3 const char *v42; // r1 int v43; // r7 const char *v44; // r1 int v45; // r9 cocos2d::CCNodeRGBA *v46; // r0 int v47; // r3 int v48; // r9 void (__fastcall *v49)(int, _BYTE *); // r10 const char *v50; // r2 const cocos2d::CCPoint *v51; // r0 int v52; // r9 void (__fastcall *v53)(int, _BYTE *); // r10 int v54; // r10 void (__fastcall *v55)(int, _BYTE *); // r9 float *v56; // r0 int v57; // r6 void (__fastcall *v58)(int, _BYTE *); // r4 GameManager *v60; // [sp+14h] [bp-78h] void (__fastcall *v61)(int, _DWORD *); // [sp+1Ch] [bp-70h] float v62; // [sp+24h] [bp-68h] BYREF float v63; // [sp+28h] [bp-64h] char v64[4]; // [sp+2Ch] [bp-60h] BYREF float v65; // [sp+30h] [bp-5Ch] _BYTE v66[8]; // [sp+34h] [bp-58h] BYREF _BYTE v67[8]; // [sp+3Ch] [bp-50h] BYREF _BYTE v68[8]; // [sp+44h] [bp-48h] BYREF int (__fastcall *v69)(ShareLevelSettingsLayer *, cocos2d::CCObject *); // [sp+4Ch] [bp-40h] int v70; // [sp+50h] [bp-3Ch] _DWORD v71[2]; // [sp+54h] [bp-38h] BYREF int v72[3]; // [sp+5Ch] [bp-30h] BYREF int v73; // [sp+68h] [bp-24h] BYREF int v74; // [sp+6Ch] [bp-20h] int v75; // [sp+70h] [bp-1Ch] _DWORD v76[4]; // [sp+74h] [bp-18h] BYREF v6 = FLAlertLayer::init((FLAlertLayer *)this, 75); v60 = v6; if ( v6 ) { *(this + 132) = a2; *(this + 135) = a3; cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v62); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v76, 0.0, 0.0, 80.0, 80.0); v7 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v76); v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v76, 360.0, 220.0); v8(v7, v76); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v7, -1); v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, v62 * 0.5, v63 * 0.5); v9(v7, v76); v11 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Settings", "bigFont.fnt", v10); v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, v62 * 0.5, (float)((float)(v63 * 0.5) + 110.0) - 20.0); v12(v11, v76); v13 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v11); *(this + 125) = (const cocos2d::CCPoint *)-1; v14 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v13); *(this + 111) = v14; (*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))( *(this + 115), v14, 10); memset(v72, 0, sizeof(v72)); std::string::__init(v72, "Help", 4u); v73 = 0; v74 = 0; v75 = 0; std::string::__init( &v73, "Unlisted makes it so that your level can only be found by searching for the exact ID. It will " "not be visible on your profile, from search, or anywhere else. Unlisted levels do not have to be v" "erified to be uploaded.\n" "Friends Only makes it so that only friends who search the exact ID can find it.", 0x15Fu); v15 = InfoAlertButton::create(v72, &v73, 1065353216); std::string::~string((int)&v73); std::string::~string((int)v72); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v15); v16 = *(this + 111); v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v71, (float)((float)(v62 * 0.5) + 180.0) - 20.0, (float)((float)(v63 * 0.5) + 110.0) - 20.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v76, v16); v17(v15, v76); v19 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v18); v69 = ShareLevelSettingsLayer::onClose; v70 = 0; v20 = CCMenuItemSpriteExtra::create(v19, 0, (int)this, (int)ShareLevelSettingsLayer::onClose, 0); CCMenuItemSpriteExtra::setSizeMult(v20, 1.5); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v20); v21 = *(this + 111); v22 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v71, (float)((float)(v62 * 0.5) - 180.0) + 5.0, (float)((float)(v63 * 0.5) + 110.0) - 5.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v76, v21); v22(v20, v76); v24 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create( (cocos2d::CCLabelBMFont *)&unk_B6B226, "goldFont.fnt", v23); *(this + 131) = v24; (*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v24); v25 = (int)*(this + 131); v26 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v25 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, v62 * 0.5, (float)((float)(v63 * 0.5) - 110.0) + 80.0); v26(v25, v76); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 131) + 80))(*(this + 131), 1058642330); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64, (float)(v62 * 0.5) - 140.0, (float)(v63 * 0.5) + 45.0); v28 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v27); v30 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v29); (*(void (__fastcall **)(int, int))(*(_DWORD *)v28 + 80))(v28, 1061997773); (*(void (__fastcall **)(int, int))(*(_DWORD *)v30 + 80))(v30, 1061997773); v71[0] = ShareLevelSettingsLayer::onUnlisted; v71[1] = 0; v31 = CCMenuItemToggler::create(v28, v30, (int)this, (int)ShareLevelSettingsLayer::onUnlisted, 0); CCMenuItemToggler::toggle(v31, *((unsigned __int8 *)*(this + 132) + 444) ^ 1); (*(void (__fastcall **)(_DWORD, cocos2d::CCNodeRGBA *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v31); v32 = *(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD *))(*(_DWORD *)v31 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v76, *(this + 111)); v32(v31, v76); CCMenuItemToggler::setSizeMult(v31, 1.5); v34 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Unlisted", "bigFont.fnt", v33); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v34); v35 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, 0.0, 0.5); v35(v34, v76); v61 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 92); v36 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v28 + 164))(v28); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, (float)((float)(*v36 * 0.5) * 0.8) + 8.0, 0.0); cocos2d::CCPoint::operator+(v76, v64, v68); v61(v34, v76); if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v34 + 164))(v34) > 110.0 ) { v37 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v34 + 80); v38 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v34 + 164))(v34); v37(v34, 110.0 / *v38); } v39 = *(void (__fastcall **)(int, int))(*(_DWORD *)v34 + 80); if ( (*(float (__fastcall **)(int))(*(_DWORD *)v34 + 84))(v34) > 0.35 ) v40 = 1051931443; else v40 = (*(int (__fastcall **)(int))(*(_DWORD *)v34 + 84))(v34); v39(v34, v40); v41 = (int)*(this + 132); if ( *(_BYTE *)(v41 + 609) || *(int *)(v41 + 612) > 1 ) { (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD))(*(_DWORD *)v31 + 528))(v31, 0); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v28 + 480))(v28, &unk_BEC163); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v30 + 480))(v30, &unk_BEC163); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v34 + 536))(v34, &unk_BEC163); } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v66, (float)(v62 * 0.5) + 40.0, v65); v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v42); v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v44); (*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1061997773); (*(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80))(v45, 1061997773); v76[0] = ShareLevelSettingsLayer::onUnlistedFriendsOnly; v76[1] = 0; v46 = CCMenuItemToggler::create(v45, v43, (int)this, (int)ShareLevelSettingsLayer::onUnlistedFriendsOnly, 0); v47 = (int)*(this + 132); *(this + 133) = v46; CCMenuItemToggler::toggle(v46, *(unsigned __int8 *)(v47 + 445)); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), *(this + 133)); v48 = (int)*(this + 133); v49 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v68, *(this + 111)); v49(v48, v68); CCMenuItemToggler::setSizeMult(*(this + 133), 1.5); v51 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create( (cocos2d::CCLabelBMFont *)"Friends Only", "bigFont.fnt", v50); *(this + 134) = v51; (*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v51); v52 = (int)*(this + 134); v53 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v52 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 0.0, 0.5); v53(v52, v68); v54 = (int)*(this + 134); v55 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v54 + 92); v56 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v43 + 164))(v43); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v67, (float)((float)(*v56 * 0.5) * 0.8) + 8.0, 0.0); cocos2d::CCPoint::operator+(v68, v66, v67); v55(v54, v68); cocos2d::CCLabelBMFont::limitLabelWidth(*(this + 134), 110.0, 0.35, 0.0); ShareLevelSettingsLayer::updateSettingsState((ShareLevelSettingsLayer *)this); v73 = 0; v74 = 0; v75 = 0; std::string::__init( &v73, "Starting in 2.2, all new levels are free to copy.\n(Older levels retain any copy settings.)", 0x5Au); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 0.5, 1.0); v57 = TextArea::create( (int)&v73, "chatFont.fnt", 1065353216, 1134559232, (const cocos2d::CCPoint *)v68, 1101004800, 0, 0); std::string::~string((int)&v73); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v57); v58 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v57 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, v62 * 0.5, (float)((float)(v63 * 0.5) - 110.0) + 35.0); v58(v57, v68); (*(void (__fastcall **)(int, int))(*(_DWORD *)v57 + 80))(v57, 1059481190); } return v60; }
GD Web Decomp Icon

GD Web Decomp

Raw Source