//
// GJListLayer::init from 0x8c8b9c to 0x8c91ac (1552 bytes)
//
// 2 xrefs:
// > GJListLayer::create @ 0x8c9264
// > ??> @ 0x69250
//
// 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 12:56:35 +0000
//
__int64 __fastcall GJListLayer::init(
_QWORD *a1,
cocos2d::CCObject *a2,
cocos2d::CCLabelBMFont *a3,
int a4,
int a5,
float a6,
float a7)
{
float v10; // s8
unsigned __int8 v13; // w0
const char *v14; // x1
unsigned int v15; // w25
char *v16; // x23
char *v17; // x0
float *v18; // x28
float v19; // s10
float v20; // s11
const char *v21; // x1
float *v22; // x23
const char *v23; // x1
float *v24; // x21
void (__fastcall *v25)(float *, _BYTE *); // x28
void (__fastcall *v26)(float *, _BYTE *); // x28
const char *v27; // x1
cocos2d::CCSprite *v28; // x22
void (__fastcall *v29)(cocos2d::CCSprite *, _BYTE *); // x28
void (__fastcall *v30)(cocos2d::CCSprite *, _BYTE *); // x28
float *v31; // x0
void (__fastcall *v32)(float *); // x1
void (__fastcall *v33)(cocos2d::CCSprite *); // x21
const char *v34; // x2
cocos2d::CCLabelBMFont *v35; // x22
float *v36; // x0
__int64 (__fastcall *v37)(float *); // x1
void (__fastcall *v38)(cocos2d::CCLabelBMFont *, __int64 *); // x23
__int64 v39; // x27
const char *v41; // x1
cocos2d::CCSprite *v42; // x28
void (__fastcall *v43)(cocos2d::CCSprite *, _BYTE *); // x21
void (__fastcall *v44)(float *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v45)(float *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v46)(float *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v47)(float *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v48)(float *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v49)(cocos2d::CCSprite *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v50)(cocos2d::CCSprite *, _BYTE *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v51)(cocos2d::CCSprite *, _BYTE *); // [xsp+C0h] [xbp+C0h]
_DWORD v52[4]; // [xsp+C8h] [xbp+C8h] BYREF
__int64 v53; // [xsp+D8h] [xbp+D8h] BYREF
_BYTE v54[8]; // [xsp+E0h] [xbp+E0h] BYREF
v10 = a7;
v52[0] = a4;
v13 = cocos2d::CCLayerColor::initWithColor(a1, v52, a6, a7);
v15 = v13;
if ( v13 )
{
if ( a5 == 1 )
{
v16 = "GJ_table_side_001.png";
v17 = "GJ_table_side_001.png";
}
else
{
if ( a3 )
v16 = "GJ_table_top_001.png";
else
v16 = "GJ_table_top02_001.png";
v17 = "GJ_table_bottom_001.png";
}
v18 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v17, v14);
v19 = a6 * 0.5;
v20 = 0.0;
v44 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, a6 * 0.5, -10.0);
v44(v18, v54);
(*(void (__fastcall **)(_QWORD *, float *, __int64))(*a1 + 464LL))(a1, v18, 10);
v22 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v16, v21);
v45 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v22 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, a6 * 0.5, (float)(v10 - 5.0) + 20.0);
v45(v22, v54);
v46 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v22 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, 0.5, 0.5);
v46(v22, v54);
(*(void (__fastcall **)(_QWORD *, float *, __int64))(*a1 + 464LL))(a1, v22, 10);
if ( a5 == 1 )
{
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v22 + 144LL))(v22, (float)(a6 - 2.0) / v22[109]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v22 + 360LL))(v22, 90.0);
v47 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v22 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, v19, (float)(v10 - 14.0) + 20.0);
v47(v22, v54);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v18 + 144LL))(v18, (float)(a6 - 2.0) / v18[109]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v18 + 360LL))(v18, -90.0);
v48 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, v19, -6.0);
v48(v18, v54);
while ( 1 )
{
while ( 1 )
{
v42 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_table_corner_001.png",
v41);
(*(void (__fastcall **)(_QWORD *, cocos2d::CCSprite *, __int64))(*a1 + 464LL))(a1, v42, 11);
if ( a5 != 3 )
break;
a5 = 4;
v50 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v42 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, -5.0, -6.0);
v50(v42, v54);
cocos2d::CCSprite::setFlipY(v42, 1);
}
if ( a5 == 4 )
break;
if ( a5 == 2 )
{
a5 = 3;
v51 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v42 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, a6 + 5.0, v10 + 6.0);
v51(v42, v54);
cocos2d::CCSprite::setFlipX(v42, 1);
}
else
{
v49 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v42 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, -5.0, v10 + 6.0);
v49(v42, v54);
++a5;
}
}
v43 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v42 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, a6 + 5.0, -6.0);
v43(v42, v54);
cocos2d::CCSprite::setFlipX(v42, 1);
cocos2d::CCSprite::setFlipY(v42, 1);
v10 = v10 - 2.0;
v20 = 1.0;
}
v24 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_table_side_001.png", v23);
v25 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v24 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, 0.0, 0.0);
v25(v24, v54);
(*(void (__fastcall **)(_QWORD *, float *, __int64))(*a1 + 464LL))(a1, v24, 9);
v26 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, -20.0, v20);
v26(v24, v54);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v24 + 144LL))(v24, v10 / v24[109]);
v28 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_table_side_001.png",
v27);
v29 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v28 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, 1.0, 0.0);
v29(v28, v54);
(*(void (__fastcall **)(_QWORD *, cocos2d::CCSprite *, __int64))(*a1 + 464LL))(a1, v28, 9);
v30 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v28 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, a6 + 20.0, v20);
v30(v28, v54);
v31 = v24;
v32 = *(void (__fastcall **)(float *))(*(_QWORD *)v24 + 152LL);
v33 = *(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v28 + 144LL);
v32(v31);
v33(v28);
cocos2d::CCSprite::setFlipX(v28, 1);
if ( a3 )
{
v35 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(a3, "bigFont.fnt", v34);
(*(void (__fastcall **)(_QWORD *, cocos2d::CCLabelBMFont *, __int64))(*a1 + 464LL))(a1, v35, 11);
cocos2d::CCLabelBMFont::limitLabelWidth(v35, 280.0, 0.8, 0.0);
v36 = v22;
v37 = *(__int64 (__fastcall **)(float *))(*(_QWORD *)v22 + 192LL);
v38 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v35 + 184LL);
v39 = v37(v36);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v54, 0.0, 3.0);
cocos2d::CCPoint::operator+(&v53, v39);
v38(v35, &v53);
}
if ( a2 )
{
a1[68] = a2;
cocos2d::CCObject::retain(a2);
(*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*a1 + 464LL))(a1, a1[68], 6);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[68] + 72LL))(a1[68], 9);
}
}
return v15;
}