//
// SetupPickupTriggerPopup::init from 0x140436b20 to 0x14043723c (1820 bytes)
//
// 3 xrefs:
// > SetupPickupTriggerPopup::create @ 0x140436ade
// > ??> @ 0x1406d9e00
// > ??> @ 0x1406d9e0c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=3
bool SetupPickupTriggerPopup::init(SetupPickupTriggerPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
__int64 v5; // rcx
cocos2d::CCDirector *v6; // rax
double v7; // xmm0_8
int v8; // r9d
int v9; // ebx
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
char v14; // [rsp+80h] [rbp-88h]
__int64 v15; // [rsp+80h] [rbp-88h]
__int64 v16; // [rsp+80h] [rbp-88h]
float v17; // [rsp+88h] [rbp-80h]
int v18[2]; // [rsp+90h] [rbp-78h] BYREF
__int128 *v19; // [rsp+98h] [rbp-70h]
__int128 *v20; // [rsp+A0h] [rbp-68h]
__int128 v21; // [rsp+A8h] [rbp-60h] BYREF
__int64 v22; // [rsp+B8h] [rbp-50h]
__int64 v23; // [rsp+C0h] [rbp-48h]
__int128 v24; // [rsp+C8h] [rbp-40h] BYREF
__int64 v25; // [rsp+D8h] [rbp-30h]
__int64 v26; // [rsp+E0h] [rbp-28h]
char v27; // [rsp+160h] [rbp+58h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 300.0, 250.0, 1);
if ( result )
{
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize(v6);
v22 = 14;
v23 = 15;
strcpy((char *)&v21, "Pickup Trigger");
HIBYTE(v21) = 0;
SetupTriggerPopup::addTitle(a1, &v21);
v21 = 0;
v22 = 2;
v23 = 15;
strcpy((char *)&v21, "OK");
SetupTriggerPopup::addCloseButton(a1, &v21);
*(_QWORD *)v18 = &v21;
v21 = 0;
v22 = 0;
v23 = 15;
*(_QWORD *)&v21 = sub_14003AA10(0x100u);
v22 = 254;
v23 = 255;
strcpy(
(char *)v21,
"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.");
v24 = 0;
v25 = 4;
v26 = 15;
strcpy((char *)&v24, "Help");
v7 = SetupTriggerPopup::addHelpButton(a1, &v24, &v21);
cocos2d::CCPoint::CCPoint(*(float *)&v7, v17 * 0.5);
v19 = &v21;
v21 = 0;
v22 = 6;
v23 = 15;
strcpy((char *)&v21, "ItemID");
cocos2d::CCPoint::CCPoint(0.0, -50.0);
cocos2d::CCPoint::operator+(&v27, v18);
v14 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
80,
(unsigned int)&v21,
(unsigned int)v18,
1061997773,
1,
3,
6,
1,
0,
1120403456,
0,
0,
0,
2,
v14);
v20 = &v24;
v24 = 0;
v25 = 0;
v26 = 15;
LOBYTE(v24) = 0;
cocos2d::CCPoint::CCPoint(0.0, -5.0);
cocos2d::CCPoint::operator+(&v27, v18);
SetupTriggerPopup::createPlusButton((int)a1, 80, (int)v18, v8, &v24, 0, 0);
v9 = (int)a1->getValue(a1, 88);
v20 = &v24;
v25 = 8;
v26 = 15;
v24 = 0x796C7069746C754DuLL;
cocos2d::CCPoint::CCPoint(0.0, 50.0);
cocos2d::CCPoint::operator+(&v27, v18);
LOBYTE(v10) = v9 == 1;
SetupTriggerPopup::createCustomToggleValueControl((_DWORD)a1, 1, v10, v11, (__int64)&v24, (__int64)v18, 0, 0, 0);
v20 = &v21;
v21 = 0;
v22 = 6;
v23 = 15;
strcpy((char *)&v21, "Divide");
cocos2d::CCPoint::CCPoint(0.0, 50.0);
cocos2d::CCPoint::operator+(&v27, v18);
LOBYTE(v12) = v9 == 2;
SetupTriggerPopup::createCustomToggleValueControl((_DWORD)a1, 2, v12, v13, (__int64)&v21, (__int64)v18, 0, 0, 0);
v20 = &v21;
v21 = 0;
v22 = 5;
v23 = 15;
strcpy((char *)&v21, "Count");
cocos2d::CCPoint::CCPoint(0.0, -50.0);
cocos2d::CCPoint::operator+(&v27, v18);
LOBYTE(v15) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
77,
(unsigned int)&v21,
(unsigned int)v18,
1061997773,
1,
2,
6,
1,
0,
1120403456,
0,
1,
0,
2,
v15);
v20 = &v24;
v25 = 8;
v26 = 15;
v24 = 0x656469727265764FuLL;
cocos2d::CCPoint::CCPoint(0.0, 50.0);
cocos2d::CCPoint::operator+(&v27, v18);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
139,
(unsigned int)&v24,
(unsigned int)v18,
0,
0,
1,
1065353216);
v20 = &v21;
*((_QWORD *)&v21 + 1) = 58;
v22 = 9;
v23 = 15;
*(_QWORD *)&v21 = 0x7265696669646F4DLL;
cocos2d::CCPoint::CCPoint(1.7260043e25, 0.0);
cocos2d::CCPoint::operator+(&v27, v18);
LOBYTE(v16) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
449,
(unsigned int)&v21,
(unsigned int)v18,
1061997773,
0,
1,
6,
0,
0,
1092616192,
0,
2,
0,
3,
v16);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
SetupPickupTriggerPopup::updateState(a1);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}