//
// SetupProgressPopup::init from 0xb78454 to 0xb7897c (1320 bytes)
//
// 2 xrefs:
// > SetupProgressPopup::create @ 0xb78bb0
// > ??> @ 0xa00a8
//
// 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:02:24 +0000
//
__int64 __fastcall SetupProgressPopup::init(SetupProgressPopup *this, ProgressGameObject *a2, cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *MultiTriggerItemsDefault; // x0
cocos2d::CCDirector *v13; // x0
void (__fastcall *v14)(SetupProgressPopup *, __int64); // x20
int v15; // [xsp+8h] [xbp-28h]
int v16; // [xsp+8h] [xbp-28h]
__int64 v17; // [xsp+A8h] [xbp+78h] BYREF
_BYTE v18[8]; // [xsp+B0h] [xbp+80h] BYREF
_BYTE v19[8]; // [xsp+B8h] [xbp+88h] BYREF
__int64 v20; // [xsp+C0h] [xbp+90h] BYREF
__int64 v21[2]; // [xsp+C8h] [xbp+98h] BYREF
void *v22; // [xsp+D8h] [xbp+A8h]
__int64 v23; // [xsp+E0h] [xbp+B0h] BYREF
__int64 v24; // [xsp+E8h] [xbp+B8h]
void *v25; // [xsp+F0h] [xbp+C0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 340.0, 240.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "Progress", 8u);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v23);
if ( (v23 & 1) != 0 )
operator delete(v25);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v23, v7, v8, v9, v10, v11);
if ( (v23 & 1) != 0 )
operator delete(v25);
v21[0] = 0;
v21[1] = 0;
v22 = nullptr;
std::string::__init(v21, "Help", 4u);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(
&v23,
"Sets the player's Platformer progress to the selected value.\n"
"Lower values are ignored.\n"
"Add increases the current progress by that amount.\n"
"Input takes the value from an itemID instead.\n"
"Progress is saved on death, like Classic percent, and awards orbs in rated levels.\n"
"Target ItemID: Progress is also written to this itemID.",
0x15Au);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v21, (char *)&v23, 1.0);
if ( (v23 & 1) != 0 )
operator delete(v25);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize(&v17, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, *(float *)&v17 * 0.5, *((float *)&v17 + 1) * 0.5);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "Input", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, -80.0, 50.0);
cocos2d::CCPoint::operator+(&v20, v18);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x25Du,
&v23,
(const cocos2d::CCPoint *)&v20,
1,
0,
0,
1.0);
if ( (v23 & 1) != 0 )
operator delete(v25);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "Percent:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, 50.0, 65.0);
cocos2d::CCPoint::operator+(&v20, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
602,
(char *)&v23,
(__int64)&v20,
0,
2,
3,
0,
0.8,
0.0,
99.0,
0,
602,
0,
0,
0);
if ( (v23 & 1) != 0 )
operator delete(v25);
SetupTriggerPopup::toggleLimitValue((__int64 **)this, 602, 1);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "ItemID:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, 50.0, 50.0);
cocos2d::CCPoint::operator+(&v20, v18);
LOBYTE(v15) = 0;
IDNameInput::create(this, (char *)this + 544, 2, 95, &v23, &v20, 6, 605, 0.8, 0, v15);
if ( (v23 & 1) != 0 )
operator delete(v25);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "Add", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, -80.0, -20.0);
cocos2d::CCPoint::operator+(&v20, v18);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x25Bu,
&v23,
(const cocos2d::CCPoint *)&v20,
1,
0,
0,
1.0);
if ( (v23 & 1) != 0 )
operator delete(v25);
v23 = 0;
v24 = 0;
v25 = nullptr;
std::string::__init(&v23, "Target ItemID:", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, 50.0, -20.0);
cocos2d::CCPoint::operator+(&v20, v18);
LOBYTE(v16) = 0;
IDNameInput::create(this, (char *)this + 544, 2, 80, &v23, &v20, 6, 0, 0.8, 0, v16);
if ( (v23 & 1) != 0 )
operator delete(v25);
v14 = *(void (__fastcall **)(SetupProgressPopup *, __int64))(*(_QWORD *)this + 1456LL);
(*(void (__fastcall **)(SetupProgressPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 605);
v14(this, 605);
SetupTriggerPopup::postSetup(this);
}
return v5;
}