//
// GJCommentListLayer::init from 0x8c99bc to 0x8c9ddc (1056 bytes)
//
// 2 xrefs:
// > GJCommentListLayer::create @ 0x8c9e84
// > ??> @ 0x96018
//
// 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 GJCommentListLayer::init(
GJCommentListLayer *a1,
BoomListView *a2,
const char *a3,
cocos2d::ccColor4B a4,
float a5,
float a6,
bool a7)
{
_BOOL4 v11; // w19
bool v12; // w24
cocos2d::CCDirector *v14; // x0
cocos2d::CCTouchDispatcher *v15; // x0
char *v16; // x1
cocos2d::CCSprite *v17; // x22
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCSprite *v19; // x22
void (__fastcall *v20)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCSprite *v22; // x22
void (__fastcall *v23)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
void (__fastcall *v24)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23
cocos2d::CCSprite *v25; // x23
void (__fastcall *v26)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26
void (__fastcall *v27)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26
cocos2d::CCSprite *v28; // x0
float (__fastcall *getScaleY)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // x22
GJCommentListLayer_vtbl *v31; // x3
char *p_m_fBrVertexMod; // x0
char *v33; // x0
unsigned int *v34; // x1
int v35; // w2
unsigned int *p_m_fTextureTop; // x1
int m_fTextureTop_low; // w2
cocos2d::ccColor4B v38; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCSprite *v39; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCSprite *v40; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCPoint v41; // [xsp+90h] [xbp+90h] BYREF
v38 = a4;
v11 = a7;
v12 = cocos2d::CCLayerColor::initWithColor(a1, &v38, a5, a6);
if ( v12 )
{
v14 = cocos2d::CCDirector::sharedDirector();
v15 = v14->getTouchDispatcher(v14);
cocos2d::CCTouchDispatcher::registerForcePrio(v15, a1, 2);
if ( v11 )
{
sub_D153B8((int)&v39, "GJ_commentTop2_001.png");
v16 = "GJ_commentSide2_001.png";
}
else
{
sub_D153B8((int)&v39, "GJ_commentTop_001.png");
v16 = "GJ_commentSide_001.png";
}
sub_D153B8((int)&v40, v16);
v17 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v39);
cocos2d::CCSprite::setFlipY(v17, 1);
setPosition = v17->setPosition;
cocos2d::CCPoint::CCPoint(&v41, a5 * 0.5, 4.0);
setPosition(v17, &v41);
a1->addChild_0(a1, v17, 10);
v19 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v39);
v20 = v19->setPosition;
cocos2d::CCPoint::CCPoint(&v41, a5 * 0.5, a6 - 4.0);
v20(v19, &v41);
setAnchorPoint = v19->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v41, 0.5, 0.5);
setAnchorPoint(v19, &v41);
a1->addChild_0(a1, v19, 10);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v40);
v23 = v22->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v41, 0.0, 0.0);
v23(v22, &v41);
a1->addChild_0(a1, v22, 9);
v24 = v22->setPosition;
cocos2d::CCPoint::CCPoint(&v41, -7.0, 0.0);
v24(v22, &v41);
v22->setScaleY(v22, (float)(a6 - 5.0) / v22->m_obRect.size.height);
v25 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v40);
v26 = v25->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v41, 1.0, 0.0);
v26(v25, &v41);
a1->addChild_0(a1, v25, 9);
v27 = v25->setPosition;
cocos2d::CCPoint::CCPoint(&v41, a5 + 7.0, 0.0);
v27(v25, &v41);
v28 = v22;
getScaleY = v22->getScaleY;
setScaleY = v25->setScaleY;
getScaleY(v28);
((void (__fastcall *)(cocos2d::CCSprite *))setScaleY)(v25);
cocos2d::CCSprite::setFlipX(v25, 1);
if ( a2 )
{
v31 = a1->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_list = a2;
v31->addChild_0(a1, a2, 6);
}
p_m_fBrVertexMod = (char *)&v40[-1].m_fBrVertexMod;
if ( (__int64 *)&v40[-1].m_fBrVertexMod != &qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_fTextureTop = (unsigned int *)&v40[-1].m_fTextureTop;
do
m_fTextureTop_low = __ldaxr(p_m_fTextureTop);
while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) );
}
else
{
m_fTextureTop_low = LODWORD(v40[-1].m_fTextureTop);
LODWORD(v40[-1].m_fTextureTop) = m_fTextureTop_low - 1;
}
if ( m_fTextureTop_low <= 0 )
operator delete(p_m_fBrVertexMod);
}
v33 = (char *)&v39[-1].m_fBrVertexMod;
if ( (__int64 *)&v39[-1].m_fBrVertexMod != &qword_124B6B0 )
{
if ( &pthread_create )
{
v34 = (unsigned int *)&v39[-1].m_fTextureTop;
do
v35 = __ldaxr(v34);
while ( __stlxr(v35 - 1, v34) );
}
else
{
v35 = LODWORD(v39[-1].m_fTextureTop);
LODWORD(v39[-1].m_fTextureTop) = v35 - 1;
}
if ( v35 <= 0 )
operator delete(v33);
}
}
return v12;
}