// // OptionsScrollLayer::init from 0x6c02ac to 0x6c08a8 (1532 bytes) // // 1 xrefs: // > OptionsScrollLayer::create @ 0x6c0974 // // 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:56:50 +0000 // cocos2d::CCDirector *__fastcall OptionsScrollLayer::init( int a1, cocos2d::CCObject *a2, char a3, int a4, cocos2d::CCObject *a5) { cocos2d::CCDirector *v9; // r0 cocos2d::CCDirector *v10; // r7 int *v11; // r3 char *v12; // r2 int v13; // r3 int v14; // r11 char *v15; // r3 int v16; // r11 int v17; // r5 char *v18; // r0 char *v19; // r8 int v20; // r8 void (__fastcall *v21)(int, _DWORD *); // r11 int (__fastcall *v22)(int, _DWORD *); // r11 cocos2d::CCMenu *v23; // r0 int v24; // r0 const char *v25; // r1 int v26; // r0 int v27; // r8 float v28; // s18 float v29; // s20 int v30; // r0 float v31; // s18 int v32; // r8 void (__fastcall *v33)(int, _DWORD *); // r11 int v34; // r0 void (__fastcall *v35)(int, _DWORD *); // r3 int v36; // r8 void (__fastcall *v37)(int, _DWORD *); // r11 char *v38; // r2 int *v39; // r0 int v40; // r8 void (__fastcall *v41)(int, _DWORD *); // r10 const char *v42; // r1 int v43; // r8 int v44; // r0 void (__fastcall *v45)(cocos2d::CCPoint *, _DWORD *); // r11 const char *v46; // r1 int v47; // r5 int v48; // r9 const cocos2d::CCPoint *v49; // r11 void (__fastcall *v50)(int, _BYTE *); // r10 int v51; // r5 unsigned int v52; // r3 int v53; // r2 cocos2d::CCString *v54; // r0 const char *CString; // r0 const char *v56; // r5 size_t v57; // r0 const char *v58; // r2 cocos2d::CCLabelBMFont *v59; // r0 int v60; // r5 void (__fastcall *v61)(int, _BYTE *); // r10 const char *v63; // [sp+8h] [bp-64h] cocos2d::CCPoint *v64; // [sp+Ch] [bp-60h] cocos2d::CCPoint *v65; // [sp+Ch] [bp-60h] cocos2d::CCPoint *v66; // [sp+10h] [bp-5Ch] cocos2d::CCPoint *v67; // [sp+10h] [bp-5Ch] cocos2d::CCPoint *v68; // [sp+10h] [bp-5Ch] char *v69; // [sp+14h] [bp-58h] int v70; // [sp+18h] [bp-54h] int (__fastcall *v71)(int, int); // [sp+1Ch] [bp-50h] BYREF float v72; // [sp+20h] [bp-4Ch] BYREF float v73; // [sp+24h] [bp-48h] char v74[8]; // [sp+28h] [bp-44h] BYREF _BYTE v75[8]; // [sp+30h] [bp-3Ch] BYREF int (__fastcall *v76)(OptionsScrollLayer *, cocos2d::CCObject *); // [sp+38h] [bp-34h] int v77; // [sp+3Ch] [bp-30h] _DWORD v78[2]; // [sp+40h] [bp-2Ch] BYREF int v79[2]; // [sp+48h] [bp-24h] BYREF cocos2d::CCLabelBMFont *v80; // [sp+50h] [bp-1Ch] _DWORD v81[4]; // [sp+54h] [bp-18h] BYREF v9 = FLAlertLayer::init((FLAlertLayer *)a1, 150); v10 = v9; if ( v9 ) { *(_BYTE *)(a1 + 532) = a3; *(_BYTE *)(a1 + 468) = 1; *(_DWORD *)(a1 + 564) = a5; if ( a5 ) v9 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a5); if ( a2 ) { *(_DWORD *)(a1 + 524) = a2; cocos2d::CCObject::retain(a2); v9 = (cocos2d::CCDirector *)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 524)); if ( (unsigned int)v9 > 1 ) { v11 = *(int **)(*(_DWORD *)(a1 + 524) + 52); v12 = (char *)v11[3]; v13 = *v11; v71 = sub_6BD018; v14 = 4 * v13; v15 = &v12[4 * v13]; v16 = v14 >> 2; if ( v16 <= 128 ) { v17 = 0; LABEL_13: v19 = nullptr; } else { v17 = v16; while ( 1 ) { v69 = v15; v66 = (cocos2d::CCPoint *)v12; v18 = (char *)operator new(4 * v17, (const std::nothrow_t *)&std::nothrow); v12 = (char *)v66; v15 = v69; if ( v18 ) break; v17 >>= 1; if ( v17 <= 0 ) { v17 = 0; goto LABEL_13; } } v19 = v18; } v9 = (cocos2d::CCDirector *)std::__stable_sort( v12, v15, &v71, v16, v19, v17); if ( v19 ) operator delete(v19); } } cocos2d::CCDirector::sharedDirector(v9); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v72); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, 0.0, 0.0, 80.0, 80.0); v20 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v81); (*(void (__fastcall **)(int, int))(*(_DWORD *)v20 + 456))(v20, 255); v21 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v81, 440.0, 290.0); v21(v20, v81); (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v20, -1); v22 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v72 * 0.5, v73 * 0.5); v23 = (cocos2d::CCMenu *)v22(v20, v81); v24 = cocos2d::CCMenu::create(v23); *(_DWORD *)(a1 + 444) = v24; (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v24, 10); *(_DWORD *)(a1 + 500) = -1; v26 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v25); v77 = 0; v76 = OptionsScrollLayer::onClose; v27 = CCMenuItemSpriteExtra::create(v26, 0, a1, (int)OptionsScrollLayer::onClose, 0); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v27); CCMenuItemSpriteExtra::setSizeMult(v27, 1.6); v64 = *(cocos2d::CCPoint **)(*(_DWORD *)v27 + 92); v67 = *(cocos2d::CCPoint **)(a1 + 444); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v78, (float)((float)(v72 * 0.5) - 220.0) + 10.0, (float)((float)(v73 * 0.5) + 145.0) - 10.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v81, v67); ((void (__fastcall *)(int, _DWORD *))v64)(v27, v81); v28 = (float)(v73 * 0.5) + 145.0; v29 = (float)(v72 * 0.5) - 170.0; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v81, 0.0, 0.0, 40.0, 40.0); v30 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v81); v31 = v28 - 24.0; *(_DWORD *)(a1 + 540) = v30; v32 = v30; v33 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v30 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v81, 155.0, 22.0); v33(v32, v81); v34 = *(_DWORD *)(a1 + 540); v35 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 480); LOWORD(v81[0]) = 13405; BYTE2(v81[0]) = 31; v35(v34, v81); v36 = *(_DWORD *)(a1 + 540); v37 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v36 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v29 + 77.5, v31); v37(v36, v81); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 460) + 232))( *(_DWORD *)(a1 + 460), *(_DWORD *)(a1 + 540), 11); if ( (*(_BYTE *)a4 & 1) != 0 ) v38 = *(char **)(a4 + 8); else v38 = (char *)(a4 + 1); v39 = CCTextInputNode::create( (CCTextInputNode *)0x43110000, 22.0, v38, "Thonburi", (const char *)&dword_14, "bigFont.fnt", v63); LOWORD(v70) = -21896; BYTE2(v70) = -16; *(_DWORD *)(a1 + 536) = v39; CCTextInputNode::setLabelPlaceholderColor((unsigned int)v39, v70); CCTextInputNode::setLabelPlaceholderScale(*(_DWORD *)(a1 + 536), 0.45); CCTextInputNode::setMaxLabelScale(*(_DWORD *)(a1 + 536), 0.45); CCTextInputNode::setMaxLabelWidth(*(_DWORD *)(a1 + 536), 135.0); *(_DWORD *)(*(_DWORD *)(a1 + 536) + 420) = a1 + 440; *(_DWORD *)(*(_DWORD *)(a1 + 536) + 424) = 30; v40 = *(_DWORD *)(a1 + 536); v41 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v40 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v29 + 77.5, v31 + 1.0); v41(v40, v81); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(a1 + 460) + 232))( *(_DWORD *)(a1 + 460), *(_DWORD *)(a1 + 536), 12); v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn07_001.png", v42); (*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1055286886); v78[1] = 0; v78[0] = OptionsScrollLayer::onClearSearchText; v44 = CCMenuItemSpriteExtra::create(v43, 0, a1, (int)OptionsScrollLayer::onClearSearchText, 0); *(_DWORD *)(a1 + 544) = v44; (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v44); v68 = *(cocos2d::CCPoint **)(a1 + 544); v45 = *(void (__fastcall **)(cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v68 + 92); v65 = *(cocos2d::CCPoint **)(a1 + 444); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v75, (float)(v29 + 155.0) + 14.0, v31); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v81, v65); v45(v68, v81); v47 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_trashBtn_001.png", v46); (*(void (__fastcall **)(int, int))(*(_DWORD *)v47 + 80))(v47, 1060320051); v81[1] = 0; v81[0] = OptionsScrollLayer::onClearAll; v48 = CCMenuItemSpriteExtra::create(v47, 0, a1, (int)OptionsScrollLayer::onClearAll, 0); (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 444) + 228))(*(_DWORD *)(a1 + 444), v48); v49 = *(const cocos2d::CCPoint **)(a1 + 444); v50 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v74, (float)((float)(v72 * 0.5) + 220.0) - 24.0, v31); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v75, v49); v50(v48, v75); v51 = *(_DWORD *)(a1 + 564); if ( !v51 ) goto LABEL_29; v52 = *(unsigned __int8 *)(v51 + 80); v53 = v52 << 31; if ( (v52 & 1) != 0 ) { if ( !*(_DWORD *)(v51 + 84) ) goto LABEL_29; v54 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"(Active search: %s)", *(const char **)(v51 + 88), v53); } else { if ( !(v52 >> 1) ) { LABEL_29: OptionsScrollLayer::setupList((OptionsScrollLayer *)a1, *(cocos2d::CCArray **)(a1 + 524)); return v10; } v54 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"(Active search: %s)", (const char *)(v51 + 81), v53); } CString = (const char *)cocos2d::CCString::getCString(v54); v79[0] = 0; v79[1] = 0; v80 = nullptr; v56 = CString; v57 = strlen(CString); std::string::__init(v79, v56, v57); if ( (v79[0] & 1) != 0 ) v59 = v80; else v59 = (cocos2d::CCLabelBMFont *)((char *)v79 + 1); v60 = cocos2d::CCLabelBMFont::create(v59, "chatFont.fnt", v58); (*(void (__fastcall **)(int, int))(*(_DWORD *)v60 + 512))(v60, 200); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v60 + 536))(v60, &unk_BEFD47); (*(void (__fastcall **)(int, int))(*(_DWORD *)v60 + 80))(v60, 1056964608); (*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(a1 + 460) + 232))(*(_DWORD *)(a1 + 460), v60, 10); v61 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v60 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v75, v72 * 0.5, (float)((float)(v73 * 0.5) - 145.0) + 14.0); v61(v60, v75); std::string::~string((int)v79); goto LABEL_29; } return v10; }
GD Web Decomp Icon

GD Web Decomp

Raw Source