// // FLAlertLayer::init from 0x3cb9a0 to 0x3cc174 (2004 bytes) // // 1 xrefs: // > FLAlertLayer::create @ 0x3cc292 // // 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:46:38 +0000 // GameManager *__fastcall FLAlertLayer::init( int *a1, int a2, cocos2d::CCLabelBMFont *a3, int a4, ButtonSprite *a5, ButtonSprite *a6, float a7, char a8, int a9, float a10) { ButtonSprite *v13; // r8 GameManager *v14; // r0 GameManager *v15; // r9 GameManager *v16; // r0 cocos2d::CCDirector *v17; // r0 cocos2d::CCLayer *WinSize; // r0 int v19; // r0 int v20; // r3 EmoteSprite *v21; // r0 float *v22; // r7 float v23; // s18 float v24; // s18 float *v25; // r7 void (__fastcall *v26)(float *, _DWORD *); // r6 float v27; // s18 double v28; // d7 float v29; // s19 int v30; // r0 float *v31; // r1 float v32; // s15 int v33; // r6 int v34; // r6 int v35; // r10 float v36; // s20 int v37; // r0 int v38; // r11 const char *v39; // r2 cocos2d::CCLabelBMFont *v40; // r10 void (__fastcall *v41)(cocos2d::CCLabelBMFont *, _DWORD *); // r11 void (__fastcall *v42)(cocos2d::CCLabelBMFont *, _DWORD *); // r11 float v43; // s21 float v44; // r0 cocos2d::CCMenu *v45; // r0 void (__fastcall *v46)(float *, _DWORD *); // r10 int (__fastcall *v47)(float *, _DWORD *); // r10 float v48; // s20 int v49; // r0 int v50; // r0 ButtonSprite *v51; // r0 int v52; // r7 float v53; // s18 ButtonSprite *v54; // r0 cocos2d::CCArray *v55; // r0 int v56; // r10 int (__fastcall *v57)(int, _BYTE *); // r11 float v58; // s16 int v59; // r0 PlatformToolbox *v60; // r0 const cocos2d::CCPoint *v61; // r6 const char *v62; // r1 int v63; // r6 const cocos2d::CCPoint *v64; // r10 const cocos2d::CCPoint *v65; // r11 void (__fastcall *v66)(int, _BYTE *); // r7 const char *v67; // r1 int v68; // r6 void (__fastcall *v69)(int, _BYTE *); // r7 float v71; // r1 bool v72; // [sp+4h] [bp-68h] void (__fastcall *v74)(int, _DWORD *); // [sp+1Ch] [bp-50h] void (__fastcall *v75)(int, _DWORD *); // [sp+1Ch] [bp-50h] void (__fastcall *v76)(int, _DWORD *); // [sp+1Ch] [bp-50h] void (__fastcall *v77)(int, _DWORD *); // [sp+1Ch] [bp-50h] float v78; // [sp+20h] [bp-4Ch] BYREF float v79; // [sp+24h] [bp-48h] float v80[2]; // [sp+28h] [bp-44h] BYREF float v81; // [sp+30h] [bp-3Ch] BYREF float v82; // [sp+34h] [bp-38h] _BYTE v83[8]; // [sp+38h] [bp-34h] BYREF _DWORD v84[2]; // [sp+40h] [bp-2Ch] BYREF int v85[3]; // [sp+48h] [bp-24h] BYREF _DWORD v86[4]; // [sp+54h] [bp-18h] BYREF v13 = a6; v86[0] = -1778384896; v14 = (GameManager *)cocos2d::CCLayerColor::initWithColor(a1, v86); v15 = v14; if ( v14 ) { v16 = (GameManager *)GameManager::sharedState(v14); if ( GameManager::getGameVariable(v16, "0168") ) *((_BYTE *)a1 + 468) = 1; a1[112] = a2; *((float *)a1 + 127) = a7; a1[128] = a9; *((_BYTE *)a1 + 496) = a8; *((_BYTE *)a1 + 456) = 0; FLAlertLayer::incrementForcePrio((cocos2d::CCObject *)a1); (*(void (__fastcall **)(int *, int))(*a1 + 500))(a1, 1); (*(void (__fastcall **)(int *, int))(*a1 + 536))(a1, 1); v17 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int *, int))(*a1 + 544))(a1, 1); cocos2d::CCDirector::sharedDirector(v17); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v78); v19 = cocos2d::CCLayer::create(WinSize); v20 = *a1; a1[115] = v19; v21 = (EmoteSprite *)(*(int (__fastcall **)(int *, int))(v20 + 228))(a1, v19); EmoteSprite::maxEmotesComment(v21); if ( *((_BYTE *)a1 + 496) ) { cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v81, 370.0, 180.0); v24 = (float)((float)(v81 - 60.0) * 1.1) / 0.8; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v78 * 0.5, v79 * 0.5); std::string::basic_string(v85, a4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.5, 1.0); v25 = (float *)TextArea::create(v85, "chatFont.fnt", LODWORD(a10), LODWORD(v24), v86); std::string::~string((int)v85); v26 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v25 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.5, 0.5); v26(v25, v86); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v25 + 80))(v25, 1061997773); (*(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v25 + 92))(v25, v83); v27 = (float)((float)(a10 * v25[87]) * 0.5) + 10.0; v28 = v82 * 0.5 - 20.0; v29 = v27 * 1.2; if ( v28 >= (float)(v27 * 1.2) ) v29 = v28; cocos2d::CCSize::CCSize((cocos2d::CCSize *)v84, (const cocos2d::CCSize *)&v81); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, (const cocos2d::CCPoint *)v83); v30 = ScrollingLayer::create(v84, v86, LODWORD(v29)); a1[122] = v30; (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1[115] + 232))(a1[115], v30, 10); v31 = v25; v22 = nullptr; *(_DWORD *)(a1[122] + 492) = a1[115]; (*(void (__fastcall **)(_DWORD, float *))(**(_DWORD **)(a1[122] + 488) + 228))(*(_DWORD *)(a1[122] + 488), v31); v32 = -(float)(v27 * 0.5); v33 = a1[122]; v23 = 280.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.0, v32); ScrollingLayer::setStartOffset(v33, v86); } else { std::string::basic_string(v85, a4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.5, 0.5); v22 = (float *)TextArea::create(v85, "chatFont.fnt", 1065353216, (float)((float)(a7 - 60.0) * 1.1) / a10, v86); std::string::~string((int)v85); (*(void (__fastcall **)(int, float *, int))(*(_DWORD *)a1[115] + 232))(a1[115], v22, 3); v23 = (float)(a10 * v22[87]) + 120.0; if ( v23 <= 140.0 ) v23 = 140.0; if ( a10 != 1.0 ) (*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v22 + 80))(v22, LODWORD(a10)); } *((float *)a1 + 128) = v23; v86[0] = -16777216; v34 = cocos2d::CCLayerColor::create(v86, LODWORD(a7), LODWORD(v23)); v74 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v34 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, (float)(v78 - a7) * 0.5, (float)(v79 - v23) * 0.5); v74(v34, v86); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v34 + 172))(v34, 0); v86[0] = -6908266; v35 = cocos2d::CCLayerColor::create(v86, a7 + 16.0, v23 + 16.0); v75 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v35 + 92); v36 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v34 + 96))(v34); v37 = (*(int (__fastcall **)(int))(*(_DWORD *)v34 + 96))(v34); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, v36 - 8.0, *(float *)(v37 + 4) - 8.0); v75(v35, v86); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v35 + 172))(v35, 0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v86, 0.0, 0.0, 94.0, 94.0); v38 = cocos2d::extension::CCScale9Sprite::create("square01_001.png", v86); v76 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v38 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v86, a7, v23); v76(v38, v86); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1[115] + 232))(a1[115], v38, 1); v77 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v38 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, v78 * 0.5, v79 * 0.5); v77(v38, v86); v40 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(a3, "goldFont.fnt", v39); v41 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v40 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.5, 1.0); v41(v40, v86); v42 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v40 + 92); v43 = v78 * 0.5; v44 = (*(float (__fastcall **)(int))(*(_DWORD *)v34 + 96))(v34); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, v43, (float)(v23 + *(float *)(LODWORD(v44) + 4)) - 15.0); v42(v40, v86); (*(void (__fastcall **)(int, cocos2d::CCLabelBMFont *, int))(*(_DWORD *)a1[115] + 232))(a1[115], v40, 3); v45 = (cocos2d::CCMenu *)cocos2d::CCLabelBMFont::limitLabelWidth(v40, a7 - 30.0, 0.9, 0.4); if ( !*((_BYTE *)a1 + 496) ) { v46 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v22 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, 0.5, 0.5); v46(v22, v86); v47 = *(int (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v22 + 92); v48 = v78 * 0.5; v49 = (*(int (__fastcall **)(int))(*(_DWORD *)v34 + 96))(v34); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, v48, (float)(*(float *)(v49 + 4) + (float)(v23 * 0.5)) + 5.0); v45 = (cocos2d::CCMenu *)v47(v22, v86); } v50 = cocos2d::CCMenu::create(v45); a1[111] = v50; (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1[115] + 232))(a1[115], v50, 2); v51 = ButtonSprite::create(a5, (const char *)&dword_58 + 2, 0, 1.0, 0.0, 0); v84[0] = FLAlertLayer::onButton; v84[1] = 0; a1[120] = (int)v51; v52 = CCMenuItemSpriteExtra::create((int)v51, 0, (int)a1, (int)FLAlertLayer::onButton, 0); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v52 + 36))(v52, 0); v53 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1[120] + 164))(a1[120]) + 0.0; (*(void (__fastcall **)(int, int))(*(_DWORD *)a1[111] + 228))(a1[111], v52); if ( a6 ) { v54 = ButtonSprite::create(a6, (const char *)&dword_58 + 2, 0, 1.0, 0.0, v72); v86[0] = FLAlertLayer::onButton; v86[1] = 0; a1[121] = (int)v54; v13 = (ButtonSprite *)CCMenuItemSpriteExtra::create((int)v54, 0, (int)a1, (int)FLAlertLayer::onButton, 0); (*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v13 + 36))(v13, 1); v53 = v53 + *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1[121] + 164))(a1[121]); (*(void (__fastcall **)(int, ButtonSprite *))(*(_DWORD *)a1[111] + 228))(a1[111], v13); } else { *((_BYTE *)a1 + 497) = 1; } if ( (*(int (__fastcall **)(int))(*(_DWORD *)a1[111] + 244))(a1[111]) ) { v55 = (cocos2d::CCArray *)(*(int (__fastcall **)(int))(*(_DWORD *)a1[111] + 244))(a1[111]); if ( cocos2d::CCArray::count(v55) > 1u ) { if ( (float)((float)(a7 - v53) * 0.5) < 15.0 ) v71 = (float)(a7 - v53) * 0.5; else v71 = 15.0; cocos2d::CCMenu::alignItemsHorizontallyWithPadding((cocos2d::CCMenu *)a1[111], v71); } } v56 = a1[111]; v57 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v56 + 92); v58 = v78 * 0.5; v59 = (*(int (__fastcall **)(int))(*(_DWORD *)v34 + 96))(v34); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v58, *(float *)(v59 + 4) + 30.0); v60 = (PlatformToolbox *)v57(v56, v83); if ( PlatformToolbox::isControllerConnected(v60) ) { v61 = (const cocos2d::CCPoint *)a1[115]; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v78 * 0.5, v79 * 0.5); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v80, v61); v63 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_B_001.png", v62); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1[115] + 232))(a1[115], v63, 10); v64 = (const cocos2d::CCPoint *)a1[115]; v65 = (const cocos2d::CCPoint *)a1[111]; (*(void (__fastcall **)(int))(*(_DWORD *)v52 + 96))(v52); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v83, v65); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v81, v64); v66 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v63 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v80[0] - 116.0, v82); v66(v63, v83); if ( v13 ) { v68 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_X_001.png", v67); (*(void (__fastcall **)(int, int, int))(*(_DWORD *)a1[115] + 232))(a1[115], v68, 10); v69 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v68 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v80[0] + 116.0, v82); v69(v68, v83); } } a1[125] = -1; } return v15; }
GD Web Decomp Icon

GD Web Decomp

Raw Source