//
// SetupShaderEffectPopup::setupPinch from 0x555b40 to 0x55617c (1596 bytes)
//
// 1 xrefs:
// > SetupShaderEffectPopup::init @ 0x557228
//
// 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)
{
cocos2d::CCDirector *v2; // r0
float v3; // s16
float v4; // s15
cocos2d::CCPoint v5; // r1
cocos2d::CCFloat *v6; // [sp+4h] [bp-68h]
_BYTE v7[4]; // [sp+38h] [bp-34h] BYREF
cocos2d::CCSize v8; // [sp+3Ch] [bp-30h] BYREF
cocos2d::CCPoint v9; // [sp+44h] [bp-28h] BYREF
cocos2d::CCPoint v10; // [sp+4Ch] [bp-20h] BYREF
cocos2d::CCPoint v11; // [sp+54h] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+5Ch] [bp-10h] BYREF
sub_776584((int)&v12, "Setup Pinch");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v12);
sub_776584((int)&v11, "Help");
sub_776584(
(int)&v12,
"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((int)a1, (int)&v11, (int)&v12, 1065353216);
sub_774008(&v12);
sub_774008(&v11);
v2 = cocos2d::CCDirector::sharedDirector();
v3 = 0.5;
cocos2d::CCDirector::getWinSize(&v8, v2);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, (float)(v8.height * 0.5) + 90.0);
sub_776584((int)&v10, "TargetX:");
cocos2d::CCPoint::CCPoint(&v11, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
180,
(int)&v10,
&v12,
(cocos2d::CCZone *)0x3F19999A,
nullptr,
0.0);
sub_774008(&v10);
sub_776584((int)&v10, "TargetY:");
cocos2d::CCPoint::CCPoint(&v11, -100.0, -45.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
189,
(int)&v10,
&v12,
(cocos2d::CCZone *)0x3F19999A,
nullptr,
0.0);
sub_774008(&v10);
sub_776584((int)&v10, "FadeTime:");
cocos2d::CCPoint::CCPoint(&v11, -100.0, -135.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
10,
(int)&v10,
&v12,
(cocos2d::CCZone *)0x3F19999A,
nullptr,
0.0);
sub_774008(&v10);
sub_776584((int)&v10, "Use X");
cocos2d::CCPoint::CCPoint(&v11, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 190, (int)&v10, &v12, 1, 0, 0, 1.0);
sub_774008(&v10);
sub_776584((int)&v10, "Use Y");
cocos2d::CCPoint::CCPoint(&v11, 0.0, -58.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 194, (int)&v10, &v12, 1, 0, 0, 1.0);
sub_774008(&v10);
sub_776584((int)&v10, "Modifier:");
cocos2d::CCPoint::CCPoint(&v11, 100.0, -90.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
179,
(int)&v10,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
0,
3,
0);
sub_774008(&v10);
sub_776584((int)&v10, "Radius:");
cocos2d::CCPoint::CCPoint(&v11, -100.0, -90.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
512,
(int)&v10,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
0,
3,
0);
sub_774008(&v10);
cocos2d::CCPoint::CCPoint(
&v10,
(float)((float)(v8.width * 0.5) - (float)(a1->m_width * 0.5)) + 20.0,
(float)((float)((float)(v8.height * v3) - (float)(a1->m_height * v3)) + 20.0) + 30.0);
sub_776584((int)&v11, "Target");
cocos2d::CCPoint::CCPoint(&v12, &v10);
SetupTriggerPopup::createToggleValueControl(a1, 188, (int)&v11, &v12, 0, 0, 0, 1.0);
sub_774008(&v11);
sub_776584((int)&v11, "Relative");
cocos2d::CCPoint::CCPoint(
&v12,
(float)((float)((float)(a1->m_width * v3) + (float)(v8.width * v3)) - 72.0) - 90.0,
(float)((float)(v8.height * v3) - (float)(a1->m_height * v3)) + 20.0);
SetupTriggerPopup::createToggleValueControl(a1, 514, (int)&v11, &v12, 0, 0, 0, 1.0);
sub_774008(&v11);
sub_776584((int)v7, "Screen\nOffX:");
cocos2d::CCPoint::CCPoint(&v11, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
290,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
0,
101,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Screen\nOffY:");
cocos2d::CCPoint::CCPoint(&v11, 100.0, -45.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
291,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
0,
101,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "CenterID:");
cocos2d::CCPoint::CCPoint(&v11, 100.0, -10.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
1,
Int,
6,
1,
nullptr,
1.0,
0,
100,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "P1");
cocos2d::CCPoint::CCPoint(&v11, 60.0, -50.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 138, (int)v7, &v12, 0, 0, 100, 1.0);
sub_774008(v7);
sub_776584((int)v7, "P2");
cocos2d::CCPoint::CCPoint(&v11, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 200, (int)v7, &v12, 0, 0, 100, 1.0);
sub_774008(v7);
v4 = COERCE_FLOAT(((int (__fastcall *)(SetupShaderEffectPopup *, int))a1->getValue)(a1, 188));
a1->toggleGroup(a1, 100, v4 != 0.0);
a1->toggleGroup(a1, 101, v4 == 0.0);
cocos2d::CCPoint::CCPoint(&v11, 100.0, -135.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
v5.y = 0.8;
LODWORD(v5.x) = &v12;
SetupTriggerPopup::createEasingControls(a1, v5, 0.0, 0, (int)v6);
}