//
// EditorUI::showMaxBasicError from 0x100034960 to 0x100034a8e (302 bytes)
//
// 3 xrefs:
// > EditorUI::onDuplicate @ 0x10002ad00
// > EditorUI::onCreate @ 0x10002e25e
// > EditorUI::doPasteObjects @ 0x10003e261
//
// 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
//
void __fastcall EditorUI::showMaxBasicError(EditorUI *a1)
{
double v1; // xmm0_8
cocos2d::CCString *v2; // rax
const char *CString; // r15
size_t v4; // rax
size_t v5; // r14
char *v6; // r12
size_t v7; // r13
__int64 v8; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( a1->m_alertShown )
return;
a1->m_alertShown = 1;
v2 = (cocos2d::CCString *)sub_1007AB580(
"You have reached the max limit of %i objects. You can increase it to %i, b"
"ut your level may become unstable on some devices, so it is recommended to stay below this"
" limit. Levels with object count above this limit will display a warning when played online.",
__dst[0]);
CString = cocos2d::CCString::getCString(v2);
v4 = strlen(CString);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v1);
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = (char *)operator new(v7);
__p = v6;
__dst[0] = v7 + 1;
__dst[1] = v5;
}
else
{
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( !v4 )
goto LABEL_10;
}
memmove(v6, CString, v5);
LABEL_10:
v6[v5] = 0;
v8 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Max Objects", __dst, "Cancel", "Increase", 380.0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 72LL))(v8, 125);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1288LL))(v8);
}