//
// SetupInteractObjectPopup::init from 0x954aa0 to 0x9555d8 (2872 bytes)
//
// 2 xrefs:
// > SetupInteractObjectPopup::create @ 0x955798
// > ??> @ 0x46500
//
// 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
//
bool SetupInteractObjectPopup::init(SetupInteractObjectPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w25
void *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
cocos2d::CCDirector *v10; // x0
float v11; // s8
float v12; // s9
float v13; // s10
float v14; // s14
float v15; // s2
void *v16; // x0
float v17; // s3
float v18; // s4
void *v19; // x0
float v20; // s2
void *v21; // x0
void *v22; // x0
float v23; // s2
void *v24; // x0
float v25; // s3
float v26; // s4
void *v27; // x0
float v28; // s2
void *v29; // x0
float v30; // s3
float v31; // s4
void *v32; // x0
float v33; // s3
float v34; // s4
void *v35; // x0
float v36; // s2
void *v37; // x0
unsigned int *v38; // x1
int v39; // w2
unsigned int *v40; // x1
int v41; // w2
unsigned int *v42; // x1
int v43; // w2
unsigned int *v44; // x1
int v45; // w2
unsigned int *v46; // x1
int v47; // w2
unsigned int *v48; // x1
int v49; // w2
unsigned int *v50; // x1
int v51; // w2
unsigned int *v52; // x1
int v53; // w2
unsigned int *v54; // x1
int v55; // w2
unsigned int *v56; // x1
int v57; // w2
unsigned int *v58; // x1
int v59; // w2
unsigned int *v60; // x1
int v61; // w2
unsigned int *v62; // x1
int v63; // w2
unsigned int *v64; // x19
int v65; // w1
int v66; // [xsp+18h] [xbp-18h]
__int64 v67; // [xsp+18h] [xbp-18h]
__int64 v68; // [xsp+18h] [xbp-18h]
__int64 v69; // [xsp+18h] [xbp-18h]
char v70; // [xsp+20h] [xbp-10h]
__int64 v71; // [xsp+20h] [xbp-10h]
__int64 v72; // [xsp+20h] [xbp-10h]
__int64 v73; // [xsp+20h] [xbp-10h]
_QWORD v74[2]; // [xsp+30h] [xbp+0h] BYREF
float v75; // [xsp+D0h] [xbp+A0h]
float v76; // [xsp+D4h] [xbp+A4h]
cocos2d::CCPoint v77; // [xsp+D8h] [xbp+A8h] BYREF
cocos2d::CCPoint v78; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCPoint v79; // [xsp+E8h] [xbp+B8h] BYREF
__int64 v80; // [xsp+F0h] [xbp+C0h] BYREF
cocos2d::CCPoint v81; // 0:s0.4,4:s1.4
cocos2d::CCPoint v82; // 0:s0.4,4:s1.4
cocos2d::CCPoint v83; // 0:s0.4,4:s1.4
cocos2d::CCPoint v84; // 0:s0.4,4:s1.4
cocos2d::CCPoint v85; // 0:s0.4,4:s1.4
cocos2d::CCPoint v86; // 0:s0.4,4:s1.4
cocos2d::CCPoint v87; // 0:s0.4,4:s1.4
cocos2d::CCPoint v88; // 0:s0.4,4:s1.4
cocos2d::CCPoint v89; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 340.0, 280.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_D153B8((unsigned int)v74 + 192, "Edit Pickup");
SetupTriggerPopup::addTitle(a1, (std::string)&v80);
v6 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v38 = (unsigned int *)(v80 - 8);
do
v39 = __ldaxr(v38);
while ( __stlxr(v39 - 1, v38) );
}
else
{
v39 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v39 - 1;
}
if ( v39 <= 0 )
operator delete(v6);
}
sub_D153B8((unsigned int)v74 + 192, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v80);
v7 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v40 = (unsigned int *)(v80 - 8);
do
v41 = __ldaxr(v40);
while ( __stlxr(v41 - 1, v40) );
}
else
{
v41 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v41 - 1;
}
if ( v41 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v79, "Help");
sub_D153B8(
(int)&v80,
"Sets the object to be a pickup collectable for ItemID.\n"
"Points is how much it increases the count of that ItemID.\n"
"Toggle Trigger lets you toggle or spawn a specific group when collected.\n"
"Particle lets you refer to a custom particles to spawn when collected.\n"
"No Anim disables the animation upon collection.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v79, (std::string)&v80, 1.0);
v8 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v44 = (unsigned int *)(v80 - 8);
do
v45 = __ldaxr(v44);
while ( __stlxr(v45 - 1, v44) );
}
else
{
v45 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v45 - 1;
}
if ( v45 <= 0 )
operator delete(v8);
}
v9 = (void *)(*(_QWORD *)&v79 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v79 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v52 = (unsigned int *)(*(_QWORD *)&v79 - 8LL);
do
v53 = __ldaxr(v52);
while ( __stlxr(v53 - 1, v52) );
}
else
{
v53 = *(_DWORD *)(*(_QWORD *)&v79 - 8LL);
*(_DWORD *)(*(_QWORD *)&v79 - 8LL) = v53 - 1;
}
if ( v53 <= 0 )
operator delete(v9);
}
v10 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v10);
v11 = (float)(v76 * 0.5) + 70.0;
v12 = v75 * 0.5;
v13 = (float)(v75 * 0.5) - 130.0;
v14 = (float)(v75 * 0.5) + 85.0;
sub_D153B8((int)&v80, "Pickup\nItem");
cocos2d::CCPoint::CCPoint(&v79, v13, v11);
v81.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 381, (std::string)&v80, v81, (bool)&v79, 0, 0, v15);
v16 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v48 = (unsigned int *)(v80 - 8);
do
v49 = __ldaxr(v48);
while ( __stlxr(v49 - 1, v48) );
}
else
{
v49 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v49 - 1;
}
if ( v49 <= 0 )
operator delete(v16);
}
sub_D153B8((int)&v80, "ItemID");
cocos2d::CCPoint::CCPoint(&v79, v12, v11);
v82.y = 0.0;
v66 = 2;
v82.x = 0.7;
v70 = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
80,
(std::string)&v80,
v82,
100.0,
(bool)&v79,
Float,
3,
6,
v17,
v18,
1,
0,
ChatLabel,
0,
v66,
v70);
v19 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v56 = (unsigned int *)(v80 - 8);
do
v57 = __ldaxr(v56);
while ( __stlxr(v57 - 1, v56) );
}
else
{
v57 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v57 - 1;
}
if ( v57 <= 0 )
operator delete(v19);
}
sub_D153B8((int)&v80, "Sub\nCount");
cocos2d::CCPoint::CCPoint(&v79, v14, v11);
v83.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 78, (std::string)&v80, v83, (bool)&v79, 0, 0, v20);
v21 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v42 = (unsigned int *)(v80 - 8);
do
v43 = __ldaxr(v42);
while ( __stlxr(v43 - 1, v42) );
}
else
{
v43 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v43 - 1;
}
if ( v43 <= 0 )
operator delete(v21);
}
cocos2d::CCPoint::CCPoint(&v77, v12, v11);
cocos2d::CCPoint::CCPoint(&v78, 32.0, 22.0);
cocos2d::CCPoint::operator+(&v79, &v77, &v78);
sub_D153B8((int)&v80, &byte_F288A0);
SetupTriggerPopup::createPlusButton((int)a1, 1, (int)&v79, (int)&v80, 0);
v22 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v58 = (unsigned int *)(v80 - 8);
do
v59 = __ldaxr(v58);
while ( __stlxr(v59 - 1, v58) );
}
else
{
v59 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v59 - 1;
}
if ( v59 <= 0 )
operator delete(v22);
}
sub_D153B8((int)&v80, "Toggle\nTrigger");
cocos2d::CCPoint::CCPoint(&v79, v13, v11 - 60.0);
v84.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 382, (std::string)&v80, v84, (bool)&v79, 0, 0, v23);
v24 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v50 = (unsigned int *)(v80 - 8);
do
v51 = __ldaxr(v50);
while ( __stlxr(v51 - 1, v50) );
}
else
{
v51 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v51 - 1;
}
if ( v51 <= 0 )
operator delete(v24);
}
sub_D153B8((int)&v80, "Group ID");
cocos2d::CCPoint::CCPoint(&v79, v12, v11 - 60.0);
v85.x = 0.7;
v85.y = 0.0;
LODWORD(v67) = 2;
LOBYTE(v71) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
51,
(std::string)&v80,
v85,
100.0,
(bool)&v79,
Float,
3,
6,
v25,
v26,
1,
0,
(GJInputStyle)2,
0,
v67,
v71);
v27 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v62 = (unsigned int *)(v80 - 8);
do
v63 = __ldaxr(v62);
while ( __stlxr(v63 - 1, v62) );
}
else
{
v63 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v63 - 1;
}
if ( v63 <= 0 )
operator delete(v27);
}
sub_D153B8((int)&v80, "Enable\nGroup");
cocos2d::CCPoint::CCPoint(&v79, v14, v11 - 60.0);
v86.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 56, (std::string)&v80, v86, (bool)&v79, 0, 0, v28);
v29 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v46 = (unsigned int *)(v80 - 8);
do
v47 = __ldaxr(v46);
while ( __stlxr(v47 - 1, v46) );
}
else
{
v47 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v47 - 1;
}
if ( v47 <= 0 )
operator delete(v29);
}
sub_D153B8((int)&v80, "Particle");
cocos2d::CCPoint::CCPoint(&v79, (float)(v75 * 0.5) + -100.0, (float)(v11 - 120.0) - 5.0);
v87.x = 0.7;
v87.y = 0.0;
LODWORD(v68) = 2;
LOBYTE(v72) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
440,
(std::string)&v80,
v87,
100.0,
(bool)&v79,
Float,
3,
6,
v30,
v31,
1,
0,
GoldLabel,
0,
v68,
v72);
v32 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v60 = (unsigned int *)(v80 - 8);
do
v61 = __ldaxr(v60);
while ( __stlxr(v61 - 1, v60) );
}
else
{
v61 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v61 - 1;
}
if ( v61 <= 0 )
operator delete(v32);
}
sub_D153B8((int)&v80, "Points");
cocos2d::CCPoint::CCPoint(&v79, (float)(v75 * 0.5) + 100.0, (float)(v11 - 120.0) - 5.0);
v88.x = 0.7;
v88.y = 0.0;
LODWORD(v69) = 2;
LOBYTE(v73) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
383,
(std::string)&v80,
v88,
100.0,
(bool)&v79,
Float,
2,
8,
v33,
v34,
1,
0,
GoldLabel,
0,
v69,
v73);
v35 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v54 = (unsigned int *)(v80 - 8);
do
v55 = __ldaxr(v54);
while ( __stlxr(v55 - 1, v54) );
}
else
{
v55 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v55 - 1;
}
if ( v55 <= 0 )
operator delete(v35);
}
sub_D153B8((int)&v80, "No\nAnim");
cocos2d::CCPoint::CCPoint(&v79, v13, v11 - 180.0);
v89.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 463, (std::string)&v80, v89, (bool)&v79, 0, 0, v36);
v37 = (void *)(v80 - 24);
if ( (__int64 *)(v80 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v64 = (unsigned int *)(v80 - 8);
do
v65 = __ldaxr(v64);
while ( __stlxr(v65 - 1, v64) );
}
else
{
v65 = *(_DWORD *)(v80 - 8);
*(_DWORD *)(v80 - 8) = v65 - 1;
}
if ( v65 <= 0 )
operator delete(v37);
}
SetupTriggerPopup::postSetup(a1);
SetupInteractObjectPopup::updateItems(a1);
}
return v4;
}