//
// GJCommentListLayer::init from 0x10029e8f0 to 0x10029ec5b (875 bytes)
//
// 1 xrefs:
// > GJCommentListLayer::create @ 0x10029e8a5
//
// 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)
{
bool v9; // al
bool v10; // bl
cocos2d::CCDirector *v11; // rax
cocos2d::CCTouchDispatcher *v12; // rax
const char *v13; // rsi
_BOOL8 v14; // rbx
size_t v15; // rdx
const char *v16; // r12
const char *v17; // r13
char *v18; // r14
__int64 v19; // r15
cocos2d::CCSprite *v20; // rax
cocos2d::CCSprite *v21; // r13
cocos2d::CCSprite *v22; // r12
const char *v23; // r13
const char *v24; // rdi
cocos2d::CCSprite *v25; // r12
cocos2d::CCSprite *v26; // r13
BoomListView *v28; // [rsp+8h] [rbp-88h]
char v30; // [rsp+18h] [rbp-78h]
char __dst[15]; // [rsp+19h] [rbp-77h] BYREF
char *v32; // [rsp+28h] [rbp-68h]
cocos2d::ccColor4B v33; // [rsp+30h] [rbp-60h] BYREF
float v34; // [rsp+34h] [rbp-5Ch]
_QWORD v35[2]; // [rsp+38h] [rbp-58h] BYREF
void *__p; // [rsp+48h] [rbp-48h]
float v37; // [rsp+54h] [rbp-3Ch]
float v38; // [rsp+58h] [rbp-38h]
float v39[2]; // [rsp+5Ch] [rbp-34h] BYREF
bool v40; // [rsp+67h] [rbp-29h]
v33 = a4;
v38 = a5;
v37 = a6;
v9 = cocos2d::CCLayerColor::initWithColor_1(a1, &v33, a5, a6);
v10 = v9;
if ( v9 )
{
v40 = v9;
v11 = cocos2d::CCDirector::sharedDirector();
v12 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v11->getTouchDispatcher)(v11);
cocos2d::CCTouchDispatcher::registerForcePrio(v12, a1, 2);
v13 = "GJ_commentTop_001.png";
if ( a7 )
v13 = "GJ_commentTop2_001.png";
v14 = a7;
v15 = a7 + 21LL;
v30 = 2 * v15;
v16 = __dst;
memcpy(__dst, v13, v15);
*((_BYTE *)&v32 + v14 + 6) = 0;
v17 = "GJ_commentSide_001.png";
if ( v14 )
v17 = "GJ_commentSide2_001.png";
v28 = a2;
if ( v14 )
{
v18 = (char *)operator new(0x1Au);
__p = v18;
v35[0] = 27;
v35[1] = 23;
v19 = 23;
}
else
{
LOBYTE(v35[0]) = 44;
v19 = 22;
v18 = (char *)v35 + 1;
}
memcpy(v18, v17, v14 + 22);
v18[v19] = 0;
v20 = cocos2d::CCSprite::createWithSpriteFrameName(__dst);
v10 = v40;
v21 = v20;
cocos2d::CCSprite::setFlipY(v20, 1);
v34 = 0.5 * v38;
sub_10028CBE0(v39, 0.5 * v38, 4.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v21->setPosition)(v21, v39);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v21, 10);
if ( (v30 & 1) != 0 )
v16 = v32;
v22 = cocos2d::CCSprite::createWithSpriteFrameName(v16);
sub_10028CBE0(v39, v34, v37 + -4.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v22->setPosition)(v22, v39);
sub_10028CBE0(v39, 0.5, 0.5);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v22->setAnchorPoint)(v22, v39);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v22, 10);
v23 = (char *)v35 + 1;
v24 = (char *)v35 + 1;
if ( (v35[0] & 1) != 0 )
v24 = (const char *)__p;
v25 = cocos2d::CCSprite::createWithSpriteFrameName(v24);
sub_10028CBE0(v39, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v25->setAnchorPoint)(v25, v39);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v25, 9);
sub_10028CBE0(v39, -7.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v25->setPosition)(v25, v39);
((void (__fastcall *)(cocos2d::CCSprite *, float))v25->setScaleY)(
v25,
(float)(v37 + -5.0) / v25->m_obRect.size.height);
if ( (v35[0] & 1) != 0 )
v23 = (const char *)__p;
v26 = cocos2d::CCSprite::createWithSpriteFrameName(v23);
sub_10028CBE0(v39, 1.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v26->setAnchorPoint)(v26, v39);
((void (__fastcall *)(GJCommentListLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v26, 9);
sub_10028CBE0(v39, v38 + 7.0, 0.0);
((void (__fastcall *)(cocos2d::CCSprite *, float *))v26->setPosition)(v26, v39);
((void (__fastcall *)(cocos2d::CCSprite *))v25->getScaleY)(v25);
((void (__fastcall *)(cocos2d::CCSprite *))v26->setScaleY)(v26);
cocos2d::CCSprite::setFlipX(v26, 1);
if ( v28 )
{
a1->m_list = v28;
((void (__fastcall *)(GJCommentListLayer *, BoomListView *, __int64))a1->addChild_0)(a1, v28, 6);
}
if ( (v35[0] & 1) != 0 )
operator delete(__p);
if ( (v30 & 1) != 0 )
operator delete(v32);
}
return v10;
}