//
// GJListLayer::init from 0x10007f9f8 to 0x10007ff60 (1384 bytes)
//
// 1 xrefs:
// > GJListLayer::create @ 0x10007f9a0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall GJListLayer::init(
GJListLayer *a1,
BoomListView *a2,
const char *a3,
cocos2d::ccColor4B a4,
float a5,
float a6,
int a7)
{
_BOOL4 v13; // w20
const char *v14; // x8
const char *v15; // x23
const char *v16; // x0
cocos2d::CCSprite *v17; // x25
__n128 v18; // q1
__n128 v19; // q0
cocos2d::CCSprite *v20; // x23
__n128 v21; // q1
__n128 v22; // q0
__n128 v23; // q0
__n128 v24; // q1
float v25; // s12
__n128 v26; // q0
__n128 v27; // q1
__n128 v28; // q0
__n128 v29; // q1
int v30; // w27
float v31; // s9
cocos2d::CCSprite *v32; // x26
__n128 v33; // q0
__n128 v34; // q1
float v35; // s9
cocos2d::CCSprite *v36; // x24
__n128 v37; // q0
__n128 v38; // q1
__n128 v39; // q0
__n128 v40; // q1
cocos2d::CCSprite *v41; // x25
__n128 v42; // q0
__n128 v43; // q1
__n128 v44; // q0
__n128 v45; // q1
cocos2d::CCLabelBMFont *v46; // x22
float32x2_t *v47; // x23
__n128 v48; // q0
__n128 v49; // q1
double v50; // d0
float32x2_t v52; // [xsp+Ch] [xbp-94h] BYREF
float32x2_t v53; // [xsp+14h] [xbp-8Ch] BYREF
cocos2d::ccColor4B v54; // [xsp+1Ch] [xbp-84h] BYREF
v54 = a4;
v13 = cocos2d::CCLayerColor::initWithColor_1(a1, &v54, a5, a6);
if ( !v13 )
return v13;
v14 = "GJ_table_top_001.png";
if ( !a3 )
v14 = "GJ_table_top02_001.png";
if ( a7 == 1 )
v15 = "GJ_table_side_001.png";
else
v15 = v14;
if ( a7 == 1 )
v16 = "GJ_table_side_001.png";
else
v16 = "GJ_table_bottom_001.png";
v17 = cocos2d::CCSprite::createWithSpriteFrameName(v16);
v18.n128_u32[0] = -10.0;
v19.n128_f32[0] = a5 * 0.5;
sub_100022980(v19, v18, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v17->setPosition)(v17, &v53);
((void (__fastcall *)(GJListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v17, 10);
v20 = cocos2d::CCSprite::createWithSpriteFrameName(v15);
v21.n128_f32[0] = (float)(a6 + -5.0) + 20.0;
v22.n128_f32[0] = a5 * 0.5;
sub_100022980(v22, v21, &v53);
v23 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v20->setPosition)(v20, &v53);
v23.n128_u32[0] = 0.5;
v24.n128_u32[0] = 0.5;
sub_100022980(v23, v24, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v20->setAnchorPoint)(v20, &v53);
((void (__fastcall *)(GJListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v20, 10);
if ( a7 != 1 )
{
v25 = a6;
goto LABEL_21;
}
v25 = a6 + -2.0;
((void (__fastcall *)(cocos2d::CCSprite *, float))v20->setScaleY)(v20, (float)(a5 + -2.0) / v20->m_obRect.size.height);
v26 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v20->setRotation)(v20, 90.0);
v27.n128_f32[0] = (float)(a6 + -14.0) + 20.0;
v26.n128_f32[0] = a5 * 0.5;
sub_100022980(v26, v27, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v20->setPosition)(v20, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float))v17->setScaleY)(v17, (float)(a5 + -2.0) / v17->m_obRect.size.height);
v28 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, float))v17->setRotation)(v17, -90.0);
v29.n128_u32[0] = -6.0;
v28.n128_f32[0] = a5 * 0.5;
sub_100022980(v28, v29, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v17->setPosition)(v17, &v53);
v30 = 0;
v31 = a6 + 6.0;
while ( 1 )
{
v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_corner_001.png");
((void (__fastcall *)(GJListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v32, 11);
if ( v30 > 1 )
break;
if ( v30 )
{
v33.n128_f32[0] = a5 + 5.0;
v34.n128_f32[0] = v31;
sub_100022980(v33, v34, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v32->setPosition)(v32, &v53);
cocos2d::CCSprite::setFlipX(v32, 1);
}
else
{
v33.n128_u32[0] = -5.0;
v34.n128_f32[0] = v31;
sub_100022980(v33, v34, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v32->setPosition)(v32, &v53);
}
LABEL_18:
++v30;
}
if ( v30 == 2 )
{
v33.n128_u32[0] = -5.0;
v34.n128_u32[0] = -6.0;
sub_100022980(v33, v34, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v32->setPosition)(v32, &v53);
cocos2d::CCSprite::setFlipY(v32, 1);
goto LABEL_18;
}
v34.n128_u32[0] = -6.0;
v33.n128_f32[0] = a5 + 5.0;
sub_100022980(v33, v34, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v32->setPosition)(v32, &v53);
cocos2d::CCSprite::setFlipX(v32, 1);
cocos2d::CCSprite::setFlipY(v32, 1);
LABEL_21:
if ( a7 == 1 )
v35 = 1.0;
else
v35 = 0.0;
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_side_001.png");
v37.n128_u32[0] = 0;
v38.n128_u32[0] = 0;
sub_100022980(v37, v38, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v36->setAnchorPoint)(v36, &v53);
v39 = ((__n128 (__fastcall *)(GJListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v36, 9);
v39.n128_u32[0] = -20.0;
v40.n128_f32[0] = v35;
sub_100022980(v39, v40, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v36->setPosition)(v36, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float))v36->setScaleY)(v36, v25 / v36->m_obRect.size.height);
v41 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_side_001.png");
v42.n128_u32[0] = 1.0;
v43.n128_u32[0] = 0;
sub_100022980(v42, v43, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v41->setAnchorPoint)(v41, &v53);
v44 = ((__n128 (__fastcall *)(GJListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v41, 9);
v44.n128_f32[0] = a5 + 20.0;
v45.n128_f32[0] = v35;
sub_100022980(v44, v45, &v53);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *))v41->setPosition)(v41, &v53);
((void (__fastcall *)(cocos2d::CCSprite *))v36->getScaleY)(v36);
((void (__fastcall *)(cocos2d::CCSprite *))v41->setScaleY)(v41);
cocos2d::CCSprite::setFlipX(v41, 1);
if ( a3 )
{
v46 = cocos2d::CCLabelBMFont::create_1(a3, "bigFont.fnt");
((void (__fastcall *)(GJListLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v46, 11);
cocos2d::CCLabelBMFont::limitLabelWidth(v46, 280.0, 0.8, 0.0);
v47 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v20->getPosition)(v20);
v48.n128_u32[0] = 0;
v49.n128_u32[0] = 3.0;
sub_100022980(v48, v49, &v52);
*(float32x2_t *)&v50 = sub_1000229DC(v47, &v52, &v53);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v46->setPosition)(v46, &v53, v50);
}
if ( a2 )
{
a1->m_listView = a2;
cocos2d::CCObject::retain(a2);
((void (__fastcall *)(GJListLayer *, BoomListView *, __int64))a1->addChild_0)(a1, a1->m_listView, 6);
((void (__fastcall *)(BoomListView *, __int64))a1->m_listView->setTag)(a1->m_listView, 9);
}
return v13;
}