//
// LevelBrowserLayer::showImportResult from 0x4a8998 to 0x4a8a9e (262 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::onImportLevels @ 0x4a8adc
// > LevelBrowserLayer::onLevelsImported @ 0x4a8ae2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:56 +0000
//
int __fastcall LevelBrowserLayer::showImportResult(int this, ButtonSprite *a2)
{
GJSearchObject **v3; // r8
void (__fastcall *v4)(GJSearchObject **, int, int); // r9
cocos2d::CCString *v5; // r0
char *CString; // r1
int v7; // r0
int *v8; // r0
int *v9; // r0
int v10[3]; // [sp+8h] [bp-2Ch] BYREF
int v11[3]; // [sp+14h] [bp-20h] BYREF
int v12; // [sp+20h] [bp-14h] BYREF
int v13; // [sp+24h] [bp-10h]
int v14; // [sp+28h] [bp-Ch]
v3 = (GJSearchObject **)this;
if ( (int)a2 <= 0 )
{
if ( a2 )
return this;
v12 = 0;
v13 = 0;
v14 = 0;
std::string::__init(&v12, "No levels were imported.", 0x18u);
v9 = FLAlertLayer::create((int)a2, (cocos2d::CCLabelBMFont *)"Info", (int)&v12, (ButtonSprite *)"OK", a2);
(*(void (__fastcall **)(int *))(*v9 + 656))(v9);
v8 = &v12;
}
else
{
memset(v10, 0, sizeof(v10));
if ( a2 == (ButtonSprite *)((char *)&dword_0 + 1) )
{
CString = "Level imported!";
}
else
{
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i levels imported!",
(const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v5);
}
std::string::assign(v10, CString);
v4 = *((void (__fastcall **)(GJSearchObject **, int, int))*v3 + 58);
std::string::basic_string(v11, (int)v10);
v12 = 0;
v13 = 0;
v14 = 0;
std::string::__init(&v12, &unk_B6B226, 0);
v7 = TextAlertPopup::create(v11, 1056964608, 1058642330, 150, &v12);
v4(v3, v7, 100);
std::string::~string((int)&v12);
std::string::~string((int)v11);
LevelBrowserLayer::loadPage(v3, v3[125]);
v8 = v10;
}
return std::string::~string((int)v8);
}