//
// EditorUI::showMaxError from 0x100010a50 to 0x100010b79 (297 bytes)
//
// 4 xrefs:
// > EditorUI::onCreate @ 0x10000ceae
// > LevelEditorLayer::createObjectsFromString @ 0x1000af1f5
// > EditorUI::onDuplicate @ 0x1005b5e2b
// > EditorUI::doPasteObjects @ 0x1005b7f56
//
// 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:18:52 +0000
//
void __fastcall EditorUI::showMaxError(__int64 a1)
{
__int64 v1; // rax
const char *CString; // r15
size_t v3; // rax
size_t v4; // r14
char *v5; // r12
size_t v6; // r13
__int64 v7; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( *(_BYTE *)(a1 + 632) )
return;
*(_BYTE *)(a1 + 632) = 1;
v1 = sub_10088E820(
"You have reached the upper max limit of %i objects. This limit can be removed completely, but it is not recommended. Levels with object count above this limit will display a warning when played onli"
"ne.\n"
"Unoptimized levels that use too many objects have a lower chance of being rated and featured.",
__dst[0]);
CString = (const char *)cocos2d::CCString::getCString(v1);
v3 = strlen(CString);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v6 = 26;
if ( (v3 | 7) != 0x17 )
v6 = (v3 | 7) + 1;
v5 = (char *)operator new(v6);
__p = v5;
__dst[0] = v6 + 1;
__dst[1] = v4;
}
else
{
LOBYTE(__dst[0]) = 2 * v3;
v5 = (char *)__dst + 1;
if ( !v3 )
goto LABEL_10;
}
memmove(v5, CString, v4);
LABEL_10:
v5[v4] = 0;
v7 = FLAlertLayer::create_1(a1 + 408, "Max Objects", __dst, "Cancel", "Unlimited", 380.0);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 126);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
}