//
// ClearPlatformerSavesPopup::onDelete from 0xc8f01c to 0xc8f1a8 (396 bytes)
//
// 3 xrefs:
// > ??> @ 0xff4f0
// > ClearPlatformerSavesPopup::init @ 0xc8fee0
// > ??> @ 0x1547c90
//
// This function is hookable on this platform (idp: arm, 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 13:05:46 +0000
//
__int64 __fastcall ClearPlatformerSavesPopup::onDelete(ClearPlatformerSavesPopup *this, cocos2d::CCObject *a2)
{
const char *v2; // x1
char *v3; // x19
size_t v4; // x0
ButtonSprite **v5; // x19
char *v7; // [xsp+38h] [xbp+38h]
__int64 v8; // [xsp+48h] [xbp+48h] BYREF
size_t v9; // [xsp+50h] [xbp+50h]
void *v10; // [xsp+58h] [xbp+58h]
__int64 v11; // [xsp+60h] [xbp+60h] BYREF
size_t v12; // [xsp+68h] [xbp+68h]
void *v13; // [xsp+70h] [xbp+70h]
if ( *((_BYTE *)this + 672) )
v2 = "This will clear all platformer saves, including favorites.\nContinue?";
else
v2 = "This will clear platformer saves on all non-favorite levels.\nContinue?";
v7 = (char *)v2;
v3 = (char *)this + 664;
v8 = 0;
v9 = 0;
v10 = nullptr;
v4 = strlen(v2);
std::string::__init(&v8, v7, v4);
v11 = 0;
v12 = 0;
v13 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v11, v10, v9);
}
else
{
v13 = v10;
v11 = v8;
v12 = v9;
}
v5 = (ButtonSprite **)FLAlertLayer::create(
(__int64)v3,
(cocos2d::CCLabelBMFont *)"Confirm",
(char *)&v11,
(ButtonSprite *)"Cancel",
(ButtonSprite *)"Delete",
380.0);
if ( (v11 & 1) != 0 )
operator delete(v13);
(*((void (__fastcall **)(ButtonSprite **, __int64))*v5 + 9))(v5, 1);
ButtonSprite::updateBGImage(v5[77], "GJ_button_06.png");
(*((void (__fastcall **)(ButtonSprite **))*v5 + 164))(v5);
if ( (v8 & 1) != 0 )
operator delete(v10);
return _stack_chk_guard;
}