//
// SetupTeleportPopup::init from 0x9f128c to 0x9f2744 (5304 bytes)
//
// 2 xrefs:
// > SetupTeleportPopup::create @ 0x9f2940
// > ??> @ 0x96b40
//
// 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 SetupTeleportPopup::init(SetupTeleportPopup *a1, TeleportPortalObject *a2, cocos2d::CCArray *a3, int a4, bool a5)
{
_BOOL4 v5; // w28
void *v8; // x0
__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
void *v21; // x0
void *v22; // x0
void *v23; // x0
void *v24; // x0
void *v25; // x0
void *v26; // x0
void *v27; // x0
cocos2d::CCPoint v28; // x1
void *v29; // x0
float m_height; // s2
unsigned int v31; // w28
cocos2d::CCLabelBMFont *v32; // x26
cocos2d::CCArray *v33; // x0
cocos2d::CCArray *v34; // x0
CCMenuItemToggler *v35; // x26
void *v36; // x0
CCMenuItemToggler_vtbl *v37; // x2
char *v38; // x0
cocos2d::CCLabelBMFont *v39; // x26
void *v40; // x0
void *v41; // x0
float v42; // s0
float v43; // s1
float v44; // s3
float v45; // s4
void *v46; // x0
void *v47; // x0
float v48; // s3
float v49; // s4
void *v50; // x0
float v51; // s3
float v52; // s4
void *v53; // x0
float v54; // s3
float v55; // s4
void *v56; // x22
void (__fastcall *toggleGroup)(SetupTriggerPopup *__hidden, int, bool); // x19
float v58; // s0
void (__fastcall *v59)(SetupTriggerPopup *__hidden, int, bool); // x19
float v60; // s0
unsigned int *v61; // x1
int v62; // w2
unsigned int *v63; // x1
int v64; // w2
unsigned int *v65; // x1
int v66; // w2
unsigned int *v67; // x1
unsigned int *v68; // x1
int v69; // w2
unsigned int *v70; // x1
int v71; // w2
unsigned int *v72; // x1
int v73; // w2
unsigned int *v74; // x1
int v75; // w2
unsigned int *v76; // x19
int v77; // w0
unsigned int *v78; // x1
int v79; // w2
unsigned int *v80; // x1
int v81; // w2
unsigned int *v82; // x1
int v83; // w2
unsigned int *v84; // x1
int v85; // w2
unsigned int *v86; // x1
int v87; // w2
unsigned int *v88; // x1
int v89; // w2
unsigned int *v90; // x1
int v91; // w2
unsigned int *v92; // x1
int v93; // w2
unsigned int *v94; // x1
int v95; // w2
unsigned int *v96; // x1
int v97; // w2
unsigned int *v98; // x1
int v99; // w2
unsigned int *v100; // x1
int v101; // w2
unsigned int *v102; // x1
int v103; // w2
unsigned int *v104; // x1
int v105; // w2
_QWORD v106[2]; // [xsp+30h] [xbp+0h] BYREF
int v107; // [xsp+BCh] [xbp+8Ch]
cocos2d::CCPoint *v108; // [xsp+C0h] [xbp+90h]
cocos2d::CCLayer *m_mainLayer; // [xsp+C8h] [xbp+98h]
cocos2d::CCMenu *m_buttonMenu; // [xsp+D0h] [xbp+A0h]
bool v111; // [xsp+DBh] [xbp+ABh]
int v112; // [xsp+DCh] [xbp+ACh]
float v113; // [xsp+E0h] [xbp+B0h]
float v114; // [xsp+E4h] [xbp+B4h]
cocos2d::CCPoint v115; // [xsp+E8h] [xbp+B8h] BYREF
__int64 v116; // [xsp+F0h] [xbp+C0h] BYREF
cocos2d::CCPoint v117; // [xsp+F8h] [xbp+C8h] BYREF
char *v118; // [xsp+100h] [xbp+D0h] BYREF
cocos2d::CCPoint v119; // [xsp+108h] [xbp+D8h] BYREF
cocos2d::CCPoint v120; // [xsp+110h] [xbp+E0h] BYREF
cocos2d::CCPoint v121; // [xsp+118h] [xbp+E8h] BYREF
cocos2d::CCPoint v122; // [xsp+120h] [xbp+F0h] BYREF
cocos2d::CCPoint v123; // 0:s0.4,4:s1.4
cocos2d::CCPoint v124; // 0:s0.4,4:s1.4
cocos2d::CCPoint v125; // 0:s0.4,4:s1.4
cocos2d::CCPoint v126; // 0:s0.4,4:s1.4
cocos2d::CCPoint v127; // 0:s0.4,4:s1.4
v107 = a4;
v5 = a5;
v111 = SetupTriggerPopup::init(a1, a2, a3, 420.0, 280.0, 1);
if ( !v111 )
return v111;
a1->determineStartValues(a1);
sub_D153B8((unsigned int)v106 + 240, "Setup Teleport");
SetupTriggerPopup::addTitle((__int64)a1);
v8 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v104 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v105 = __ldaxr(v104);
while ( __stlxr(v105 - 1, v104) );
}
else
{
v105 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v105 - 1;
}
if ( v105 <= 0 )
operator delete(v8);
}
sub_D153B8((unsigned int)v106 + 240, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (ButtonSprite **)&v122, v9, v10, v11, v12, v13);
v14 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v98 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v99 = __ldaxr(v98);
while ( __stlxr(v99 - 1, v98) );
}
else
{
v99 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v99 - 1;
}
if ( v99 <= 0 )
operator delete(v14);
}
sub_D153B8((int)&v121, "Help");
sub_D153B8(
(unsigned int)v106 + 240,
"Teleports to an object using Target GroupID.\n"
"Smooth Ease makes the camera move slower.\n"
"Static Force lets you specify an exit force.\n"
"Redirect Force exits based on input force.\n"
"Save Offset keeps the offset from entering when exiting.\n"
"Redirect Dash will rotate the dash to the exit rotation in platformer mode.");
SetupTriggerPopup::addHelpButton((__int64)a1, 1.0);
v15 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v78 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v79 = __ldaxr(v78);
while ( __stlxr(v79 - 1, v78) );
}
else
{
v79 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v79 - 1;
}
if ( v79 <= 0 )
operator delete(v15);
}
v16 = (void *)(*(_QWORD *)&v121 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v121 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v94 = (unsigned int *)(*(_QWORD *)&v121 - 8LL);
do
v95 = __ldaxr(v94);
while ( __stlxr(v95 - 1, v94) );
}
else
{
v95 = *(_DWORD *)(*(_QWORD *)&v121 - 8LL);
*(_DWORD *)(*(_QWORD *)&v121 - 8LL) = v95 - 1;
}
if ( v95 <= 0 )
operator delete(v16);
}
v17 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v17);
cocos2d::CCPoint::CCPoint(&v115, v113 * 0.5, (float)(v114 * 0.5) + 75.0);
sub_D153B8((unsigned int)v106 + 240, "Target GroupID:");
cocos2d::CCPoint::CCPoint(&v120, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
v123.y = 0.0;
v123.x = 0.7;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x33u,
v123,
0.0,
v18,
v19,
(std::string)&v122,
&v121,
Float,
Uint,
6,
1u,
0,
0,
0,
2,
0);
v20 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v86 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v87 = __ldaxr(v86);
while ( __stlxr(v87 - 1, v86) );
}
else
{
v87 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v87 - 1;
}
if ( v87 <= 0 )
operator delete(v20);
}
cocos2d::CCPoint::CCPoint(&v122, 130.0, 42.0);
cocos2d::CCPoint::operator+(&v116, &v115, &v122);
sub_D153B8((unsigned int)v106 + 240, "Smooth\nEase");
cocos2d::CCPoint::CCPoint(&v120, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 55, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v21 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v100 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v101 = __ldaxr(v100);
while ( __stlxr(v101 - 1, v100) );
}
else
{
v101 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v101 - 1;
}
if ( v101 <= 0 )
operator delete(v21);
}
sub_D153B8((unsigned int)v106 + 240, "Save\nOffset");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -24.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 351, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v22 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v80 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v81 = __ldaxr(v80);
while ( __stlxr(v81 - 1, v80) );
}
else
{
v81 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v81 - 1;
}
if ( v81 <= 0 )
operator delete(v22);
}
sub_D153B8((unsigned int)v106 + 240, "Ignore X");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -48.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 352, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v23 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v96 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v97 = __ldaxr(v96);
while ( __stlxr(v97 - 1, v96) );
}
else
{
v97 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v97 - 1;
}
if ( v97 <= 0 )
operator delete(v23);
}
sub_D153B8((unsigned int)v106 + 240, "Ignore Y");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -72.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 353, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v24 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v88 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v89 = __ldaxr(v88);
while ( __stlxr(v89 - 1, v88) );
}
else
{
v89 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v89 - 1;
}
if ( v89 <= 0 )
operator delete(v24);
}
sub_D153B8((unsigned int)v106 + 240, "Instant\nCamera");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -96.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 464, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v25 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v92 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v93 = __ldaxr(v92);
while ( __stlxr(v93 - 1, v92) );
}
else
{
v93 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v93 - 1;
}
if ( v93 <= 0 )
operator delete(v25);
}
sub_D153B8((unsigned int)v106 + 240, "Snap\nGround");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -120.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 510, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v26 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v84 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v85 = __ldaxr(v84);
while ( __stlxr(v85 - 1, v84) );
}
else
{
v85 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v85 - 1;
}
if ( v85 <= 0 )
operator delete(v26);
}
sub_D153B8((unsigned int)v106 + 240, "Redirect\nDash");
cocos2d::CCPoint::CCPoint(&v120, 0.0, -144.0);
cocos2d::CCPoint::operator+(&v121, &v116, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 591, 0.78, (__int64)&v122, &v121, 0, 0, 0);
v27 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v82 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v83 = __ldaxr(v82);
while ( __stlxr(v83 - 1, v82) );
}
else
{
v83 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v83 - 1;
}
if ( v83 <= 0 )
operator delete(v27);
}
if ( v107 != 3022 )
{
cocos2d::CCPoint::CCPoint(
&v120,
(float)(v113 * 0.5) + 120.0,
24.0 - (float)((float)(a1->m_height * 0.5) - (float)(v114 * 0.5)));
if ( v5 )
{
sub_D153B8((int)&v121, "NO Multi\nActivate");
cocos2d::CCPoint::CCPoint(&v122, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 444, 1.0, (__int64)&v121, &v122, 0, 0, 0);
v28 = v121;
v29 = (void *)(*(_QWORD *)&v121 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v121 - 24LL) == &qword_124B6B0 )
goto LABEL_18;
if ( &pthread_create )
{
v67 = (unsigned int *)(*(_QWORD *)&v121 - 8LL);
do
v62 = __ldaxr(v67);
while ( __stlxr(v62 - 1, v67) );
goto LABEL_53;
}
goto LABEL_171;
}
sub_D153B8((int)&v121, "Multi\nActivate");
cocos2d::CCPoint::CCPoint(&v122, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 99, 1.0, (__int64)&v121, &v122, 0, 0, 0);
v28 = v121;
v29 = (void *)(*(_QWORD *)&v121 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v121 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v61 = (unsigned int *)(*(_QWORD *)&v121 - 8LL);
do
v62 = __ldaxr(v61);
while ( __stlxr(v62 - 1, v61) );
LABEL_53:
if ( v62 <= 0 )
operator delete(v29);
goto LABEL_18;
}
LABEL_171:
v62 = *(_DWORD *)(*(_QWORD *)&v28 - 8LL);
*(_DWORD *)(*(_QWORD *)&v28 - 8LL) = v62 - 1;
goto LABEL_53;
}
}
LABEL_18:
m_height = a1->m_height;
v108 = &v117;
v112 = -25;
v31 = 1;
cocos2d::CCPoint::CCPoint(
&v117,
(float)(v113 * 0.5) + -140.0,
(float)((float)(m_height * 0.5) + (float)(v114 * 0.5)) - 20.0);
v32 = cocos2d::CCLabelBMFont::create();
v32->setScale(v32, 0.5);
a1->m_mainLayer->addChild(a1->m_mainLayer, v32);
v33 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCPoint *))v32->setPosition)(
v32,
v108);
v34 = (cocos2d::CCArray *)cocos2d::CCArray::create(v33);
a1->m_teleportGravityToggles = v34;
cocos2d::CCObject::retain(v34);
do
{
v118 = &byte_124B6C8;
if ( v31 == 1 )
{
sub_D1798C(&v118, "Normal", 6);
}
else if ( v31 == 2 )
{
sub_D1798C(&v118, "Flipped", 7);
}
else
{
sub_D1798C(&v118, "Toggle", 6);
}
sub_D18D28(&v122);
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v119, -25.0, (float)v112);
cocos2d::CCPoint::operator+(&v120, v108, &v119);
m_mainLayer = a1->m_mainLayer;
cocos2d::CCPoint::CCPoint(&v121, 6.0, 0.0);
v35 = GameToolbox::createToggleButton(
0.6,
0.35,
60.0,
(__int64)&v122,
(void (__cdecl *)(cocos2d::CCObject *))SetupTeleportPopup::onTeleportGravity,
0,
0,
m_buttonMenu,
&v120,
a1,
m_mainLayer,
(float *)&v121,
(__int64)"bigFont.fnt",
0,
0,
nullptr);
v36 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v65 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v66 = __ldaxr(v65);
while ( __stlxr(v66 - 1, v65) );
}
else
{
v66 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v66 - 1;
}
if ( v66 <= 0 )
operator delete(v36);
}
v37 = v35->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v35->m_notClickable = 1;
v37->setTag(v35, v31);
cocos2d::CCArray::addObject(a1->m_teleportGravityToggles, v35);
v38 = v118 - 24;
if ( v118 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v63 = (unsigned int *)(v118 - 8);
do
v64 = __ldaxr(v63);
while ( __stlxr(v64 - 1, v63) );
}
else
{
v64 = *((_DWORD *)v118 - 2);
*((_DWORD *)v118 - 2) = v64 - 1;
}
if ( v64 <= 0 )
operator delete(v38);
}
++v31;
v112 -= 25;
}
while ( v31 != 4 );
cocos2d::CCPoint::CCPoint(&v122, -25.0, -60.0);
cocos2d::CCPoint::operator+(&v119, &v115, &v122);
v39 = cocos2d::CCLabelBMFont::create();
v39->setScale(v39, 0.5);
a1->m_mainLayer->addChild(a1->m_mainLayer, v39);
v39->setPosition(v39, &v119);
sub_D153B8((unsigned int)v106 + 240, "Static\nForce");
cocos2d::CCPoint::CCPoint(&v120, -80.0, -30.0);
cocos2d::CCPoint::operator+(&v121, &v119, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 345, 1.0, (__int64)&v122, &v121, 0, 0, 0);
v40 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v90 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v91 = __ldaxr(v90);
while ( __stlxr(v91 - 1, v90) );
}
else
{
v91 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v91 - 1;
}
if ( v91 <= 0 )
operator delete(v40);
}
sub_D153B8((unsigned int)v106 + 240, "Redirect\nForce");
cocos2d::CCPoint::CCPoint(&v120, 20.0, -30.0);
cocos2d::CCPoint::operator+(&v121, &v119, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 347, 1.0, (__int64)&v122, &v121, 0, 0, 0);
v41 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v68 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v69 = __ldaxr(v68);
while ( __stlxr(v69 - 1, v68) );
}
else
{
v69 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v69 - 1;
}
if ( v69 <= 0 )
operator delete(v41);
}
cocos2d::CCPoint::CCPoint(&v122, v113 * 0.5, (float)(v114 * 0.5) + -60.0);
cocos2d::CCPoint::operator=(&v115, v42, v43);
sub_D153B8((unsigned int)v106 + 240, "Force:");
cocos2d::CCPoint::CCPoint(&v120, -50.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
v124.x = 0.6;
v124.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x15Au,
v124,
30.0,
v44,
v45,
(std::string)&v122,
&v121,
(InputValueType)0,
Float,
6,
0,
0,
1,
0,
2,
0);
v46 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v70 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v71 = __ldaxr(v70);
while ( __stlxr(v71 - 1, v70) );
}
else
{
v71 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v71 - 1;
}
if ( v71 <= 0 )
operator delete(v46);
}
sub_D153B8((unsigned int)v106 + 240, "Additive");
cocos2d::CCPoint::CCPoint(&v120, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
SetupTriggerPopup::createToggleValueControl(a1, 443, 1.0, (__int64)&v122, &v121, 0, 0, 1);
v47 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v72 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v73 = __ldaxr(v72);
while ( __stlxr(v73 - 1, v72) );
}
else
{
v73 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v73 - 1;
}
if ( v73 <= 0 )
operator delete(v47);
}
sub_D153B8((unsigned int)v106 + 240, "Min:");
cocos2d::CCPoint::CCPoint(&v120, -120.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
v125.x = 0.6;
v125.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x15Cu,
v125,
10.0,
v48,
v49,
(std::string)&v122,
&v121,
(InputValueType)0,
Float,
6,
0,
0,
2,
0,
2,
0);
v50 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v74 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v75 = __ldaxr(v74);
while ( __stlxr(v75 - 1, v74) );
}
else
{
v75 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v75 - 1;
}
if ( v75 <= 0 )
operator delete(v50);
}
sub_D153B8((unsigned int)v106 + 240, "Max:");
cocos2d::CCPoint::CCPoint(&v120, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
v126.x = 0.6;
v126.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x15Du,
v126,
30.0,
v51,
v52,
(std::string)&v122,
&v121,
(InputValueType)0,
Float,
6,
0,
0,
2,
0,
2,
0);
v53 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v102 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v103 = __ldaxr(v102);
while ( __stlxr(v103 - 1, v102) );
}
else
{
v103 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v103 - 1;
}
if ( v103 <= 0 )
operator delete(v53);
}
sub_D153B8((unsigned int)v106 + 240, "Mod:");
cocos2d::CCPoint::CCPoint(&v120, 120.0, 0.0);
cocos2d::CCPoint::operator+(&v121, &v115, &v120);
v127.x = 0.6;
v127.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x15Eu,
v127,
2.0,
v54,
v55,
(std::string)&v122,
&v121,
(InputValueType)0,
Float,
6,
0,
0,
2,
0,
2,
0);
v56 = (void *)(*(_QWORD *)&v122 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v122 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v76 = (unsigned int *)(*(_QWORD *)&v122 - 8LL);
do
v77 = __ldaxr(v76);
while ( __stlxr(v77 - 1, v76) );
}
else
{
v77 = *(_DWORD *)(*(_QWORD *)&v122 - 8LL);
*(_DWORD *)(*(_QWORD *)&v122 - 8LL) = v77 - 1;
}
if ( v77 <= 0 )
operator delete(v56);
}
if ( v107 == 3022 )
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
a1->updateDefaultTriggerValues(a1);
toggleGroup = a1->toggleGroup;
v58 = a1->getValue(a1, 345);
toggleGroup(a1, 1, v58 != 0.0);
v59 = a1->toggleGroup;
v60 = a1->getValue(a1, 347);
v59(a1, 2, v60 != 0.0);
a1->m_disableTextDelegate = 0;
return v111;
}