//
// GJCommentListLayer::init from 0xa27ab4 to 0xa27ea0 (1004 bytes)
//
// 2 xrefs:
// > GJCommentListLayer::create @ 0xa27f48
// > ??> @ 0xc6280
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:59:43 +0000
//
__int64 __fastcall GJCommentListLayer::init(
cocos2d::CCObject *a1,
__int64 a2,
float a3,
float a4,
__int64 a5,
int a6,
unsigned __int8 a7)
{
int v11; // w19
cocos2d::CCDirector *v12; // x0
unsigned int v13; // w24
__int64 v15; // x0
cocos2d::CCTouchDispatcher *v16; // x0
const char *v17; // x1
size_t v18; // x0
cocos2d::CCSprite *v19; // x0
cocos2d::CCSprite *v20; // x26
void (__fastcall *v21)(cocos2d::CCSprite *, _BYTE *); // x27
cocos2d::CCSprite *v22; // x0
__int64 v23; // x22
void (__fastcall *v24)(__int64, _BYTE *); // x26
void (__fastcall *v25)(__int64, _BYTE *); // x26
cocos2d::CCSprite *v26; // x0
float *v27; // x22
void (__fastcall *v28)(float *, _BYTE *); // x26
void (__fastcall *v29)(float *, _BYTE *); // x26
cocos2d::CCSprite *v30; // x0
cocos2d::CCSprite *v31; // x23
void (__fastcall *v32)(cocos2d::CCSprite *, _BYTE *); // x26
void (__fastcall *v33)(cocos2d::CCSprite *, _BYTE *); // x26
void (__fastcall *v34)(cocos2d::CCSprite *); // x19
__int64 v35; // x3
char *v36; // [xsp+70h] [xbp+70h]
int v37; // [xsp+78h] [xbp+78h] BYREF
_BYTE v38[8]; // [xsp+80h] [xbp+80h] BYREF
char *v39[2]; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCSprite *v40; // [xsp+98h] [xbp+98h]
char *v41[2]; // [xsp+A0h] [xbp+A0h] BYREF
cocos2d::CCSprite *v42; // [xsp+B0h] [xbp+B0h]
v37 = a6;
v11 = a7;
v12 = (cocos2d::CCDirector *)(unsigned __int8)cocos2d::CCLayerColor::initWithColor(a1, &v37, a3, a4);
v13 = (unsigned __int8)v12;
if ( (_BYTE)v12 )
{
v15 = cocos2d::CCDirector::sharedDirector(v12);
v16 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 160LL))(v15);
cocos2d::CCTouchDispatcher::registerForcePrio(v16, a1, 2, 2);
v39[0] = nullptr;
v39[1] = nullptr;
v40 = nullptr;
if ( v11 )
{
std::string::__init((__int64 *)v39, "GJ_commentTop2_001.png", 0x16u);
v17 = "GJ_commentSide2_001.png";
}
else
{
std::string::__init((__int64 *)v39, "GJ_commentTop_001.png", 0x15u);
v17 = "GJ_commentSide_001.png";
}
v36 = (char *)v17;
v41[0] = nullptr;
v41[1] = nullptr;
v42 = nullptr;
v18 = strlen(v17);
std::string::__init((__int64 *)v41, v36, v18);
v19 = (cocos2d::CCSprite *)((char *)v39 + 1);
if ( ((__int64)v39[0] & 1) != 0 )
v19 = v40;
v20 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(v19, (const char *)LOBYTE(v39[0]));
cocos2d::CCSprite::setFlipY(v20, 1);
v21 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v20 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, a3 * 0.5, 4.0);
v21(v20, v38);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v20, 10);
v22 = (cocos2d::CCSprite *)((char *)v39 + 1);
if ( ((__int64)v39[0] & 1) != 0 )
v22 = v40;
v23 = cocos2d::CCSprite::createWithSpriteFrameName(v22, (const char *)LOBYTE(v39[0]));
v24 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v23 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, a3 * 0.5, a4 - 4.0);
v24(v23, v38);
v25 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v23 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.5, 0.5);
v25(v23, v38);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v23, 10);
v26 = (cocos2d::CCSprite *)((char *)v41 + 1);
if ( ((__int64)v41[0] & 1) != 0 )
v26 = v42;
v27 = (float *)cocos2d::CCSprite::createWithSpriteFrameName(v26, (const char *)LOBYTE(v41[0]));
v28 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v27 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 0.0, 0.0);
v28(v27, v38);
(*(void (__fastcall **)(cocos2d::CCObject *, float *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v27, 9);
v29 = *(void (__fastcall **)(float *, _BYTE *))(*(_QWORD *)v27 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, -7.0, 0.0);
v29(v27, v38);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v27 + 144LL))(v27, (float)(a4 - 5.0) / v27[109]);
v30 = (cocos2d::CCSprite *)((char *)v41 + 1);
if ( ((__int64)v41[0] & 1) != 0 )
v30 = v42;
v31 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(v30, (const char *)LOBYTE(v41[0]));
v32 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v31 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 1.0, 0.0);
v32(v31, v38);
(*(void (__fastcall **)(cocos2d::CCObject *, cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v31, 9);
v33 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v31 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, a3 + 7.0, 0.0);
v33(v31, v38);
v34 = *(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v31 + 144LL);
(*(void (__fastcall **)(float *))(*(_QWORD *)v27 + 152LL))(v27);
v34(v31);
cocos2d::CCSprite::setFlipX(v31, 1);
if ( a2 )
{
v35 = *(_QWORD *)a1;
*((_QWORD *)a1 + 68) = a2;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64, __int64))(v35 + 464))(a1, a2, 6);
}
if ( ((__int64)v41[0] & 1) != 0 )
operator delete(v42);
if ( ((__int64)v39[0] & 1) != 0 )
operator delete(v40);
}
return v13;
}