//
// SetupPickupTriggerPopup::init from 0x10001df00 to 0x10001e4fd (1533 bytes)
//
// 1 xrefs:
// > sub_10001DDF0 @ 0x10001deb4
//
// 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:18:57 +0000
//
__int64 __fastcall SetupPickupTriggerPopup::init(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // rax
unsigned int v4; // r15d
__int64 v5; // rax
int v6; // r14d
__m128 v7; // xmm0
_BYTE v8[8]; // [rsp+40h] [rbp-130h] BYREF
char v9; // [rsp+48h] [rbp-128h] BYREF
char v10[15]; // [rsp+49h] [rbp-127h] BYREF
void *v11; // [rsp+58h] [rbp-118h]
char v12; // [rsp+60h] [rbp-110h] BYREF
char v13[15]; // [rsp+61h] [rbp-10Fh] BYREF
void *v14; // [rsp+70h] [rbp-100h]
_QWORD v15[2]; // [rsp+78h] [rbp-F8h] BYREF
void *v16; // [rsp+88h] [rbp-E8h]
char v17; // [rsp+90h] [rbp-E0h] BYREF
_BYTE v18[23]; // [rsp+91h] [rbp-DFh] BYREF
char v19[16]; // [rsp+A8h] [rbp-C8h] BYREF
void *v20; // [rsp+B8h] [rbp-B8h]
char v21; // [rsp+C0h] [rbp-B0h] BYREF
_BYTE v22[23]; // [rsp+C1h] [rbp-AFh] BYREF
char v23; // [rsp+D8h] [rbp-98h] BYREF
_BYTE v24[23]; // [rsp+D9h] [rbp-97h] BYREF
float v25[2]; // [rsp+F0h] [rbp-80h] BYREF
char v26; // [rsp+F8h] [rbp-78h] BYREF
_BYTE v27[23]; // [rsp+F9h] [rbp-77h] BYREF
char v28; // [rsp+110h] [rbp-60h] BYREF
char v29[15]; // [rsp+111h] [rbp-5Fh] BYREF
void *v30; // [rsp+120h] [rbp-50h]
float v31; // [rsp+12Ch] [rbp-44h]
char v32; // [rsp+130h] [rbp-40h] BYREF
char v33[15]; // [rsp+131h] [rbp-3Fh] BYREF
void *v34; // [rsp+140h] [rbp-30h]
_BYTE v35[8]; // [rsp+148h] [rbp-28h] BYREF
_BYTE v36[32]; // [rsp+150h] [rbp-20h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 1, 300.0, 250.0, 0.0);
if ( (_BYTE)result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
v5 = cocos2d::CCDirector::sharedDirector(a1, a2);
cocos2d::CCDirector::getWinSize(v25, v5);
v26 = 28;
strcpy(v27, "Pickup Trigger");
SetupTriggerPopup::addTitle(a1, &v26);
if ( (v26 & 1) != 0 )
operator delete(*(void **)&v27[15]);
v9 = 4;
strcpy(v10, "OK");
SetupTriggerPopup::addCloseButton(a1, &v9);
if ( (v9 & 1) != 0 )
operator delete(v11);
v12 = 8;
strcpy(v13, "Help");
v16 = operator new(0x100u);
v15[0] = 257;
v15[1] = 254;
strcpy(
(char *)v16,
"Changes the value of an Item ID by adding Count to the previous value.\n"
"Use Multiply or Divide to modify in another way than addition.\n"
"Override specifies the exact value to change to instead of modifying the previous value.");
SetupTriggerPopup::addHelpButton(a1, &v12, v15, 1.0);
if ( (v15[0] & 1) != 0 )
operator delete(v16);
if ( (v12 & 1) != 0 )
operator delete(v14);
sub_100278250(v35, v25[0] * 0.5, 0.5 * v25[1]);
v32 = 12;
strcpy(v33, "ItemID");
sub_100278250(v8, -50.0, 50.0);
sub_100278350(v36, v35, v8);
IDNameInput::create(a1, a1 + 544, 2, 80, (unsigned int)&v32, (unsigned int)v36, 6, 0, 0, 0);
if ( (v32 & 1) != 0 )
operator delete(v34);
v31 = (*(float (__fastcall **)(__int64, __int64, double))(*(_QWORD *)a1 + 1464LL))(
a1,
88,
COERCE_DOUBLE(1061997773));
v17 = 16;
strcpy(v18, "Multiply");
sub_100278250(v36, 50.0, 70.0);
sub_100278350(&v32, v35, v36);
v6 = (int)v31;
SetupTriggerPopup::createCustomToggleValueControl(
a1,
1,
(int)v31 == 1,
1,
(unsigned int)&v17,
(unsigned int)&v32,
0,
0,
0);
if ( (v17 & 1) != 0 )
operator delete(*(void **)&v18[15]);
v28 = 12;
strcpy(v29, "Divide");
sub_100278250(v36, 50.0, 30.0);
sub_100278350(&v32, v35, v36);
SetupTriggerPopup::createCustomToggleValueControl(
a1,
2,
v6 == 2,
1,
(unsigned int)&v28,
(unsigned int)&v32,
0,
0,
0);
if ( (v28 & 1) != 0 )
operator delete(v30);
strcpy(v19, "\nCount");
sub_100278250(v36, -50.0, -20.0);
sub_100278350(&v32, v35, v36);
SetupTriggerPopup::createValueControlAdvanced(a1, 77, v19, &v32, 1, 2, 0.80000001, 0.0, 100.0, 6, 1, 0, 1, 0, 2, 0);
if ( (v19[0] & 1) != 0 )
operator delete(v20);
v21 = 16;
strcpy(v22, "Override");
sub_100278250(v36, 50.0, -20.0);
sub_100278350(&v32, v35, v36);
SetupTriggerPopup::createToggleValueControl(a1, 139, (unsigned int)&v21, (unsigned int)&v32, 0, 0, 1);
if ( (v21 & 1) != 0 )
operator delete(*(void **)&v22[15]);
v23 = 18;
strcpy(v24, "Modifier:");
sub_100278250(v36, 0.0, -20.0);
sub_100278350(&v32, v35, v36);
v7 = (__m128)0x3F4CCCCDu;
SetupTriggerPopup::createValueControlAdvanced(a1, 449, &v23, &v32, 0, 1, 0.80000001, 0.0, 10.0, 6, 0, 0, 2, 0, 3, 0);
if ( (v23 & 1) != 0 )
operator delete(*(void **)&v24[15]);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
*(double *)v7.i64 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 88);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(
a1,
1,
_mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss(v7, (__m128)0LL)) & 1);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(
a1,
2,
_mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v7, (__m128)0LL)) & 1);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}