//
// SetupTransformPopup::init from 0x9a891c to 0x9a951c (3072 bytes)
//
// 2 xrefs:
// > SetupTransformPopup::create @ 0x9a96e8
// > ??> @ 0x7c830
//
// 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 SetupTransformPopup::init(SetupTransformPopup *a1, TransformTriggerGameObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w27
cocos2d::CCDirector *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
void *v10; // x0
float v11; // s2
void *v12; // x0
float v13; // s3
float v14; // s4
void *v15; // x0
float v16; // s3
float v17; // s4
void *v18; // x0
float v19; // s2
void *v20; // x0
float v21; // s2
void *v22; // x0
float v23; // s2
float v24; // s3
float v25; // s4
void *v26; // x0
float v27; // s3
float v28; // s4
void *v29; // x0
float v30; // s3
float v31; // s4
void *v32; // x0
float v33; // s2
void *v34; // x0
float v35; // s2
void *v36; // x19
unsigned int *v37; // x1
int v38; // w2
unsigned int *v39; // x1
int v40; // w2
unsigned int *v41; // x1
int v42; // w2
unsigned int *v43; // x1
int v44; // w2
unsigned int *v45; // x1
int v46; // w2
unsigned int *v47; // x1
int v48; // w2
unsigned int *v49; // x1
int v50; // w2
unsigned int *v51; // x1
int v52; // w2
unsigned int *v53; // x1
int v54; // w2
unsigned int *v55; // x1
int v56; // w2
unsigned int *v57; // x1
int v58; // w2
unsigned int *v59; // x1
int v60; // w2
unsigned int *v61; // x1
int v62; // w2
unsigned int *v63; // x22
int v64; // w0
int v65; // [xsp+18h] [xbp-18h]
__int64 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]
__int64 v74; // [xsp+20h] [xbp-10h]
_QWORD v75[2]; // [xsp+30h] [xbp+0h] BYREF
float v76; // [xsp+C0h] [xbp+90h]
float v77; // [xsp+C4h] [xbp+94h]
cocos2d::CCPoint v78; // [xsp+C8h] [xbp+98h] BYREF
cocos2d::CCPoint v79; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCPoint v80; // [xsp+D8h] [xbp+A8h] BYREF
__int64 v81; // [xsp+E0h] [xbp+B0h] BYREF
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
cocos2d::CCPoint v90; // 0:s0.4,4:s1.4
cocos2d::CCPoint v91; // 0:s0.4,4:s1.4
cocos2d::CCPoint v92; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 440.0, 310.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
cocos2d::CCPoint::CCPoint(&v78, v76 * 0.5, v77 * 0.5);
sub_D153B8((unsigned int)v75 + 176, "Setup Scale Command");
SetupTriggerPopup::addTitle(a1, (std::string)&v81);
v7 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v81 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v7);
}
sub_D153B8((unsigned int)v75 + 176, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v81);
v8 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(v81 - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v8);
}
SetupTriggerPopup::createMultiTriggerItemsCorner(a1);
sub_D153B8((int)&v80, "Help");
sub_D153B8(
(unsigned int)v75 + 176,
"Scales a specific Target Group ID.\n"
"Center Group ID specifies a target object to use as the center. If none is set, all objects use their own "
"center.\n"
"Duration specifies how long the scaling lasts.\n"
"Div by Value X/Y divides the current scale by the values.\n"
"Only Move makes the objects move as if they were scaled.\n"
"Relative Rotation rotates the X- and Y-axis too.\n"
"Relative Scale bases scaling on the reference object.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v80, (std::string)&v81, 1.0);
v9 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(v81 - 8);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v9);
}
v10 = (void *)(*(_QWORD *)&v80 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v80 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(*(_QWORD *)&v80 - 8LL);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(*(_QWORD *)&v80 - 8LL);
*(_DWORD *)(*(_QWORD *)&v80 - 8LL) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v10);
}
sub_D153B8((unsigned int)v75 + 176, "Only\nMove");
cocos2d::CCPoint::CCPoint(&v79, 110.0 - (float)(a1->m_width * 0.5), 50.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v82.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 133, (std::string)&v81, v82, (bool)&v80, 0, 0, v11);
v12 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(v81 - 8);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v12);
}
sub_D153B8((unsigned int)v75 + 176, "ScaleX:");
cocos2d::CCPoint::CCPoint(&v79, -100.0, 105.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v83.x = 0.9;
v65 = 3;
v70 = 0;
v83.y = 0.5;
SetupTriggerPopup::createValueControlAdvanced(
a1,
150,
(std::string)&v81,
v83,
2.0,
(bool)&v80,
(InputValueType)0,
1,
10,
v13,
v14,
0,
0,
GoldLabel,
0,
v65,
v70);
v15 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v55 = (unsigned int *)(v81 - 8);
do
v56 = __ldaxr(v55);
while ( __stlxr(v56 - 1, v55) );
}
else
{
v56 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v56 - 1;
}
if ( v56 <= 0 )
operator delete(v15);
}
sub_D153B8((unsigned int)v75 + 176, "ScaleY:");
cocos2d::CCPoint::CCPoint(&v79, 105.0, 105.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v84.x = 0.9;
LODWORD(v66) = 3;
LOBYTE(v71) = 0;
v84.y = 0.5;
SetupTriggerPopup::createValueControlAdvanced(
a1,
151,
(std::string)&v81,
v84,
2.0,
(bool)&v80,
(InputValueType)0,
1,
10,
v16,
v17,
0,
0,
GoldLabel,
0,
v66,
v71);
v18 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(v81 - 8);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v18);
}
sub_D153B8((unsigned int)v75 + 176, "Div by Value X");
cocos2d::CCPoint::CCPoint(&v79, -150.0, 50.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v85.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 153, (std::string)&v81, v85, (bool)&v80, 0, 0, v19);
v20 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v57 = (unsigned int *)(v81 - 8);
do
v58 = __ldaxr(v57);
while ( __stlxr(v58 - 1, v57) );
}
else
{
v58 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v58 - 1;
}
if ( v58 <= 0 )
operator delete(v20);
}
sub_D153B8((unsigned int)v75 + 176, "Div by Value Y");
cocos2d::CCPoint::CCPoint(&v79, 55.0, 50.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v86.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 154, (std::string)&v81, v86, (bool)&v80, 0, 0, v21);
v22 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(v81 - 8);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v22);
}
cocos2d::CCPoint::CCPoint(&v80, -100.0, 20.0);
cocos2d::CCPoint::operator+(&v81, &v78, &v80);
v87.x = 0.8;
SetupTriggerPopup::createEasingControls(a1, v87, v23, (unsigned int)v75 + 176, 0);
sub_D153B8((unsigned int)v75 + 176, "Duration:");
cocos2d::CCPoint::CCPoint(&v79, -100.0, -45.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v88.x = 0.9;
v88.y = 0.0;
LODWORD(v67) = 2;
LOBYTE(v72) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
10,
(std::string)&v81,
v88,
10.0,
(bool)&v80,
(InputValueType)0,
1,
10,
v24,
v25,
0,
0,
GoldLabel,
0,
v67,
v72);
v26 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v61 = (unsigned int *)(v81 - 8);
do
v62 = __ldaxr(v61);
while ( __stlxr(v62 - 1, v61) );
}
else
{
v62 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v62 - 1;
}
if ( v62 <= 0 )
operator delete(v26);
}
sub_D153B8((unsigned int)v75 + 176, "Center Group ID:");
cocos2d::CCPoint::CCPoint(&v79, 115.0, -20.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v89.x = 0.9;
v89.y = -100.0;
LODWORD(v68) = 0;
LOBYTE(v73) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
71,
(std::string)&v81,
v89,
100.0,
(bool)&v80,
Float,
2,
10,
v27,
v28,
1,
0,
GoldLabel,
0,
v68,
v73);
v29 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(v81 - 8);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v29);
}
sub_D153B8((unsigned int)v75 + 176, "Target Group ID:");
cocos2d::CCPoint::CCPoint(&v79, 115.0, -90.0);
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v90.x = 0.9;
v90.y = -100.0;
LODWORD(v69) = 0;
LOBYTE(v74) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
51,
(std::string)&v81,
v90,
100.0,
(bool)&v80,
Float,
2,
10,
v30,
v31,
1,
0,
GoldLabel,
0,
v69,
v74);
v32 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v59 = (unsigned int *)(v81 - 8);
do
v60 = __ldaxr(v59);
while ( __stlxr(v60 - 1, v59) );
}
else
{
v60 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v60 - 1;
}
if ( v60 <= 0 )
operator delete(v32);
}
sub_D153B8((unsigned int)v75 + 176, "Relative\nScale");
cocos2d::CCPoint::CCPoint(&v79, 50.0, 20.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v91.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 577, (std::string)&v81, v91, (bool)&v80, 0, 0, v33);
v34 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(v81 - 8);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v34);
}
sub_D153B8((unsigned int)v75 + 176, "Relative\nRotation");
cocos2d::CCPoint::CCPoint(&v79, (float)(a1->m_width * 0.5) + -85.0, 20.0 - (float)(a1->m_height * 0.5));
cocos2d::CCPoint::operator+(&v80, &v78, &v79);
v92.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 452, (std::string)&v81, v92, (bool)&v80, 0, 0, v35);
v36 = (void *)(v81 - 24);
if ( (__int64 *)(v81 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v63 = (unsigned int *)(v81 - 8);
do
v64 = __ldaxr(v63);
while ( __stlxr(v64 - 1, v63) );
}
else
{
v64 = *(_DWORD *)(v81 - 8);
*(_DWORD *)(v81 - 8) = v64 - 1;
}
if ( v64 <= 0 )
operator delete(v36);
}
SetupTriggerPopup::postSetup(a1);
}
return v4;
}