//
// SetupShaderEffectPopup::setupPinch from 0xa04df4 to 0xa05c80 (3724 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0xa08664
// > ??> @ 0x7ac88
//
// 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
//
void SetupShaderEffectPopup::setupPinch(SetupShaderEffectPopup *a1)
{
void *v2; // x0
void *v3; // x0
void *v4; // x0
cocos2d::CCDirector *v5; // x0
void *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
void *v10; // x0
float v11; // s3
float v12; // s4
void *v13; // x0
float v14; // s3
float v15; // s4
void *v16; // x0
void *v17; // x0
void *v18; // x0
float v19; // s3
float v20; // s4
void *v21; // x0
float v22; // s3
float v23; // s4
void *v24; // x0
float v25; // s3
float v26; // s4
void *v27; // x0
void *v28; // x0
void *v29; // x0
float v30; // s0
_BOOL4 v31; // w21
float v32; // s2
unsigned int *v33; // x1
int v34; // w2
unsigned int *v35; // x1
int v36; // w2
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; // x1
int v64; // w2
unsigned int *v65; // x21
int v66; // w1
float v67; // [xsp+C8h] [xbp+98h]
float v68; // [xsp+CCh] [xbp+9Ch]
cocos2d::CCPoint v69; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCPoint v70; // [xsp+D8h] [xbp+A8h] BYREF
cocos2d::CCPoint v71; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCPoint v72; // [xsp+E8h] [xbp+B8h] BYREF
cocos2d::CCPoint v73; // [xsp+F0h] [xbp+C0h] BYREF
cocos2d::CCPoint v74; // 0:s0.4,4:s1.4
cocos2d::CCPoint v75; // 0:s0.4,4:s1.4
cocos2d::CCPoint v76; // 0:s0.4,4:s1.4
cocos2d::CCPoint v77; // 0:s0.4,4:s1.4
cocos2d::CCPoint v78; // 0:s0.4,4:s1.4
cocos2d::CCPoint v79; // 0:s0.4,4:s1.4
sub_D153B8((int)&v73, "Setup Pinch");
SetupTriggerPopup::addTitle((__int64)a1);
v2 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v33 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v34 = __ldaxr(v33);
while ( __stlxr(v34 - 1, v33) );
}
else
{
v34 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v34 - 1;
}
if ( v34 <= 0 )
operator delete(v2);
}
sub_D153B8((int)&v72, "Help");
sub_D153B8(
(int)&v73,
"Pinches the screen.\n"
"TargetX and TargetY is how much pinch to apply to each axis.\n"
"Radius is how large the effect is.\n"
"Screen OffX and OffY offsets the center of the effect.\n"
"FadeTime is time until final state is reached.\n"
"Modifier multiplies all values.");
SetupTriggerPopup::addHelpButton((__int64)a1, 1.0);
v3 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v3);
}
v4 = (void *)(*(_QWORD *)&v72 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v72 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(*(_QWORD *)&v72 - 8LL);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(*(_QWORD *)&v72 - 8LL);
*(_DWORD *)(*(_QWORD *)&v72 - 8LL) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v4);
}
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v5);
cocos2d::CCPoint::CCPoint(&v69, v67 * 0.5, (float)(v68 * 0.5) + 90.0);
sub_D153B8((int)&v73, "TargetX:");
cocos2d::CCPoint::CCPoint(&v71, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createValueControl(a1, 0xB4u, 0.6, 0.0, 0.0, (__int64)&v73, &v72);
v6 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v6);
}
sub_D153B8((int)&v73, "TargetY:");
cocos2d::CCPoint::CCPoint(&v71, -100.0, -45.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createValueControl(a1, 0xBDu, 0.6, 0.0, 0.0, (__int64)&v73, &v72);
v7 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v73, "FadeTime:");
cocos2d::CCPoint::CCPoint(&v71, -100.0, -135.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createValueControl(a1, 0xAu, 0.6, 0.0, 0.0, (__int64)&v73, &v72);
v8 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v8);
}
sub_D153B8((int)&v73, "Use X");
cocos2d::CCPoint::CCPoint(&v71, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createToggleValueControl(a1, 190, 1.0, (__int64)&v73, &v72, 1, 0, 0);
v9 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v9);
}
sub_D153B8((int)&v73, "Use Y");
cocos2d::CCPoint::CCPoint(&v71, 0.0, -58.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createToggleValueControl(a1, 194, 1.0, (__int64)&v73, &v72, 1, 0, 0);
v10 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v10);
}
sub_D153B8((int)&v73, "Modifier:");
cocos2d::CCPoint::CCPoint(&v71, 100.0, -90.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
v74.x = 0.6;
v74.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0xB3u,
v74,
1.0,
v11,
v12,
(std::string)&v73,
&v72,
(InputValueType)0,
Float,
6,
0,
0,
0,
0,
3,
0);
v13 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v13);
}
sub_D153B8((int)&v73, "Radius:");
cocos2d::CCPoint::CCPoint(&v71, -100.0, -90.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
v75.x = 0.6;
v75.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x200u,
v75,
1.0,
v14,
v15,
(std::string)&v73,
&v72,
(InputValueType)0,
Float,
6,
0,
0,
0,
0,
3,
0);
v16 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v16);
}
cocos2d::CCPoint::CCPoint(
&v70,
20.0 - (float)((float)(a1->m_width * 0.5) - (float)(v67 * 0.5)),
(float)(20.0 - (float)((float)(a1->m_height * 0.5) - (float)(v68 * 0.5))) + 30.0);
sub_D153B8((int)&v72, "Target");
cocos2d::CCPoint::CCPoint(&v73, &v70);
SetupTriggerPopup::createToggleValueControl(a1, 188, 1.0, (__int64)&v72, &v73, 0, 0, 0);
v17 = (void *)(*(_QWORD *)&v72 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v72 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(*(_QWORD *)&v72 - 8LL);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *(_DWORD *)(*(_QWORD *)&v72 - 8LL);
*(_DWORD *)(*(_QWORD *)&v72 - 8LL) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v17);
}
sub_D153B8((int)&v73, "Relative");
cocos2d::CCPoint::CCPoint(
&v72,
(float)((float)((float)(a1->m_width * 0.5) + (float)(v67 * 0.5)) - 72.0) - 90.0,
20.0 - (float)((float)(a1->m_height * 0.5) - (float)(v68 * 0.5)));
SetupTriggerPopup::createToggleValueControl(a1, 514, 1.0, (__int64)&v73, &v72, 0, 0, 0);
v18 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v55 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v56 = __ldaxr(v55);
while ( __stlxr(v56 - 1, v55) );
}
else
{
v56 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v56 - 1;
}
if ( v56 <= 0 )
operator delete(v18);
}
sub_D153B8((int)&v73, "Screen\nOffX:");
cocos2d::CCPoint::CCPoint(&v71, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
v76.x = 0.6;
v76.y = -1.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x122u,
v76,
1.0,
v19,
v20,
(std::string)&v73,
&v72,
(InputValueType)0,
Float,
6,
0,
0,
101,
0,
2,
0);
v21 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v57 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v58 = __ldaxr(v57);
while ( __stlxr(v58 - 1, v57) );
}
else
{
v58 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v58 - 1;
}
if ( v58 <= 0 )
operator delete(v21);
}
sub_D153B8((int)&v73, "Screen\nOffY:");
cocos2d::CCPoint::CCPoint(&v71, 100.0, -45.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
v77.x = 0.6;
v77.y = -1.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x123u,
v77,
1.0,
v22,
v23,
(std::string)&v73,
&v72,
(InputValueType)0,
Float,
6,
0,
0,
101,
0,
2,
0);
v24 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v59 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v60 = __ldaxr(v59);
while ( __stlxr(v60 - 1, v59) );
}
else
{
v60 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v60 - 1;
}
if ( v60 <= 0 )
operator delete(v24);
}
sub_D153B8((int)&v73, "CenterID:");
cocos2d::CCPoint::CCPoint(&v71, 100.0, -10.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
v78.x = 0.6;
v78.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x33u,
v78,
1.0,
v25,
v26,
(std::string)&v73,
&v72,
Float,
Int,
6,
1u,
0,
100,
0,
2,
0);
v27 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v61 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v62 = __ldaxr(v61);
while ( __stlxr(v62 - 1, v61) );
}
else
{
v62 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v62 - 1;
}
if ( v62 <= 0 )
operator delete(v27);
}
sub_D153B8((int)&v73, "P1");
cocos2d::CCPoint::CCPoint(&v71, 60.0, -50.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createToggleValueControl(a1, 138, 1.0, (__int64)&v73, &v72, 0, 0, 100);
v28 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v63 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v64 = __ldaxr(v63);
while ( __stlxr(v64 - 1, v63) );
}
else
{
v64 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v64 - 1;
}
if ( v64 <= 0 )
operator delete(v28);
}
sub_D153B8((int)&v73, "P2");
cocos2d::CCPoint::CCPoint(&v71, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v72, &v69, &v71);
SetupTriggerPopup::createToggleValueControl(a1, 200, 1.0, (__int64)&v73, &v72, 0, 0, 100);
v29 = (void *)(*(_QWORD *)&v73 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v73 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v65 = (unsigned int *)(*(_QWORD *)&v73 - 8LL);
do
v66 = __ldaxr(v65);
while ( __stlxr(v66 - 1, v65) );
}
else
{
v66 = *(_DWORD *)(*(_QWORD *)&v73 - 8LL);
*(_DWORD *)(*(_QWORD *)&v73 - 8LL) = v66 - 1;
}
if ( v66 <= 0 )
operator delete(v29);
}
v30 = a1->getValue(a1, 188);
v31 = v30 != 0.0;
a1->toggleGroup(a1, 100, v30 != 0.0);
a1->toggleGroup(a1, 101, !v31);
cocos2d::CCPoint::CCPoint(&v72, 100.0, -135.0);
cocos2d::CCPoint::operator+(&v73, &v69, &v72);
v79.x = 0.8;
SetupTriggerPopup::createEasingControls(a1, v79, v32, (int)&v73, 0);
}