//
// TextAlertPopup::init from 0x10037dd00 to 0x10037dff0 (752 bytes)
//
// 1 xrefs:
// > TextAlertPopup::create @ 0x10037dc34
//
// 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 11:03:29 +0000
//
__int64 __fastcall TextAlertPopup::init(__int64 a1, const char *a2, int a3, std::string *a4, float a5, float a6)
{
__int64 v12; // x20
__int64 v13; // x0
float *v14; // x22
char v15; // w23
__int64 v16; // x1
__int64 v17; // x2
__int64 v18; // x3
__int64 v19; // x4
__int64 v20; // x5
__int64 v21; // x6
__int64 v22; // x7
__int64 v23; // x0
void *v24; // x0
__int64 v25; // x22
float *v26; // x21
__int64 v27; // x1
__int64 v28; // x2
__int64 v29; // x3
__int64 v30; // x4
__int64 v31; // x5
__int64 v32; // x6
__int64 v33; // x7
__int64 v34; // x0
__int64 v35; // x0
float v37; // [xsp+28h] [xbp-68h] BYREF
float v38[4]; // [xsp+30h] [xbp-60h] BYREF
v12 = cocos2d::CCNode::init();
if ( !(_DWORD)v12 )
return v12;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 320LL))(a1, &unk_1009F6918);
if ( (SHIBYTE(a4->__r_.__value_.__r.__words[2]) & 0x8000000000000000LL) != 0 )
{
if ( a4->__r_.__value_.__l.__size_ )
goto LABEL_4;
LABEL_13:
std::string::assign(a4, "bigFont.fnt");
goto LABEL_4;
}
if ( !*((_BYTE *)&a4->__r_.__value_.__s + 23) )
goto LABEL_13;
LABEL_4:
if ( a2[23] < 0 )
a2 = *(const char **)a2;
if ( SHIBYTE(a4->__r_.__value_.__r.__words[2]) < 0 )
a4 = (std::string *)a4->__r_.__value_.__r.__words[0];
v13 = cocos2d::CCLabelBMFont::create_1(a2, a4);
*(_QWORD *)(a1 + 328) = v13;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v13 + 160LL))(v13, a6);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 328), 2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 328) + 1024LL))(*(_QWORD *)(a1 + 328), 0);
v14 = cocos2d::CCFadeTo::create(255, 0.1);
v15 = (unsigned __int8)cocos2d::CCDelayTime::create(a5);
cocos2d::CCFadeOut::create(0.2);
cocos2d::CCCallFunc::create(a1, 536, 1);
v23 = sub_10021D420((__int64)v14, v16, v17, v18, v19, v20, v21, v22, v15);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 328), v23);
*(float *)(a1 + 316) = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 328) + 328LL))(*(_QWORD *)(a1 + 328))
* a6;
*(float *)(a1 + 320) = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 328) + 328LL))(*(_QWORD *)(a1 + 328))
+ 4)
* a6;
if ( a3 >= 1 )
{
sub_1000262CC(v38, 0.0, 0.0, 40.0, 40.0);
v24 = cocos2d::extension::CCScale9Sprite::create((__int64)"square02b_small.png", (__int64)v38);
*(_QWORD *)(a1 + 336) = v24;
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v24 + 960LL))(v24, &unk_10076D71C);
v25 = *(_QWORD *)(a1 + 336);
sub_1000262C4(
v38,
(float)(*(float *)(a1 + 316) + 20.0) + (float)(*(float *)(a1 + 316) + 20.0),
(float)(*(float *)(a1 + 320) + 10.0) + (float)(*(float *)(a1 + 320) + 10.0));
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 320LL))(v25, v38);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 336) + 160LL))(*(_QWORD *)(a1 + 336), 0.5);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 336), 0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 336) + 912LL))(*(_QWORD *)(a1 + 336), 0);
v26 = cocos2d::CCFadeTo::create(a3, 0.1);
LOBYTE(v25) = (unsigned __int8)cocos2d::CCDelayTime::create(a5);
cocos2d::CCFadeTo::create(0, 0.2);
v34 = sub_10021D420((__int64)v26, v27, v28, v29, v30, v31, v32, v33, v25);
cocos2d::CCNode::runAction(*(_QWORD *)(a1 + 336), v34);
}
v35 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v35, v38);
sub_1000262BC(&v37, v38[0] * 0.5, v38[1] * 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 184LL))(a1, &v37);
return v12;
}