//
// sub_1005B2E60 from 0x1005b2e60 to 0x1005b3330 (1232 bytes)
//
// 1 xrefs:
// > sub_1005B2D50 @ 0x1005b2e14
//
// This function is hookable on this platform (idp: pc, 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 12:32:39 +0000
//
__int64 __fastcall sub_1005B2E60(float *a1, __int64 a2, __int64 a3)
{
__int64 result; // rax
unsigned int v4; // r15d
__int64 v5; // rax
__int128 v6; // [rsp+38h] [rbp-F8h] BYREF
void *v7; // [rsp+48h] [rbp-E8h]
char v8; // [rsp+50h] [rbp-E0h] BYREF
_BYTE v9[23]; // [rsp+51h] [rbp-DFh] BYREF
char v10; // [rsp+68h] [rbp-C8h] BYREF
char v11[15]; // [rsp+69h] [rbp-C7h] BYREF
void *v12; // [rsp+78h] [rbp-B8h]
__int128 v13; // [rsp+80h] [rbp-B0h] BYREF
void *v14; // [rsp+90h] [rbp-A0h]
__int128 v15; // [rsp+98h] [rbp-98h] BYREF
void *v16; // [rsp+A8h] [rbp-88h]
__int128 v17; // [rsp+B0h] [rbp-80h] BYREF
void *v18; // [rsp+C0h] [rbp-70h]
std::string v19; // [rsp+C8h] [rbp-68h] BYREF
__int64 v20; // [rsp+E0h] [rbp-50h] BYREF
unsigned __int64 v21; // [rsp+E8h] [rbp-48h] BYREF
unsigned __int64 v22; // [rsp+F0h] [rbp-40h] BYREF
__int128 v23; // [rsp+F8h] [rbp-38h] BYREF
void *v24; // [rsp+108h] [rbp-28h]
unsigned __int64 v25[4]; // [rsp+110h] [rbp-20h] BYREF
result = SetupTriggerPopup::init((__int64)a1, a2, a3, 1, 340.0, 240.0, 0.0);
if ( (_BYTE)result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
v8 = 16;
strcpy(v9, "Progress");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)&v8);
if ( (v8 & 1) != 0 )
operator delete(*(void **)&v9[15]);
v10 = 4;
strcpy(v11, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v10);
if ( (v10 & 1) != 0 )
operator delete(v12);
LOBYTE(v13) = 8;
strcpy((char *)&v13 + 1, "Help");
v16 = operator new(0x160u);
*(_QWORD *)&v15 = 353;
*((_QWORD *)&v15 + 1) = 346;
strcpy(
(char *)v16,
"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.");
SetupTriggerPopup::addHelpButton((__int64)a1, &v13, &v15, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v16);
if ( (v13 & 1) != 0 )
operator delete(v14);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1, (__int64)&v13);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v20, v5);
sub_100278250((float *)&v22, *(float *)&v20 * 0.5, 0.5 * *((float *)&v20 + 1));
strcpy((char *)&v17, "\nInput");
sub_100278250((float *)v25, -80.0, 50.0);
sub_100278350((double *)&v23, &v22, v25);
SetupTriggerPopup::createToggleValueControl((int)a1, 605, &v17, (__int64)&v23, 1, 0, 1.0, 0);
if ( (v17 & 1) != 0 )
operator delete(v18);
v19.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
strcpy(v19.__r_.__value_.__s.__data_, "Percent:");
sub_100278250((float *)v25, 50.0, 65.0);
sub_100278350((double *)&v23, &v22, v25);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
602,
&v19,
(__int64)&v23,
0,
2u,
0.80000001,
0.0,
99.0,
3u,
0,
0,
0x25Au,
0,
0,
0);
if ( (*(_BYTE *)&v19.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v19.__r_.__value_.__l.__data_);
SetupTriggerPopup::toggleLimitValue((__int64)a1, 602, 1);
LOBYTE(v23) = 14;
strcpy((char *)&v23 + 1, "ItemID:");
sub_100278250((float *)&v21, 50.0, 50.0);
sub_100278350((double *)v25, &v22, &v21);
IDNameInput::create((_DWORD)a1, (_DWORD)a1 + 544, 2, 95, (unsigned int)&v23, (unsigned int)v25, 6, 605, 0, 0);
if ( (v23 & 1) != 0 )
operator delete(v24);
LOBYTE(v6) = 6;
*(_DWORD *)((char *)&v6 + 1) = 6579265;
sub_100278250((float *)v25, -80.0, -20.0);
sub_100278350((double *)&v23, &v22, v25);
SetupTriggerPopup::createToggleValueControl((int)a1, 603, &v6, (__int64)&v23, 1, 0, 1.0, 0);
if ( (v6 & 1) != 0 )
operator delete(v7);
LOBYTE(v23) = 28;
strcpy((char *)&v23 + 1, "Target ItemID:");
sub_100278250((float *)&v21, 50.0, -20.0);
sub_100278350((double *)v25, &v22, &v21);
IDNameInput::create((_DWORD)a1, (_DWORD)a1 + 544, 2, 80, (unsigned int)&v23, (unsigned int)v25, 6, 0, 0, 0);
if ( (v23 & 1) != 0 )
operator delete(v24);
(*(void (__fastcall **)(float *, __int64, double))(*(_QWORD *)a1 + 1464LL))(a1, 605, COERCE_DOUBLE(1061997773));
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)a1 + 1456LL))(a1, 605);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}