//
// SetupItemCompareTriggerPopup::init from 0x6b9df4 to 0x6ba99e (2986 bytes)
//
// 1 xrefs:
// > SetupItemCompareTriggerPopup::create @ 0x6baa1c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:56:45 +0000
//
GameManager *__fastcall SetupItemCompareTriggerPopup::init(
const cocos2d::CCPoint **this,
ItemTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
int v4; // r7
void (__fastcall *v5)(int, _BYTE *); // r8
int v6; // r9
cocos2d::CCDirector *MultiTriggerItemsDefaultHorizontal; // r0
double v8; // r0
int v9; // s15
int v10; // r0
int v11; // r11
double v12; // r0
int v13; // s15
int v14; // r0
int v15; // r11
int v16; // r4
int v17; // r7
float v18; // s17
const char *v19; // r1
ButtonSprite *v20; // r8
int v21; // r10
void (__fastcall *v22)(int, _BYTE *); // r9
int v23; // r0
CCMenuItemSpriteExtra *v24; // r8
const cocos2d::CCPoint *v25; // r10
float v26; // r0
int v27; // r4
void (__fastcall *v28)(int, _BYTE *); // r8
const char *v29; // r2
const cocos2d::CCPoint *v30; // r0
int v31; // r4
void (__fastcall *v32)(int, _BYTE *); // r9
bool v34; // [sp+4h] [bp-A0h]
GameManager *v35; // [sp+30h] [bp-74h]
void (__fastcall *v36)(CCMenuItemSpriteExtra *, _BYTE *); // [sp+34h] [bp-70h]
void (__fastcall *v37)(CCMenuItemSpriteExtra *, _BYTE *); // [sp+3Ch] [bp-68h]
float v38; // [sp+44h] [bp-60h] BYREF
float v39; // [sp+48h] [bp-5Ch]
_BYTE v40[8]; // [sp+4Ch] [bp-58h] BYREF
_BYTE v41[8]; // [sp+54h] [bp-50h] BYREF
_BYTE v42[8]; // [sp+5Ch] [bp-48h] BYREF
_BYTE v43[8]; // [sp+64h] [bp-40h] BYREF
_DWORD v44[2]; // [sp+6Ch] [bp-38h] BYREF
int v45[3]; // [sp+74h] [bp-30h] BYREF
int v46; // [sp+80h] [bp-24h] BYREF
int v47; // [sp+84h] [bp-20h]
int v48; // [sp+88h] [bp-1Ch]
_BYTE v49[16]; // [sp+8Ch] [bp-18h] BYREF
v35 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 430.0, 310.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v35 )
{
SetupTriggerPopup::preSetup((SetupTriggerPopup *)this);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Item Compare", 0xCu);
v4 = SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v46);
std::string::~string((int)&v46);
v5 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v4 + 92);
v6 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -85.0, 0.0);
cocos2d::CCPoint::operator+(v49, v6, v44);
v5(v4, v49);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v46);
std::string::~string((int)&v46);
memset(v45, 0, sizeof(v45));
std::string::__init(v45, "Help", 4u);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(
&v46,
"Activates TrueID or FalseID based on comparison of ItemID1 and ItemID2.\n"
"Use Item, Timer, Points, Time, or Att to specify type.\n"
"Mod1 and Mod2 are modifiers for the two Item IDs.\n"
"The first operator button sets interaction between ItemID1 and Mod 1 and similar for the second.\n"
"The third sets how the two values are compared.\n"
"Button 4/5 can be used to force values positive or negative.\n"
"Tol allows the result to be off a certain amount.\n"
"Click NA to switch to different rounding functions.",
0x214u);
SetupTriggerPopup::addHelpButton((int)this, (int)v45, (int)&v46, 1065353216);
std::string::~string((int)&v46);
std::string::~string((int)v45);
MultiTriggerItemsDefaultHorizontal = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal((SetupTriggerPopup *)this);
cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefaultHorizontal);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v38);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, v38 * 0.5, (float)(v39 * 0.5) + 66.0);
v8 = ((double (__fastcall *)(const cocos2d::CCPoint **, int))*((_DWORD *)*this + 183))(this, 476);
v9 = (int)*(float *)&v8;
v10 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)(int)*(float *)&v8, SHIDWORD(v8));
v46 = 0;
v47 = 0;
v48 = 0;
v11 = v10;
std::string::__init(&v46, "ItemID1", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -105.0, 42.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
IDNameInput::create((int)this, (int)(this + 110), v11, 80, (int)&v46, (int)v49, 0.8, 6, 0, 0, 1);
std::string::~string((int)&v46);
SetupTriggerPopup::toggleLimitValue((int **)this, 80, 1);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Item", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 20.0, 43.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
1,
v9 == 1,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Timer", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 62.0, 43.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
2,
v9 == 2,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Points", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 104.0, 43.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
3,
v9 == 3,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Time", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 146.0, 43.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
4,
v9 == 4,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Att", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 188.0, 43.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
5,
v9 == 5,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v12 = ((double (__fastcall *)(const cocos2d::CCPoint **, int))*((_DWORD *)*this + 183))(this, 477);
v13 = (int)*(float *)&v12;
v14 = IDNameInput::idNameTypeForItemValueType((IDNameInput *)(int)*(float *)&v12, SHIDWORD(v12));
v46 = 0;
v47 = 0;
v48 = 0;
v15 = v14;
std::string::__init(&v46, "ItemID2", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -105.0, 0.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
IDNameInput::create((int)this, (int)(this + 110), v15, 95, (int)&v46, (int)v49, 0.8, 6, 0, 0, 1);
std::string::~string((int)&v46);
SetupTriggerPopup::toggleLimitValue((int **)this, 95, 1);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Item", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 20.0, -1.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
101,
v13 == 1,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Timer", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 62.0, -1.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
102,
v13 == 2,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Points", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 104.0, -1.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
103,
v13 == 3,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Time", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 146.0, -1.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
104,
v13 == 4,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Att", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 188.0, -1.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createCustomToggleValueControl(
(int)this,
105,
v13 == 5,
1,
(int)&v46,
(const cocos2d::CCPoint *)v49,
1,
0,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Mod1:", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -105.0, -42.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createValueControlAdvanced(
this,
479,
(unsigned __int8 *)&v46,
(int)v49,
1061997773,
0,
1,
10,
0,
-1073741824,
0x40000000,
0,
0,
1,
3,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Mod2:", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 105.0, -42.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createValueControlAdvanced(
this,
483,
(unsigned __int8 *)&v46,
(int)v49,
1061997773,
0,
1,
10,
0,
-1073741824,
0x40000000,
0,
0,
1,
3,
0);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "TrueID", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -105.0, -84.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
IDNameInput::create((int)this, (int)(this + 110), 1, 51, (int)&v46, (int)v49, 0.8, 6, 0, 0, 1);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "FalseID", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, 105.0, -84.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
IDNameInput::create((int)this, (int)(this + 110), 1, 71, (int)&v46, (int)v49, 0.8, 6, 0, 0, 1);
std::string::~string((int)&v46);
v46 = 0;
v47 = 0;
v48 = 0;
std::string::__init(&v46, "Tol+-:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v44, -105.0, -126.0);
cocos2d::CCPoint::operator+(v49, v40, v44);
SetupTriggerPopup::createValueControlAdvanced(
this,
484,
(unsigned __int8 *)&v46,
(int)v49,
1061997773,
0,
1,
10,
0,
0,
1065353216,
0,
0,
1,
3,
0);
std::string::~string((int)&v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 2.0, 2.0);
v16 = 0;
while ( 1 )
{
switch ( v16 )
{
case 1:
v17 = 481;
break;
case 2:
v17 = 482;
break;
case 3:
v17 = 578;
break;
case 4:
v17 = 579;
break;
case 5:
v17 = 485;
v18 = 15.0;
LABEL_12:
v19 = (const char *)&word_32;
goto LABEL_13;
case 6:
v17 = 486;
v18 = 36.0;
goto LABEL_12;
default:
v17 = 480;
break;
}
v18 = 0.0;
v19 = byte_9 + 6;
LABEL_13:
v20 = ButtonSprite::create((ButtonSprite *)"+", v19, 15, 0.4, COERCE_FLOAT(1), v34);
(*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v20 + 80))(v20, 1061997773);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v20 + 134) + 80))(*((_DWORD *)v20 + 134), 1066192077);
v21 = *((_DWORD *)v20 + 134);
v22 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
v23 = (*(int (__fastcall **)(int))(*(_DWORD *)v21 + 96))(v21);
cocos2d::CCPoint::operator+(v49, v23, v41);
v22(v21, v49);
v44[0] = SetupItemCompareTriggerPopup::onOpButton;
v44[1] = 0;
v24 = (CCMenuItemSpriteExtra *)CCMenuItemSpriteExtra::create(
(int)v20,
0,
(int)this,
(int)SetupItemCompareTriggerPopup::onOpButton,
0);
(*(void (__fastcall **)(CCMenuItemSpriteExtra *, int))(*(_DWORD *)v24 + 36))(v24, v17);
(*(void (__fastcall **)(_DWORD, CCMenuItemSpriteExtra *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v24);
v25 = *(this + 111);
if ( v16 <= 4 )
{
v37 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, (float)((float)v16 * 42.0) + 20.0, -125.0);
cocos2d::CCPoint::operator+(v43, v40, v42);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v49, v25);
v37(v24, v49);
}
else
{
v36 = *(void (__fastcall **)(CCMenuItemSpriteExtra *, _BYTE *))(*(_DWORD *)v24 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v43,
(float)((float)((float)(v38 * 0.5) + 75.0) + (float)(50 * (v16 % 5))) + v18,
(float)((float)(v39 * 0.5) - 60.0) - 35.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v49, v25);
v36(v24, v49);
}
++v16;
v26 = (*((float (__fastcall **)(const cocos2d::CCPoint **, int))*this + 183))(this, v17);
SetupItemCompareTriggerPopup::updateOpButton((SetupItemCompareTriggerPopup *)this, v24, (int)v26, v17);
if ( v16 == 7 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, (float)(v38 * 0.5) - 80.0, (float)(v39 * 0.5) - 95.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v49, 0.0, 0.0, 80.0, 80.0);
v27 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v49);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 456))(v27, 50);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v27 + 480))(v27, &unk_BEFBB0);
v28 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v27 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v49, 960.0, 88.0);
v28(v27, v49);
(*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v27, 1);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v27 + 92))(v27, v42);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1048576000);
v30 = (const cocos2d::CCPoint *)cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)" ",
"goldFont.fnt",
v29);
*(this + 178) = v30;
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(*(_DWORD *)*(this + 115) + 232))(
*(this + 115),
v30,
2);
v31 = (int)*(this + 178);
v32 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v31 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, 0.0, 1.0);
cocos2d::CCPoint::operator+(v49, v42, v43);
v32(v31, v49);
SetupItemCompareTriggerPopup::updateFormulaLabel((SetupItemCompareTriggerPopup *)this);
SetupTriggerPopup::postSetup((SetupTriggerPopup *)this);
return v35;
}
}
}
return v35;
}