//
// GJCommentListLayer::init from 0x1002d4c18 to 0x1002d4f50 (824 bytes)
//
// 1 xrefs:
// > GJCommentListLayer::create @ 0x1002d4bc4
//
// 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 GJCommentListLayer::init(
GJCommentListLayer *a1,
BoomListView *a2,
const char *a3,
cocos2d::ccColor4B a4,
float a5,
float a6,
bool a7)
{
_BOOL4 v7; // w22
_BOOL4 v12; // w19
cocos2d::CCDirector *v13; // x0
cocos2d::CCTouchDispatcher *v14; // x0
char *v15; // x1
char *v16; // x22
void **v17; // x0
cocos2d::CCSprite *v18; // x22
__n128 v19; // q1
__n128 v20; // q0
void **v21; // x0
cocos2d::CCSprite *v22; // x22
__n128 v23; // q1
__n128 v24; // q0
__n128 v25; // q0
__n128 v26; // q1
void **v27; // x0
cocos2d::CCSprite *v28; // x22
__n128 v29; // q0
__n128 v30; // q1
__n128 v31; // q0
__n128 v32; // q1
void **v33; // x0
cocos2d::CCSprite *v34; // x23
__n128 v35; // q0
__n128 v36; // q1
__n128 v37; // q0
__n128 v38; // q1
int v40; // [xsp+0h] [xbp-90h] BYREF
void *__p[2]; // [xsp+8h] [xbp-88h] BYREF
char v42; // [xsp+1Fh] [xbp-71h]
void *v43[2]; // [xsp+20h] [xbp-70h] BYREF
char v44; // [xsp+37h] [xbp-59h]
cocos2d::ccColor4B v45; // [xsp+3Ch] [xbp-54h] BYREF
v7 = a7;
v45 = a4;
v12 = cocos2d::CCLayerColor::initWithColor_1(a1, &v45, a5, a6);
if ( v12 )
{
v13 = cocos2d::CCDirector::sharedDirector();
v14 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v13->getTouchDispatcher)(v13);
cocos2d::CCTouchDispatcher::registerForcePrio(v14, a1, 2);
if ( v7 )
v15 = "GJ_commentTop2_001.png";
else
v15 = "GJ_commentTop_001.png";
if ( v7 )
v16 = "GJ_commentSide2_001.png";
else
v16 = "GJ_commentSide_001.png";
sub_100009900(v43, v15);
sub_100009900(__p, v16);
if ( v44 >= 0 )
v17 = v43;
else
v17 = (void **)v43[0];
v18 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v17);
cocos2d::CCSprite::setFlipY(v18, 1);
v19.n128_u32[0] = 4.0;
v20.n128_f32[0] = a5 * 0.5;
sub_100022980(v20, v19, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v18->setPosition)(v18, &v40);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v18, 10);
if ( v44 >= 0 )
v21 = v43;
else
v21 = (void **)v43[0];
v22 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v21);
v23.n128_f32[0] = a6 + -4.0;
v24.n128_f32[0] = a5 * 0.5;
sub_100022980(v24, v23, &v40);
v25 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v22->setPosition)(v22, &v40);
v25.n128_u32[0] = 0.5;
v26.n128_u32[0] = 0.5;
sub_100022980(v25, v26, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v22->setAnchorPoint)(v22, &v40);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v22, 10);
if ( v42 >= 0 )
v27 = __p;
else
v27 = (void **)__p[0];
v28 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v27);
v29.n128_u32[0] = 0;
v30.n128_u32[0] = 0;
sub_100022980(v29, v30, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v28->setAnchorPoint)(v28, &v40);
v31 = ((__n128 (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v28, 9);
v31.n128_u32[0] = -7.0;
v32.n128_u32[0] = 0;
sub_100022980(v31, v32, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v28->setPosition)(v28, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, float))v28->setScaleY)(
v28,
(float)(a6 + -5.0) / v28->m_obRect.size.height);
if ( v42 >= 0 )
v33 = __p;
else
v33 = (void **)__p[0];
v34 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v33);
v35.n128_u32[0] = 1.0;
v36.n128_u32[0] = 0;
sub_100022980(v35, v36, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v34->setAnchorPoint)(v34, &v40);
v37 = ((__n128 (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v34, 9);
v37.n128_f32[0] = a5 + 7.0;
v38.n128_u32[0] = 0;
sub_100022980(v37, v38, &v40);
((void (__fastcall *)(cocos2d::CCSprite *, int *))v34->setPosition)(v34, &v40);
((void (__fastcall *)(cocos2d::CCSprite *))v28->getScaleY)(v28);
((void (__fastcall *)(cocos2d::CCSprite *))v34->setScaleY)(v34);
cocos2d::CCSprite::setFlipX(v34, 1);
if ( a2 )
{
a1->m_list = a2;
((void (__fastcall *)(GJCommentListLayer *, BoomListView *, __int64))a1->addChild_0)(a1, a2, 6);
}
if ( v42 < 0 )
operator delete(__p[0]);
if ( v44 < 0 )
operator delete(v43[0]);
}
return v12;
}