//
// SelectFontLayer2::init from 0x100316048 to 0x1003163f0 (936 bytes)
//
// 1 xrefs:
// > sub_100315F78 @ 0x100315ffc
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:03:15 +0000
//
__int64 __fastcall SelectFontLayer2::init(__int64 a1, __int64 a2)
{
__int64 v4; // x19
__n128 v5; // q0
__int64 v6; // x0
void *v7; // x0
void *v8; // x21
__int64 v9; // x21
__int64 v10; // x0
void *v11; // x0
void *v12; // x21
__int64 v13; // x22
_QWORD *v14; // x21
int i; // w22
char *v16; // x0
__int64 v17; // x21
float v19; // [xsp+0h] [xbp-50h] BYREF
_QWORD v20[2]; // [xsp+8h] [xbp-48h] BYREF
__int64 v21; // [xsp+18h] [xbp-38h] BYREF
LODWORD(v20[0]) = -1778384896;
v4 = cocos2d::CCLayerColor::initWithColor(a1, (__int64)v20);
if ( (_DWORD)v4 )
{
FLAlertLayer::incrementForcePrio(a1, v5);
*(_BYTE *)(a1 + 596) = 1;
*(_QWORD *)(a1 + 672) = a2;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6, &v21);
v7 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v7;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 456LL))(a1, v7);
sub_1000262CC((float *)v20, 0.0, 0.0, 80.0, 80.0);
v8 = cocos2d::extension::CCScale9Sprite::create((__int64)"GJ_square02.png", (__int64)v20);
sub_1000262C4((float *)v20, 370.0, 270.0);
(*(void (__fastcall **)(void *, _QWORD *))(*(_QWORD *)v8 + 320LL))(v8, v20);
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v8,
4294967294LL);
sub_1000262BC((float *)v20, *(float *)&v21 * 0.5, *((float *)&v21 + 1) * 0.5);
(*(void (__fastcall **)(void *, _QWORD *))(*(_QWORD *)v8 + 184LL))(v8, v20);
v9 = cocos2d::CCLabelBMFont::create_1("Select Font", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v9);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, 0.8);
sub_1000262BC((float *)v20, *(float *)&v21 * 0.5, (float)((float)(*((float *)&v21 + 1) * 0.5) + 135.0) + -16.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v9 + 184LL))(v9, v20);
v10 = cocos2d::CCMenu::create();
*(_QWORD *)(a1 + 552) = v10;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v10, 10);
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_closeBtn_001.png");
v12 = CCMenuItemSpriteExtra::create((__int64)v11, 0, a1, (__int64)sub_1003163F0, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v12);
CCMenuItemSpriteExtra::setSizeMult((__int64)v12, 1.6);
v13 = *(_QWORD *)(a1 + 552);
sub_1000262BC(
&v19,
(float)((float)(*(float *)&v21 * 0.5) + -185.0) + 10.0,
(float)((float)(*((float *)&v21 + 1) * 0.5) + 135.0) + -10.0);
cocos2d::CCNode::convertToNodeSpace(v13, (__int64)&v19, v20);
(*(void (__fastcall **)(void *, _QWORD *))(*(_QWORD *)v12 + 184LL))(v12, v20);
*(_DWORD *)(a1 + 640) = -1;
sub_10031642C(a1);
*(_DWORD *)(a1 + 692) = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 3272LL) + 360LL);
v14 = sub_1002E7510(60);
for ( i = 0; i != 60; ++i )
{
sub_100145068(i);
sub_1002E74E0((__int64)v14);
}
v16 = CustomListView::create((__int64)v14, a1 + 664, 0, 33, 200.0, 340.0, 0.0);
*(_QWORD *)(a1 + 680) = v16;
v17 = GJCommentListLayer::create(v16, 0, 4281479730LL, 1, 340.0, 200.0);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v17, 10);
sub_1000262BC(
(float *)v20,
(float)(*(float *)&v21 + -340.0) * 0.5,
(float)((float)(*((float *)&v21 + 1) + -200.0) * 0.5) + -10.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v17 + 184LL))(v17, v20);
}
return v4;
}