//
// EditorUI::showMaxBasicError from 0x689724 to 0x68988c (360 bytes)
//
// 4 xrefs:
// > EditorUI::onCreate @ 0x6c0550
// > EditorUI::doPasteObjects @ 0x6c3974
// > EditorUI::onDuplicate @ 0x6c4f34
// > ??> @ 0xc5d60
//
// 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 EditorUI::showMaxBasicError(EditorUI *a1)
{
int v1; // w20
cocos2d::CCString *v2; // x0
char *CString; // x0
FLAlertLayer *v4; // x20
void *v5; // x0
unsigned int *v6; // x2
int v7; // w1
__int64 v8; // [xsp+40h] [xbp+40h] BYREF
v1 = (int)a1;
if ( !a1->m_alertShown )
{
a1->m_alertShown = 1;
v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You have reached the max limit of %i objects. You can incre"
"ase it to %i, but your level may become unstable on some de"
"vices, so it is recommended to stay below this limit. Levels with o"
"bject count above this limit will display a warning when played online.",
(const char *)&elf_hash_bucket[9874],
80000);
CString = (char *)cocos2d::CCString::getCString(v2);
sub_D153B8((int)&v8, CString);
v4 = FLAlertLayer::create(v1 + 408, (__int64)"Max Objects", (__int64)&v8);
v5 = (void *)(v8 - 24);
if ( (__int64 *)(v8 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v8 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(_DWORD *)(v8 - 8);
*(_DWORD *)(v8 - 8) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
v4->setTag(v4, 125);
v4->show(v4);
}
}