//
// GJListLayer::init from 0x40bc3c to 0x40c032 (1014 bytes)
//
// 1 xrefs:
// > GJListLayer::create @ 0x40c0c2
//
// 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 GJListLayer::init(
GJListLayer *a1,
BoomListView *a2,
const char *a3,
cocos2d::ccColor4B a4,
float a5,
float a6,
int a7)
{
float v10; // s16
const char *v11; // r8
const char *v12; // r0
cocos2d::CCSprite *v13; // r11
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5
cocos2d::CCSprite *v15; // r5
void (__fastcall *v16)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
int v18; // r8
void (__fastcall *v19)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
void (__fastcall *v20)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCSprite *v21; // r7
float v22; // r11
cocos2d::CCSprite *v23; // r7
cocos2d::CCSprite *v24; // r8
void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // r11
int v26; // r0
cocos2d::CCLabelBMFont *v27; // r7
void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v29; // r10
_BOOL4 v31; // [sp+0h] [bp-2Ch]
void (__fastcall *v32)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-24h]
void (__fastcall *v33)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-24h]
void (__fastcall *v34)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-24h]
void (__fastcall *v35)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-24h]
void (__fastcall *v36)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+8h] [bp-24h]
cocos2d::ccColor4B v37; // [sp+Ch] [bp-20h] BYREF
cocos2d::CCPoint v38; // [sp+14h] [bp-18h] BYREF
cocos2d::CCPoint v39; // [sp+1Ch] [bp-10h] BYREF
v37 = a4;
v10 = a6;
v31 = cocos2d::CCLayerColor::initWithColor(a1, &v37, a5, a6);
if ( v31 )
{
if ( a7 == 1 )
{
v11 = "GJ_table_side_001.png";
v12 = "GJ_table_side_001.png";
}
else
{
if ( a3 )
v11 = "GJ_table_top_001.png";
else
v11 = "GJ_table_top02_001.png";
v12 = "GJ_table_bottom_001.png";
}
v13 = cocos2d::CCSprite::createWithSpriteFrameName(v12);
setPosition = v13->setPosition;
cocos2d::CCPoint::CCPoint(&v39, a5 * 0.5, -10.0);
setPosition(v13, &v39);
a1->addChild_0(a1, v13, 10);
v15 = cocos2d::CCSprite::createWithSpriteFrameName(v11);
v16 = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v39, a5 * 0.5, (float)(a6 - 5.0) + 20.0);
v16(v15, &v39);
setAnchorPoint = v15->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v39, 0.5, 0.5);
setAnchorPoint(v15, &v39);
a1->addChild_0(a1, v15, 10);
if ( a7 == 1 )
{
v18 = 0;
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v15->setScaleY)(
v15,
(float)(a5 - 2.0) / v15->m_obRect.size.height);
((void (__fastcall *)(cocos2d::CCSprite *, int))v15->setRotation)(v15, 1119092736);
v19 = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v39, a5 * 0.5, (float)(a6 - 14.0) + 20.0);
v19(v15, &v39);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v13->setScaleY)(
v13,
(float)(a5 - 2.0) / v13->m_obRect.size.height);
((void (__fastcall *)(cocos2d::CCSprite *, int))v13->setRotation)(v13, -1028390912);
v20 = v13->setPosition;
cocos2d::CCPoint::CCPoint(&v39, a5 * 0.5, -6.0);
v20(v13, &v39);
while ( 1 )
{
v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_corner_001.png");
a1->addChild_0(a1, v21, 11);
v32 = v21->setPosition;
if ( v18 == 2 )
{
cocos2d::CCPoint::CCPoint(&v39, -5.0, -6.0);
v32(v21, &v39);
}
else
{
if ( v18 != 3 )
{
if ( v18 == 1 )
{
cocos2d::CCPoint::CCPoint(&v39, a5 + 5.0, a6 + 6.0);
v32(v21, &v39);
cocos2d::CCSprite::setFlipX(v21, 1);
}
else
{
cocos2d::CCPoint::CCPoint(&v39, -5.0, a6 + 6.0);
v32(v21, &v39);
}
goto LABEL_18;
}
cocos2d::CCPoint::CCPoint(&v39, a5 + 5.0, -6.0);
v32(v21, &v39);
cocos2d::CCSprite::setFlipX(v21, 1);
}
cocos2d::CCSprite::setFlipY(v21, 1);
LABEL_18:
if ( ++v18 == 4 )
{
v10 = a6 - 2.0;
v22 = 1.0;
goto LABEL_21;
}
}
}
v22 = 0.0;
LABEL_21:
v23 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_side_001.png");
v33 = v23->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v39, 0.0, 0.0);
v33(v23, &v39);
a1->addChild_0(a1, v23, 9);
v34 = v23->setPosition;
cocos2d::CCPoint::CCPoint(&v39, -20.0, v22);
v34(v23, &v39);
((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v23->setScaleY)(v23, v10 / v23->m_obRect.size.height);
v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_table_side_001.png");
v35 = v24->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v39, 1.0, 0.0);
v35(v24, &v39);
a1->addChild_0(a1, v24, 9);
v36 = v24->setPosition;
cocos2d::CCPoint::CCPoint(&v39, a5 + 20.0, v22);
v36(v24, &v39);
setScaleY = v24->setScaleY;
v26 = ((int (__fastcall *)(cocos2d::CCSprite *))v23->getScaleY)(v23);
((void (__fastcall *)(cocos2d::CCSprite *, int))setScaleY)(v24, v26);
cocos2d::CCSprite::setFlipX(v24, 1);
if ( a3 )
{
v27 = cocos2d::CCLabelBMFont::create();
a1->addChild_0(a1, v27, 11);
cocos2d::CCLabelBMFont::limitLabelWidth(v27, 280.0, 0.8, 0.0);
v28 = v27->setPosition;
v29 = (int)v15->getPosition(v15);
cocos2d::CCPoint::CCPoint(&v39, 0.0, 3.0);
cocos2d::CCPoint::operator+(&v38, v29, &v39);
v28(v27, &v38);
}
if ( a2 )
{
a1->m_listView = a2;
cocos2d::CCObject::retain(a2);
a1->addChild_0(a1, a1->m_listView, 6);
a1->m_listView->setTag(a1->m_listView, 9);
}
}
return v31;
}