//
// SetupItemCompareTriggerPopup::init from 0xa4cc10 to 0xa4e1a8 (5528 bytes)
//
// 2 xrefs:
// > SetupItemCompareTriggerPopup::create @ 0xa4e3b0
// > ??> @ 0x63b88
//
// 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 SetupItemCompareTriggerPopup::init(
SetupItemCompareTriggerPopup *a1,
ItemTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
cocos2d::CCLabelBMFont *v5; // x24
void *v6; // x0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25
__int64 v8; // x26
__int64 v9; // x2
__int64 v10; // x3
__int64 v11; // x4
__int64 v12; // x5
const char *v13; // x6
void *v14; // x0
void *v15; // x0
void *v16; // x0
cocos2d::CCDirector *v17; // x0
float v18; // s3
float v19; // s4
void *v20; // x0
int v21; // w24
void *v22; // x0
void *v23; // x0
void *v24; // x0
void *v25; // x0
void *v26; // x0
float v27; // s3
float v28; // s4
void *v29; // x0
int v30; // w24
void *v31; // x0
void *v32; // x0
void *v33; // x0
void *v34; // x0
void *v35; // x0
float v36; // s3
float v37; // s4
void *v38; // x0
float v39; // s3
float v40; // s4
void *v41; // x0
float v42; // s3
float v43; // s4
void *v44; // x0
float v45; // s3
float v46; // s4
void *v47; // x0
float v48; // s3
float v49; // s4
void *v50; // x0
int v51; // w27
bool v52; // w4
__int64 v53; // x5
const char *v54; // x6
float v55; // s0
unsigned int v56; // w24
float v57; // s9
const char *v58; // x1
cocos2d::CCNode *v59; // x23
cocos2d::CCComponentContainer *m_pComponentContainer; // x28
void (__fastcall *visit)(cocos2d::CCComponentContainer *__hidden, float); // x26
__int64 v62; // x0
CCMenuItemSpriteExtra *v63; // x23
cocos2d::CCMenu *m_buttonMenu; // x28
void (__fastcall *v65)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
cocos2d::CCNode *v66; // x23
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x24
cocos2d::CCLabelBMFont *v68; // x0
cocos2d::CCLabelBMFont *m_formulaLabel; // x23
void (__fastcall *v70)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
unsigned int *v71; // x1
int v72; // w2
unsigned int *v73; // x1
int v74; // w2
unsigned int *v75; // x1
int v76; // w2
unsigned int *v77; // x1
int v78; // w2
unsigned int *v79; // x1
int v80; // w2
unsigned int *v81; // x1
int v82; // w2
unsigned int *v83; // x1
int v84; // w2
unsigned int *v85; // x1
int v86; // w2
unsigned int *v87; // x1
int v88; // w2
unsigned int *v89; // x1
int v90; // w2
unsigned int *v91; // x1
int v92; // w2
unsigned int *v93; // x1
int v94; // w2
unsigned int *v95; // x1
int v96; // w2
unsigned int *v97; // x1
int v98; // w2
unsigned int *v99; // x1
int v100; // w2
unsigned int *v101; // x1
int v102; // w2
unsigned int *v103; // x1
int v104; // w2
unsigned int *v105; // x1
int v106; // w2
unsigned int *v107; // x1
int v108; // w2
unsigned int *v109; // x1
int v110; // w2
unsigned int *v111; // x1
int v112; // w2
_QWORD v113[2]; // [xsp+30h] [xbp+0h] BYREF
float *v114; // [xsp+D8h] [xbp+A8h]
bool v115; // [xsp+E7h] [xbp+B7h]
cocos2d::CCPoint *v116; // [xsp+E8h] [xbp+B8h]
float v117; // [xsp+F0h] [xbp+C0h] BYREF
float v118; // [xsp+F4h] [xbp+C4h]
cocos2d::CCPoint v119; // [xsp+F8h] [xbp+C8h] BYREF
cocos2d::CCPoint v120; // [xsp+100h] [xbp+D0h] BYREF
cocos2d::CCPoint v121; // [xsp+108h] [xbp+D8h] BYREF
cocos2d::CCPoint v122; // [xsp+110h] [xbp+E0h] BYREF
cocos2d::CCRect v123; // [xsp+118h] [xbp+E8h] BYREF
cocos2d::CCPoint v124; // 0:kr08_8.8
cocos2d::SEL_MenuHandler v125; // 0:x2.16
cocos2d::CCPoint v126; // 0:s0.4,4:s1.4
cocos2d::CCPoint v127; // 0:s0.4,4:s1.4
cocos2d::CCPoint v128; // 0:s0.4,4:s1.4
cocos2d::CCPoint v129; // 0:s0.4,4:s1.4
cocos2d::CCPoint v130; // 0:s0.4,4:s1.4
cocos2d::CCPoint v131; // 0:s0.4,4:s1.4
cocos2d::CCPoint v132; // 0:s0.4,4:s1.4
cocos2d::CCRect v133; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v115 = SetupTriggerPopup::init(a1, a2, a3, 430.0, 310.0, 1);
if ( v115 )
{
SetupTriggerPopup::preSetup(a1);
sub_D153B8((unsigned int)v113 + 232, "Item Compare");
v5 = SetupTriggerPopup::addTitle((__int64)a1);
v6 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v71 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v72 = __ldaxr(v71);
while ( __stlxr(v72 - 1, v71) );
}
else
{
v72 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v72 - 1;
}
if ( v72 <= 0 )
operator delete(v6);
}
setPosition = v5->setPosition;
v8 = (__int64)v5->getPosition(v5);
cocos2d::CCPoint::CCPoint(&v122, -85.0, 0.0);
cocos2d::CCPoint::operator+(&v123, v8, &v122);
setPosition(v5, &v123.origin);
sub_D153B8((unsigned int)v113 + 232, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (ButtonSprite **)&v123, v9, v10, v11, v12, v13);
v14 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v73 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v74 = __ldaxr(v73);
while ( __stlxr(v74 - 1, v73) );
}
else
{
v74 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v74 - 1;
}
if ( v74 <= 0 )
operator delete(v14);
}
sub_D153B8((int)&v122, "Help");
sub_D153B8(
(int)&v123,
"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.");
SetupTriggerPopup::addHelpButton((__int64)a1, 1.0);
v15 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v81 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v82 = __ldaxr(v81);
while ( __stlxr(v82 - 1, v81) );
}
else
{
v82 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v82 - 1;
}
if ( v82 <= 0 )
operator delete(v15);
}
v16 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v77 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v78 = __ldaxr(v77);
while ( __stlxr(v78 - 1, v77) );
}
else
{
v78 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v78 - 1;
}
if ( v78 <= 0 )
operator delete(v16);
}
v114 = &v117;
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v17 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v17);
cocos2d::CCPoint::CCPoint(&v119, v117 * 0.5, (float)(v118 * 0.5) + 66.0);
sub_D153B8((int)&v123, "ItemID1");
cocos2d::CCPoint::CCPoint(&v121, -100.0, 42.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v126.y = 0.0;
v126.x = 0.8;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x50u,
v126,
9999.0,
v18,
v19,
(std::string)&v123,
&v122,
Float,
Int,
10,
1u,
0,
0,
1,
0,
0);
v20 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v85 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v86 = __ldaxr(v85);
while ( __stlxr(v86 - 1, v85) );
}
else
{
v86 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v86 - 1;
}
if ( v86 <= 0 )
operator delete(v20);
}
SetupTriggerPopup::toggleLimitValue(a1, 80, 1);
v21 = (int)a1->getValue(a1, 476);
sub_D153B8((int)&v123, "Item");
cocos2d::CCPoint::CCPoint(&v121, 20.0, 43.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 1, v21 == 1, 1u, (int)&v123, &v122, 1u, 0, 0);
v22 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v75 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v76 = __ldaxr(v75);
while ( __stlxr(v76 - 1, v75) );
}
else
{
v76 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v76 - 1;
}
if ( v76 <= 0 )
operator delete(v22);
}
sub_D153B8((int)&v123, "Timer");
cocos2d::CCPoint::CCPoint(&v121, 62.0, 43.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 2, v21 == 2, 1u, (int)&v123, &v122, 1u, 0, 0);
v23 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v97 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v98 = __ldaxr(v97);
while ( __stlxr(v98 - 1, v97) );
}
else
{
v98 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v98 - 1;
}
if ( v98 <= 0 )
operator delete(v23);
}
sub_D153B8((int)&v123, "Points");
cocos2d::CCPoint::CCPoint(&v121, 104.0, 43.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 3, v21 == 3, 1u, (int)&v123, &v122, 1u, 0, 0);
v24 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v89 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v90 = __ldaxr(v89);
while ( __stlxr(v90 - 1, v89) );
}
else
{
v90 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v90 - 1;
}
if ( v90 <= 0 )
operator delete(v24);
}
sub_D153B8((int)&v123, "Time");
cocos2d::CCPoint::CCPoint(&v121, 146.0, 43.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 4, v21 == 4, 1u, (int)&v123, &v122, 1u, 0, 0);
v25 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v105 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v106 = __ldaxr(v105);
while ( __stlxr(v106 - 1, v105) );
}
else
{
v106 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v106 - 1;
}
if ( v106 <= 0 )
operator delete(v25);
}
sub_D153B8((int)&v123, "Att");
cocos2d::CCPoint::CCPoint(&v121, 188.0, 43.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 5, v21 == 5, 1u, (int)&v123, &v122, 1u, 0, 0);
v26 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v83 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v84 = __ldaxr(v83);
while ( __stlxr(v84 - 1, v83) );
}
else
{
v84 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v84 - 1;
}
if ( v84 <= 0 )
operator delete(v26);
}
sub_D153B8((int)&v123, "ItemID2");
cocos2d::CCPoint::CCPoint(&v121, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v127.x = 0.8;
v127.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x5Fu,
v127,
9999.0,
v27,
v28,
(std::string)&v123,
&v122,
Float,
Int,
10,
1u,
0,
0,
1,
0,
0);
v29 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v101 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v102 = __ldaxr(v101);
while ( __stlxr(v102 - 1, v101) );
}
else
{
v102 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v102 - 1;
}
if ( v102 <= 0 )
operator delete(v29);
}
SetupTriggerPopup::toggleLimitValue(a1, 95, 1);
v30 = (int)a1->getValue(a1, 477);
sub_D153B8((int)&v123, "Item");
cocos2d::CCPoint::CCPoint(&v121, 20.0, -1.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 101, v30 == 1, 1u, (int)&v123, &v122, 1u, 0, 0);
v31 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v93 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v94 = __ldaxr(v93);
while ( __stlxr(v94 - 1, v93) );
}
else
{
v94 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v94 - 1;
}
if ( v94 <= 0 )
operator delete(v31);
}
sub_D153B8((int)&v123, "Timer");
cocos2d::CCPoint::CCPoint(&v121, 62.0, -1.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 102, v30 == 2, 1u, (int)&v123, &v122, 1u, 0, 0);
v32 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v109 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v110 = __ldaxr(v109);
while ( __stlxr(v110 - 1, v109) );
}
else
{
v110 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v110 - 1;
}
if ( v110 <= 0 )
operator delete(v32);
}
sub_D153B8((int)&v123, "Points");
cocos2d::CCPoint::CCPoint(&v121, 104.0, -1.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 103, v30 == 3, 1u, (int)&v123, &v122, 1u, 0, 0);
v33 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v79 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v80 = __ldaxr(v79);
while ( __stlxr(v80 - 1, v79) );
}
else
{
v80 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v80 - 1;
}
if ( v80 <= 0 )
operator delete(v33);
}
sub_D153B8((int)&v123, "Time");
cocos2d::CCPoint::CCPoint(&v121, 146.0, -1.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 104, v30 == 4, 1u, (int)&v123, &v122, 1u, 0, 0);
v34 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v99 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v100 = __ldaxr(v99);
while ( __stlxr(v100 - 1, v99) );
}
else
{
v100 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v100 - 1;
}
if ( v100 <= 0 )
operator delete(v34);
}
sub_D153B8((int)&v123, "Att");
cocos2d::CCPoint::CCPoint(&v121, 188.0, -1.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
SetupTriggerPopup::createCustomToggleValueControl(a1, 105, v30 == 5, 1u, (int)&v123, &v122, 1u, 0, 0);
v35 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v91 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v92 = __ldaxr(v91);
while ( __stlxr(v92 - 1, v91) );
}
else
{
v92 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v92 - 1;
}
if ( v92 <= 0 )
operator delete(v35);
}
sub_D153B8((int)&v123, "Mod1:");
cocos2d::CCPoint::CCPoint(&v121, -100.0, -42.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v128.x = 0.8;
v128.y = -2.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x1DFu,
v128,
2.0,
v36,
v37,
(std::string)&v123,
&v122,
(InputValueType)0,
Float,
10,
0,
0,
0,
1,
3,
0);
v38 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v107 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v108 = __ldaxr(v107);
while ( __stlxr(v108 - 1, v107) );
}
else
{
v108 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v108 - 1;
}
if ( v108 <= 0 )
operator delete(v38);
}
sub_D153B8((int)&v123, "Mod2:");
cocos2d::CCPoint::CCPoint(&v121, 100.0, -42.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v129.x = 0.8;
v129.y = -2.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x1E3u,
v129,
2.0,
v39,
v40,
(std::string)&v123,
&v122,
(InputValueType)0,
Float,
10,
0,
0,
0,
1,
3,
0);
v41 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v87 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v88 = __ldaxr(v87);
while ( __stlxr(v88 - 1, v87) );
}
else
{
v88 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v88 - 1;
}
if ( v88 <= 0 )
operator delete(v41);
}
sub_D153B8((int)&v123, "TrueID");
cocos2d::CCPoint::CCPoint(&v121, -100.0, -84.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v130.x = 0.8;
v130.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x33u,
v130,
9999.0,
v42,
v43,
(std::string)&v123,
&v122,
Float,
Int,
10,
1u,
0,
0,
1,
0,
0);
v44 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v103 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v104 = __ldaxr(v103);
while ( __stlxr(v104 - 1, v103) );
}
else
{
v104 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v104 - 1;
}
if ( v104 <= 0 )
operator delete(v44);
}
sub_D153B8((int)&v123, "FalseID");
cocos2d::CCPoint::CCPoint(&v121, 100.0, -84.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v131.x = 0.8;
v131.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x47u,
v131,
9999.0,
v45,
v46,
(std::string)&v123,
&v122,
Float,
Int,
10,
1u,
0,
0,
1,
0,
0);
v47 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v95 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v96 = __ldaxr(v95);
while ( __stlxr(v96 - 1, v95) );
}
else
{
v96 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v96 - 1;
}
if ( v96 <= 0 )
operator delete(v47);
}
sub_D153B8((int)&v123, "Tol+-:");
cocos2d::CCPoint::CCPoint(&v121, -100.0, -126.0);
cocos2d::CCPoint::operator+(&v122, &v119, &v121);
v132.x = 0.8;
v132.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x1E4u,
v132,
1.0,
v48,
v49,
(std::string)&v123,
&v122,
(InputValueType)0,
Float,
10,
0,
0,
0,
1,
3,
0);
v50 = (void *)(*(_QWORD *)&v123.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v123.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v111 = (unsigned int *)(*(_QWORD *)&v123.origin - 8LL);
do
v112 = __ldaxr(v111);
while ( __stlxr(v112 - 1, v111) );
}
else
{
v112 = *(_DWORD *)(*(_QWORD *)&v123.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v123.origin - 8LL) = v112 - 1;
}
if ( v112 <= 0 )
operator delete(v50);
}
v51 = 0;
cocos2d::CCPoint::CCPoint(&v120, 2.0, 2.0);
v116 = &v119;
while ( 1 )
{
switch ( v51 )
{
case 1:
v56 = 481;
break;
case 2:
v56 = 482;
break;
case 3:
v56 = 578;
break;
case 4:
v56 = 579;
break;
case 5:
v56 = 485;
v58 = (_BYTE *)(&dword_30 + 2);
v57 = 15.0;
goto LABEL_35;
case 6:
v57 = 36.0;
v56 = 486;
v58 = (_BYTE *)(&dword_30 + 2);
goto LABEL_35;
default:
v56 = 480;
break;
}
v57 = 0.0;
v58 = &byte_9[6];
LABEL_35:
v59 = (cocos2d::CCNode *)ButtonSprite::create((ButtonSprite *)"+", v58, 15, 1, 0.4, v52, v53, v54);
v59->setScale(v59, 0.8);
((void (__fastcall *)(cocos2d::CCComponentContainer *, float))v59[1].m_pComponentContainer->__vftable[2].remove)(
v59[1].m_pComponentContainer,
1.1);
m_pComponentContainer = v59[1].m_pComponentContainer;
visit = m_pComponentContainer->__vftable[2].visit;
v62 = ((__int64 (__fastcall *)(cocos2d::CCComponentContainer *))m_pComponentContainer->__vftable[3].~CCComponentContainer)(m_pComponentContainer);
cocos2d::CCPoint::operator+(&v123, v62, &v120);
((void (__fastcall *)(cocos2d::CCComponentContainer *, cocos2d::CCRect *))visit)(m_pComponentContainer, &v123);
v125.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v125.adj = (size_t)SetupItemCompareTriggerPopup::onOpButton;
v63 = CCMenuItemSpriteExtra::create(v59, nullptr, v125);
v63->setTag(v63, v56);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v63);
m_buttonMenu = a1->m_buttonMenu;
v65 = v63->setPosition;
if ( v51 <= 4 )
{
cocos2d::CCPoint::CCPoint(&v121, (float)((float)v51 * 42.0) + 20.0, -125.0);
cocos2d::CCPoint::operator+(&v122, v116, &v121);
}
else
{
cocos2d::CCPoint::CCPoint(
&v122,
(float)((float)((float)(*v114 * 0.5) + 75.0) + (float)(50 * (v51 % 5))) + v57,
(float)((float)(v114[1] * 0.5) + -60.0) - 35.0);
}
++v51;
v124 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v122);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v65)(v63, &v123, v124.x, v124.y);
v55 = a1->getValue(a1, v56);
SetupItemCompareTriggerPopup::updateOpButton(a1, v63, (int)v55, v56);
if ( v51 == 7 )
{
cocos2d::CCPoint::CCPoint(&v121, (float)(v117 * 0.5) + -80.0, (float)(v118 * 0.5) + -95.0);
cocos2d::CCRect::CCRect(&v123, 0.0, 0.0, 80.0, 80.0);
v66 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_square01.png",
(const char *)&v123,
v133);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v66->__vftable[1].~CCNode_0)(v66, 50);
((void (__fastcall *)(cocos2d::CCNode *, void *))v66->__vftable[1].getTag)(v66, &unk_F112A0);
setContentSize = v66->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v123, 960.0, 88.0);
setContentSize(v66, (const cocos2d::CCSize *)&v123);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v66, 1);
v66->setPosition(v66, &v121);
v66->setScale(v66, 0.25);
v68 = cocos2d::CCLabelBMFont::create();
a1->m_formulaLabel = v68;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v68, 2);
m_formulaLabel = a1->m_formulaLabel;
v70 = m_formulaLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v122, 0.0, 1.0);
cocos2d::CCPoint::operator+(&v123, &v121, &v122);
v70(m_formulaLabel, &v123.origin);
SetupItemCompareTriggerPopup::updateFormulaLabel(a1);
SetupTriggerPopup::postSetup(a1);
return v115;
}
}
}
return v115;
}