// // TextAlertPopup::init from 0x1002af890 to 0x1002afb85 (757 bytes) // // 1 xrefs: // > TextAlertPopup::create @ 0x1002af7de // // 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 TextAlertPopup::init(__int64 a1, __int64 a2, int a3, std::string *a4, float a5, float a6) { bool result; // al unsigned int v9; // eax const char *v10; // r12 const char *data; // r15 cocos2d::CCLabelBMFont *v12; // rax unsigned int v13; // r15d unsigned int v14; // r12d unsigned int v15; // r13d unsigned int v16; // eax int v17; // r9d cocos2d::CCAction *v18; // rsi cocos2d::extension::CCScale9Sprite *v19; // r15 unsigned int v20; // r14d unsigned int v21; // r12d unsigned int v22; // eax int v23; // r8d int v24; // r9d cocos2d::CCAction *v25; // rax float v26[2]; // [rsp+4h] [rbp-4Ch] BYREF float v27[4]; // [rsp+Ch] [rbp-44h] BYREF float v28; // [rsp+1Ch] [rbp-34h] float v29; // [rsp+20h] [rbp-30h] bool v30; // [rsp+27h] [rbp-29h] cocos2d::CCRect v31; // 0:xmm0_8.8,8:xmm1_8.8 v29 = a6; v28 = a5; result = cocos2d::CCNode::init((cocos2d::CCNode *)a1); if ( !result ) return result; v30 = result; (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 304LL))(a1, &unk_1009A0258); v9 = (unsigned int)a4->__r_.__value_.__l.0; if ( (v9 & 1) != 0 ) { if ( !a4->__r_.__value_.__l.__size_ ) goto LABEL_9; LABEL_6: if ( (*(_BYTE *)a2 & 1) != 0 ) goto LABEL_10; goto LABEL_7; } if ( v9 >> 1 ) goto LABEL_6; LABEL_9: std::string::assign(a4, "bigFont.fnt"); if ( (*(_BYTE *)a2 & 1) != 0 ) { LABEL_10: v10 = *(const char **)(a2 + 16); if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_11; goto LABEL_8; } LABEL_7: v10 = (const char *)(a2 + 1); if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) == 0 ) { LABEL_11: data = a4->__r_.__value_.__s.__data_; goto LABEL_12; } LABEL_8: data = a4->__r_.__value_.__l.__data_; LABEL_12: v12 = cocos2d::CCLabelBMFont::create_3(v10, data); *(_QWORD *)(a1 + 328) = v12; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v12->setScale)(v12, v29); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 448LL))(a1, *(_QWORD *)(a1 + 328), 2); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 328) + 1008LL))(*(_QWORD *)(a1 + 328), 0); v13 = (unsigned int)cocos2d::CCFadeIn::create(0.1); v14 = (unsigned int)cocos2d::CCDelayTime::create(v28); v15 = (unsigned int)cocos2d::CCFadeOut::create(0.2); v16 = (unsigned int)cocos2d::CCCallFunc::create((cocos2d::CCObject *)a1, (cocos2d::SEL_CallFunc)0x209uLL); v18 = (cocos2d::CCAction *)sub_1003B5760(v13, v14, v15, v16, 0, v17); cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(a1 + 328), v18); *(float *)(a1 + 316) = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 328) + 312LL))(*(_QWORD *)(a1 + 328)) * v29; *(float *)(a1 + 320) = v29 * *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 328) + 312LL))(*(_QWORD *)(a1 + 328)) + 4); if ( a3 > 0 ) { v31.origin = 0; v31.size = 0; sub_10028CC00((__int64)v27, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u); v19 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v31); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, void *))v19->setColor)(v19, &unk_100818EA8); sub_10028CBF0( v27, (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 *)(cocos2d::extension::CCScale9Sprite *, float *))v19->setContentSize)(v19, v27); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float))v19->setScale)(v19, 0.5); (*(void (__fastcall **)(__int64, cocos2d::extension::CCScale9Sprite *, __int64))(*(_QWORD *)a1 + 448LL))( a1, v19, 0xFFFFFFFFLL); ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _QWORD))v19->setOpacity)(v19, 0); v20 = (unsigned int)cocos2d::CCFadeTo::create(0.1, a3); v21 = (unsigned int)cocos2d::CCDelayTime::create(v28); v22 = (unsigned int)cocos2d::CCFadeTo::create(0.2, 0); v25 = (cocos2d::CCAction *)sub_1003B5760(v20, v21, v22, 0, v23, v24); cocos2d::CCNode::runAction(v19, v25); } cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v27); sub_10028CBE0(v26, v27[0] * 0.5, 0.5 * v27[1]); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 184LL))(a1, v26); return v30; }
GD Web Decomp Icon

GD Web Decomp

Raw Source