//
// UILayer::showTextAlert from 0x1004c3270 to 0x1004c3401 (401 bytes)
//
// 16 xrefs:
// > UILayer::announceLevelControls @ 0x1004c3173
// > UILayer::handleAction @ 0x1004c3a92
// > UILayer::handleAction @ 0x1004c3c27
// > UILayer::handleAction @ 0x1004c3cee
// > UILayer::handleAction @ 0x1004c3dea
// > UILayer::handleAction @ 0x1004c3e64
// > UILayer::handleAction @ 0x1004c3f7f
// > UILayer::handleAction @ 0x1004c40cd
// > UILayer::handleAction @ 0x1004c4257
// > UILayer::handleAction @ 0x1004c42cb
// > UILayer::handleAction @ 0x1004c4569
// > UILayer::handleAction @ 0x1004c45e6
// > UILayer::handleAction @ 0x1004c4683
// > UILayer::handleAction @ 0x1004c4720
// > UILayer::handleAction @ 0x1004c4935
// > UILayer::handleAction @ 0x1004c4997
//
// This function is hookable on this platform (idp: pc, 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:31:06 +0000
//
__int64 __fastcall UILayer::showTextAlert(__int64 a1, std::string *a2, char a3, int a4, float a5)
{
const std::string::value_type *v6; // rsi
const char *data; // r14
size_t v8; // rax
size_t v9; // r15
char *v10; // r12
size_t v11; // r13
char *v12; // r14
float v14; // [rsp+0h] [rbp-70h] BYREF
float v15; // [rsp+8h] [rbp-68h] BYREF
__int128 __dst; // [rsp+10h] [rbp-60h] BYREF
void *v17; // [rsp+20h] [rbp-50h]
__int128 v18; // [rsp+28h] [rbp-48h] BYREF
void *__p; // [rsp+38h] [rbp-38h]
float v20; // [rsp+44h] [rbp-2Ch]
v20 = a5;
if ( !a4 )
{
v6 = "Off";
if ( a3 )
v6 = "On";
std::string::append(a2, v6);
}
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) != 0 )
data = a2->__r_.__value_.__l.__data_;
else
data = a2->__r_.__value_.__s.__data_;
v8 = strlen(data);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v9 = v8;
if ( v8 >= 0x17 )
{
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = (v8 | 7) + 1;
v10 = (char *)operator new(v11);
v17 = v10;
*(_QWORD *)&__dst = v11 + 1;
*((_QWORD *)&__dst + 1) = v9;
goto LABEL_15;
}
LOBYTE(__dst) = 2 * v8;
v10 = (char *)&__dst + 1;
if ( v8 )
LABEL_15:
memmove(v10, data, v9);
v10[v9] = 0;
LOBYTE(v18) = 24;
strcpy((char *)&v18 + 1, "chatFont.fnt");
v12 = TextAlertPopup::create(&__dst, 0x64u, &v18, v20, 0.60000002);
if ( (v18 & 1) != 0 )
operator delete(__p);
if ( (__dst & 1) != 0 )
operator delete(v17);
TextAlertPopup::setLabelColor((__int64)v12, 65280);
sub_100278250(&v14, 0.0, 1.0);
sub_100278250(&v15, 20.0, -20.0);
TextAlertPopup::setAlertPosition((__int64)v12, &v14, &v15);
return (*(__int64 (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v12, 100);
}