//
// DialogLayer::init from 0x10008fd10 to 0x100090100 (1008 bytes)
//
// 1 xrefs:
// > DialogLayer::createDialogLayer @ 0x10008fcb0
//
// 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 10:58:23 +0000
//
__int64 __fastcall DialogLayer::init(_QWORD *a1, __int64 a2, __int64 a3, int a4)
{
__int64 v8; // x0
__int64 v9; // x19
__int64 v10; // x0
_QWORD *WinSize; // x0
__int64 v12; // x0
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x23
__int64 v17; // x0
char *CString; // x0
void **v19; // x24
void **v20; // x0
__int64 v21; // x22
__int64 v22; // x22
__int64 v23; // x22
__int64 v24; // x22
__int64 v25; // x22
float v27; // [xsp+8h] [xbp-78h] BYREF
float v28[4]; // [xsp+10h] [xbp-70h] BYREF
float v29[4]; // [xsp+20h] [xbp-60h] BYREF
void *__p[2]; // [xsp+30h] [xbp-50h] BYREF
char v31; // [xsp+47h] [xbp-39h]
__int64 v32; // [xsp+48h] [xbp-38h] BYREF
LODWORD(__p[0]) = -1778384896;
v8 = cocos2d::CCLayerColor::initWithColor(a1, __p);
v9 = v8;
if ( (_DWORD)v8 )
{
if ( a3 )
{
a1[74] = a3;
v8 = cocos2d::CCObject::retain(a3);
}
v10 = cocos2d::CCDirector::sharedDirector(v8);
WinSize = cocos2d::CCDirector::getWinSize(&v32, v10);
v12 = cocos2d::CCDirector::sharedDirector(WinSize);
v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 160LL))(v12);
cocos2d::CCTouchDispatcher::registerForcePrio(v13, a1, 2, 0);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1);
v14 = (*(__int64 (__fastcall **)(_QWORD *, __int64))(*a1 + 1088LL))(a1, 1);
v15 = cocos2d::CCLayer::create(v14);
a1[70] = v15;
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v15);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[70] + 320LL))(a1[70], &unk_1009F3928);
v16 = a1[70];
sub_1000262BC((float *)__p, *(float *)&v32 * 0.5, *((float *)&v32 + 1) * 0.5);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v16 + 184LL))(v16, __p);
v17 = sub_1003065B0("GJ_square%02d.png", a4);
CString = (char *)cocos2d::CCString::getCString(v17);
sub_100009900(__p, CString);
LODWORD(v16) = v31;
v19 = (void **)__p[0];
sub_1000262CC(v29, 0.0, 0.0, 80.0, 80.0);
if ( (int)v16 >= 0 )
v20 = __p;
else
v20 = v19;
v21 = cocos2d::extension::CCScale9Sprite::create(v20, v29);
sub_1000262C4(v29, 380.0, 100.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v21 + 320LL))(v21, v29);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[70] + 464LL))(a1[70], v21, 4294967294LL);
a1[71] = cocos2d::CCLabelBMFont::create_1(" ", "bigFont.fnt");
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[70] + 464LL))(a1[70]);
v22 = a1[71];
sub_1000262BC(v29, 0.0, 1.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v22 + 296LL))(v22, v29);
v23 = a1[71];
sub_1000262BC(v29, -93.0, 36.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v23 + 184LL))(v23, v29);
cocos2d::CCLabelBMFont::limitLabelWidth(a1[71], 200.0, 0.5, 0.0);
sub_1000262CC(v29, 0.0, 0.0, 80.0, 80.0);
sub_1000264D4(v28, (__int64)v29);
v24 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v28);
sub_1000262C4(v28, 280.0, 80.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v24 + 320LL))(v24, v28);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[70] + 464LL))(a1[70], v24, 0xFFFFFFFFLL);
sub_1000262BC(&v27, 40.0, 0.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v24 + 184LL))(v24, &v27);
BYTE2(v27) = 0;
LOWORD(v27) = 0;
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v24 + 960LL))(v24, &v27);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v24 + 912LL))(v24, 50);
a1[76] = cocos2d::CCSprite::createWithSpriteFrameName("GJ_chatBtn_01_001.png");
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[70] + 464LL))(a1[70]);
v25 = a1[76];
sub_1000262BC(&v27, 0.0, -50.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 184LL))(v25, &v27);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[76] + 912LL))(a1[76], 0);
if ( a1[74] )
DialogLayer::displayNextObject(a1);
else
DialogLayer::displayDialogObject(a1, a2);
DialogLayer::updateNavButtonFrame(a1);
if ( v31 < 0 )
operator delete(__p[0]);
}
return v9;
}