//
// NCSInfoLayer::init from 0x57d82c to 0x57dd44 (1304 bytes)
//
// 1 xrefs:
// > NCSInfoLayer::create @ 0x57ddc6
//
// 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:52:50 +0000
//
GameManager *__fastcall NCSInfoLayer::init(const cocos2d::CCPoint **this, CustomSongLayer *a2)
{
GameManager *v4; // r0
int v5; // r6
void (__fastcall *v6)(int, _DWORD *); // r8
void (__fastcall *v7)(int, _DWORD *); // r8
const char *v8; // r1
int v9; // r6
void (__fastcall *v10)(int, _DWORD *); // r8
cocos2d::CCMenu *v11; // r0
const cocos2d::CCPoint *v12; // r0
const char *v13; // r1
int v14; // r0
int v15; // r8
const cocos2d::CCPoint *v16; // r11
float *v17; // r4
void (__fastcall *v18)(float *, _DWORD *); // r7
ButtonSprite *v19; // r0
int v20; // r8
const cocos2d::CCPoint *v21; // r11
ButtonSprite *v22; // r0
cocos2d::CCObject *v23; // r10
ButtonSprite *v24; // r0
cocos2d::CCObject *v25; // r11
ButtonSprite *v26; // r0
cocos2d::CCObject *v27; // r7
int (__fastcall *v28)(cocos2d::CCObject *, _BYTE *); // r9
cocos2d::CCArray *v29; // r0
cocos2d::CCArray *v30; // r9
const cocos2d::CCPoint *v31; // r5
float v33; // [sp+10h] [bp-6Ch]
float v34; // [sp+10h] [bp-6Ch]
float v35; // [sp+10h] [bp-6Ch]
float v36; // [sp+10h] [bp-6Ch]
GameManager *v37; // [sp+14h] [bp-68h]
cocos2d::CCPoint *v38; // [sp+1Ch] [bp-60h]
cocos2d::CCPoint *v39; // [sp+1Ch] [bp-60h]
cocos2d::CCPoint *v40; // [sp+1Ch] [bp-60h]
float v41; // [sp+20h] [bp-5Ch] BYREF
float v42; // [sp+24h] [bp-58h]
_BYTE v43[8]; // [sp+28h] [bp-54h] BYREF
_BYTE v44[8]; // [sp+30h] [bp-4Ch] BYREF
int (__fastcall *v45)(NewgroundsInfoLayer *, cocos2d::CCObject *); // [sp+38h] [bp-44h]
int v46; // [sp+3Ch] [bp-40h]
int (__fastcall *v47)(NCSInfoLayer *, cocos2d::CCObject *); // [sp+40h] [bp-3Ch]
int v48; // [sp+44h] [bp-38h]
int (__fastcall *v49)(NCSInfoLayer *, cocos2d::CCObject *); // [sp+48h] [bp-34h]
int v50; // [sp+4Ch] [bp-30h]
_DWORD v51[2]; // [sp+50h] [bp-2Ch] BYREF
int v52[3]; // [sp+58h] [bp-24h] BYREF
_DWORD v53[4]; // [sp+64h] [bp-18h] BYREF
v4 = FLAlertLayer::init((FLAlertLayer *)this, 75);
v37 = v4;
if ( v4 )
{
*(this + 131) = a2;
*((_BYTE *)this + 468) = 1;
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v41);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v53, 0.0, 0.0, 80.0, 80.0);
v5 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v53);
v6 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v5 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v53, 440.0, 290.0);
v6(v5, v53);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v5, -1);
v7 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v5 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, v41 * 0.5, v42 * 0.5);
v7(v5, v53);
v9 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"ncs_large_001.png", v8);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 80))(v9, 1067030938);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, v41 * 0.5, (float)((float)(v42 * 0.5) + 145.0) - 38.0);
v10(v9, v53);
v11 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v9);
v12 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v11);
*(this + 111) = v12;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v12,
10);
v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v13);
v46 = 0;
v45 = NewgroundsInfoLayer::onClose;
v15 = CCMenuItemSpriteExtra::create(v14, 0, (int)this, (int)NewgroundsInfoLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v15, 1.5);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v15);
v16 = *(this + 111);
v38 = *(cocos2d::CCPoint **)(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v51,
(float)((float)(v41 * 0.5) - 220.0) + 10.0,
(float)((float)(v42 * 0.5) + 145.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v53, v16);
((void (__fastcall *)(int, _DWORD *))v38)(v15, v53);
memset(v52, 0, sizeof(v52));
std::string::__init(
v52,
"All NCS catalogue is copyright free, allowing all content creators to monetise their content on pl"
"atforms like YouTube and Twitch!",
0x92u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, 0.5, 1.0);
v17 = (float *)TextArea::create(
(int)v52,
"chatFont.fnt",
1065353216,
1137049600,
(const cocos2d::CCPoint *)v53,
COERCE_INT(22.0),
0,
0);
std::string::~string((int)v52);
(*(void (__fastcall **)(_DWORD, float *))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v17);
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v17 + 80))(v17, 1065353216);
v18 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v53, v41 * 0.5, (float)(v42 * 0.5) + 35.0);
v18(v17, v53);
v17[136] = 22.0;
v19 = ButtonSprite::create(
(ButtonSprite *)"Open Library",
(const char *)&dword_12C,
0,
0.75,
0,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x420C0000,
v33);
v48 = 0;
v47 = NCSInfoLayer::onLibrary;
v20 = CCMenuItemSpriteExtra::create((int)v19, 0, (int)this, (int)NCSInfoLayer::onLibrary, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v20);
CCMenuItemSpriteExtra::setSizeMult(v20, 1.1);
v21 = *(this + 111);
v39 = *(cocos2d::CCPoint **)(*(_DWORD *)v20 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v51, v41 * 0.5, (float)(v42 * 0.5) - 50.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v53, v21);
((void (__fastcall *)(int, _DWORD *))v39)(v20, v53);
v22 = ButtonSprite::create(
(ButtonSprite *)"Connect with NCS",
(const char *)&dword_C8,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_05.png",
(const char *)0x41C80000,
v34);
v50 = 0;
v49 = NCSInfoLayer::onNCS;
v23 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v22, 0, (int)this, (int)NCSInfoLayer::onNCS, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v23);
CCMenuItemSpriteExtra::setSizeMult((int)v23, 1.1);
v24 = ButtonSprite::create(
(ButtonSprite *)"NCS.IO",
(const char *)&dword_C8,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
(const char *)0x41C80000,
v35);
v51[1] = 0;
v51[0] = NCSInfoLayer::onNCSIO;
v25 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v24, 0, (int)this, (int)NCSInfoLayer::onNCSIO, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v25);
CCMenuItemSpriteExtra::setSizeMult((int)v25, 1.1);
v26 = ButtonSprite::create(
(ButtonSprite *)"Usage Policy",
(const char *)&dword_C8,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
(const char *)0x41C80000,
v36);
v53[1] = 0;
v53[0] = NCSInfoLayer::onNCSUsage;
v27 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v26, 0, (int)this, (int)NCSInfoLayer::onNCSUsage, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v27);
CCMenuItemSpriteExtra::setSizeMult((int)v27, 1.1);
v28 = *(int (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v27 + 92);
v40 = *(this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)((float)(v41 * 0.5) + 220.0) - 72.0) - 80.0,
(float)((float)(v42 * 0.5) - 145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v44, v40);
v29 = (cocos2d::CCArray *)v28(v27, v44);
v30 = (cocos2d::CCArray *)cocos2d::CCArray::create(v29);
cocos2d::CCArray::addObject(v30, v27);
cocos2d::CCArray::addObject(v30, v25);
cocos2d::CCArray::addObject(v30, v23);
v31 = *(this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, v41 * 0.5, (float)((float)(v42 * 0.5) - 145.0) + 22.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v44, v31);
GameToolbox::alignItemsHorisontally(*(float *)&v30, 14.0, (int)v44, 0);
}
return v37;
}