//
// SetupShaderEffectPopup::setupPinch from 0xb37e10 to 0xb38830 (2592 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0xb3abf8
// > ??> @ 0xa3fa8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:01:47 +0000
//
__int64 __fastcall SetupShaderEffectPopup::setupPinch(cocos2d::CCArray **this)
{
cocos2d::CCDirector *v2; // x0
cocos2d::CCDirector *v3; // x0
float v4; // s0
_BOOL4 v5; // w19
int v7; // [xsp+8h] [xbp-28h]
__int64 v8; // [xsp+B0h] [xbp+80h] BYREF
_BYTE v9[8]; // [xsp+B8h] [xbp+88h] BYREF
_BYTE v10[8]; // [xsp+C0h] [xbp+90h] BYREF
_BYTE v11[8]; // [xsp+C8h] [xbp+98h] BYREF
__int64 v12; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCDirector *v13[2]; // [xsp+D8h] [xbp+A8h] BYREF
void *v14; // [xsp+E8h] [xbp+B8h]
__int64 v15; // [xsp+F0h] [xbp+C0h] BYREF
__int64 v16; // [xsp+F8h] [xbp+C8h]
void *v17; // [xsp+100h] [xbp+D0h]
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Setup Pinch", 0xBu);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v15);
if ( (v15 & 1) != 0 )
operator delete(v17);
v13[0] = nullptr;
v13[1] = nullptr;
v14 = nullptr;
std::string::__init((__int64 *)v13, "Help", 4u);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(
&v15,
"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.",
0x129u);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v13, (char *)&v15, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v2 = (cocos2d::CCDirector *)LOBYTE(v13[0]);
if ( ((__int64)v13[0] & 1) != 0 )
operator delete(v14);
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(&v8, v3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v9, *(float *)&v8 * 0.5, (float)(*((float *)&v8 + 1) * 0.5) + 90.0);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "TargetX:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControl(this, 180, (char *)&v15, (cocos2d::CCPoint *)&v12, 0.6, 0.0, 0.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "TargetY:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, -100.0, -45.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControl(this, 189, (char *)&v15, (cocos2d::CCPoint *)&v12, 0.6, 0.0, 0.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "FadeTime:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, -100.0, -135.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControl(this, 10, (char *)&v15, (cocos2d::CCPoint *)&v12, 0.6, 0.0, 0.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Use X", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createToggleValueControl((__int64)this, 0xBEu, &v15, (const cocos2d::CCPoint *)&v12, 1, 0, 0, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Use Y", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 0.0, -58.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createToggleValueControl((__int64)this, 0xC2u, &v15, (const cocos2d::CCPoint *)&v12, 1, 0, 0, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Modifier:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 100.0, -90.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControlAdvanced(
this,
179,
(char *)&v15,
(__int64)&v12,
0,
1,
6,
0,
0.6,
0.0,
1.0,
0,
0,
0,
3,
0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Radius:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, -100.0, -90.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControlAdvanced(
this,
512,
(char *)&v15,
(__int64)&v12,
0,
1,
6,
0,
0.6,
0.0,
1.0,
0,
0,
0,
3,
0);
if ( (v15 & 1) != 0 )
operator delete(v17);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v10,
20.0 - (float)((float)(*((float *)this + 183) * 0.5) - (float)(*(float *)&v8 * 0.5)),
(float)(20.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v8 + 1) * 0.5))) + 30.0);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Target", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, (const cocos2d::CCPoint *)v10);
SetupTriggerPopup::createToggleValueControl((__int64)this, 0xBCu, &v15, (const cocos2d::CCPoint *)&v12, 0, 0, 0, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Relative", 8u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v12,
(float)((float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v8 * 0.5)) - 72.0) - 90.0,
20.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v8 + 1) * 0.5)));
SetupTriggerPopup::createToggleValueControl((__int64)this, 0x202u, &v15, (const cocos2d::CCPoint *)&v12, 0, 0, 0, 1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Screen\nOffX:", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControlAdvanced(
this,
290,
(char *)&v15,
(__int64)&v12,
0,
1,
6,
0,
0.6,
-1.0,
1.0,
0,
101,
0,
2,
0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "Screen\nOffY:", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 100.0, -45.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createValueControlAdvanced(
this,
291,
(char *)&v15,
(__int64)&v12,
0,
1,
6,
0,
0.6,
-1.0,
1.0,
0,
101,
0,
2,
0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "CenterID:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 100.0, -10.0);
cocos2d::CCPoint::operator+(&v12, v9);
LOBYTE(v7) = 0;
IDNameInput::create(this, this + 68, 1, 51, &v15, &v12, 6, 100, 0.6, 0, v7);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "P1", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 60.0, -50.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x8Au,
&v15,
(const cocos2d::CCPoint *)&v12,
0,
0,
100,
1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v15 = 0;
v16 = 0;
v17 = nullptr;
std::string::__init(&v15, "P2", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0xC8u,
&v15,
(const cocos2d::CCPoint *)&v12,
0,
0,
100,
1.0);
if ( (v15 & 1) != 0 )
operator delete(v17);
v4 = (*((float (__fastcall **)(cocos2d::CCArray **, __int64))*this + 183))(this, 188);
v5 = v4 != 0.0;
(*((void (__fastcall **)(cocos2d::CCArray **, __int64, bool))*this + 169))(this, 100, v4 != 0.0);
(*((void (__fastcall **)(cocos2d::CCArray **, __int64, bool))*this + 169))(this, 101, !v5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 100.0, -135.0);
cocos2d::CCPoint::operator+(&v12, v9);
SetupTriggerPopup::createEasingControls((__int64)this, (__int64)&v12, 0, 0, 0.8);
return _stack_chk_guard;
}