//
// ClearPlatformerSavesOptionsPopup::init from 0xc8f1ac to 0xc8f5a4 (1016 bytes)
//
// 3 xrefs:
// > ClearPlatformerSavesOptionsPopup::create @ 0xc8f7d8
// > ??> @ 0x6b980
// > ??> @ 0x14f4a30
//
// 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:47 +0000
//
__int64 __fastcall ClearPlatformerSavesOptionsPopup::init(ClearPlatformerSavesOptionsPopup *this)
{
cocos2d::CCDirector *v2; // x0
unsigned int v3; // w21
cocos2d::CCDirector *v5; // x0
float v6; // s9
float v7; // s8
float v8; // s11
const char *v9; // x1
__int64 v10; // x24
__int64 v11; // x24
cocos2d::CCNode *v12; // x28
void (__fastcall *v13)(__int64, __int64 *); // x27
__int64 v14; // x24
cocos2d::CCNode *v15; // x26
void (__fastcall *v16)(__int64, __int64 *); // x25
GameManager *v17; // x0
GameManager *v18; // x0
unsigned __int8 GameVariable; // w27
cocos2d::CCNode *v20; // x26
__int64 v21; // x28
CCMenuItemToggler *ToggleButton; // x0
char v23; // w1
__int64 v24; // [xsp+C0h] [xbp+90h] BYREF
_BYTE v25[8]; // [xsp+C8h] [xbp+98h] BYREF
__int64 v26; // [xsp+D0h] [xbp+A0h] BYREF
__int64 v27; // [xsp+D8h] [xbp+A8h] BYREF
size_t v28; // [xsp+E0h] [xbp+B0h]
void *v29; // [xsp+E8h] [xbp+B8h]
__int64 v30[2]; // [xsp+F0h] [xbp+C0h] BYREF
void *v31; // [xsp+100h] [xbp+D0h]
__int64 v32; // [xsp+108h] [xbp+D8h] BYREF
size_t v33; // [xsp+110h] [xbp+E0h]
void *v34; // [xsp+118h] [xbp+E8h]
__int64 v35[2]; // [xsp+120h] [xbp+F0h] BYREF
void *v36; // [xsp+130h] [xbp+100h]
v2 = (cocos2d::CCDirector *)(unsigned __int8)SetupTriggerPopup::init(this, nullptr, nullptr, 240.0, 100.0, 1u, 0.0);
v3 = (unsigned __int8)v2;
if ( (_BYTE)v2 )
{
v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(&v24, v5);
v6 = *((float *)&v24 + 1) * 0.5;
v7 = *(float *)&v24 * 0.5;
v8 = (float)(*((float *)&v24 + 1) * 0.5) + 50.0;
v10 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v9);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v10 + 160LL))(v10, 0.8);
v11 = CCMenuItemSpriteExtra::create(v10, 0, (__int64)this, 1368, 1);
CCMenuItemSpriteExtra::setSizeMult(v11, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v11);
v12 = *((cocos2d::CCNode **)this + 69);
v13 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (float)(v7 - 120.0) + 8.0, v8 - 12.0);
cocos2d::CCNode::convertToNodeSpace(&v26, v12, (const cocos2d::CCPoint *)v25);
v13(v11, &v26);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(
&v27,
"By default, online backup keeps platformer saves only for favorite levels.\n"
"Enable this to exclude those too, so no platformer saves are backed up.\n"
"\n"
"Default: Off",
0xB8u);
v30[0] = 0;
v30[1] = 0;
v31 = nullptr;
std::string::__init(v30, "Backup Saves", 0xCu);
v32 = 0;
v33 = 0;
v34 = nullptr;
if ( (v27 & 1) != 0 )
{
std::string::__init(&v32, v29, v28);
}
else
{
v34 = v29;
v32 = v27;
v33 = v28;
}
v14 = InfoAlertButton::create((char *)v30, (char *)&v32, 0.8);
if ( (v32 & 1) != 0 )
operator delete(v34);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v14);
v15 = *((cocos2d::CCNode **)this + 69);
v16 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, (float)(v7 + 120.0) - 16.0, v8 - 16.0);
cocos2d::CCNode::convertToNodeSpace(&v26, v15, (const cocos2d::CCPoint *)v25);
v16(v14, &v26);
v35[0] = 0;
v35[1] = 0;
v36 = nullptr;
v17 = (GameManager *)std::string::__init(v35, "No favorite saves\nin backup", 0x1Bu);
v18 = (GameManager *)GameManager::sharedState(v17);
GameVariable = GameManager::getGameVariable(v18, "0237");
v20 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v25, v7 - 68.0, v6);
v21 = *((_QWORD *)this + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, 8.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(__int64)v35,
(const char *)ClearPlatformerSavesOptionsPopup::onBackupToggle,
0,
GameVariable,
v20,
(const cocos2d::CCPoint *)v25,
(__int64)this,
v21,
0.8,
0.5,
130.0,
(float *)&v26,
"bigFont.fnt",
0,
0,
nullptr);
v23 = v35[0];
*((_QWORD *)this + 127) = ToggleButton;
if ( (v23 & 1) != 0 )
{
operator delete(v36);
ToggleButton = *((CCMenuItemToggler **)this + 127);
}
CCMenuItemToggler::setSizeMult(ToggleButton, 1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
}
return v3;
}