//
// SetupShaderEffectPopup::setupBulge from 0x1404511a0 to 0x140451a6c (2252 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0x14044a3fc
// > ??> @ 0x1406da7e4
//
// 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
//
// Hidden C++ exception states: #wind=3
void SetupShaderEffectPopup::setupBulge(SetupShaderEffectPopup *a1)
{
_QWORD *v2; // r9
_QWORD *v3; // rcx
const char *v4; // rdx
__int64 v5; // r8
double v6; // xmm0_8
__int64 v7; // rcx
cocos2d::CCDirector *v8; // rax
double ValueControl; // xmm0_8
int v10; // eax
int v11; // eax
bool v12; // di
float v13; // xmm0_4
int v14; // r9d
__int64 v15; // [rsp+80h] [rbp-88h]
__int64 v16; // [rsp+80h] [rbp-88h]
__int128 v17; // [rsp+98h] [rbp-70h] BYREF
__int64 v18; // [rsp+A8h] [rbp-60h]
__int64 v19; // [rsp+B0h] [rbp-58h]
__int128 v20; // [rsp+B8h] [rbp-50h] BYREF
__int64 v21; // [rsp+C8h] [rbp-40h]
__int64 v22; // [rsp+D0h] [rbp-38h]
char v23; // [rsp+160h] [rbp+58h] BYREF
float v24; // [rsp+168h] [rbp+60h]
__int128 *v25; // [rsp+170h] [rbp+68h] BYREF
v18 = 11;
v19 = 15;
*(_QWORD *)&v17 = 0x7542207075746553LL;
*((_QWORD *)&v17 + 1) = 6645612;
SetupTriggerPopup::addTitle(a1, &v17);
v25 = &v17;
v17 = 0;
v18 = 0;
v19 = 15;
v2 = sub_14003AA10(0x130u);
*(_QWORD *)&v17 = v2;
v18 = 303;
v19 = 303;
v3 = v2;
v4 = "Bulges the screen.\n"
"Bulge defines how strong the effect is.\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"
"Target lets you set a specific target object as the center.";
v5 = 2;
do
{
*(_OWORD *)v3 = *(_OWORD *)v4;
*((_OWORD *)v3 + 1) = *((_OWORD *)v4 + 1);
*((_OWORD *)v3 + 2) = *((_OWORD *)v4 + 2);
*((_OWORD *)v3 + 3) = *((_OWORD *)v4 + 3);
*((_OWORD *)v3 + 4) = *((_OWORD *)v4 + 4);
*((_OWORD *)v3 + 5) = *((_OWORD *)v4 + 5);
*((_OWORD *)v3 + 6) = *((_OWORD *)v4 + 6);
v3 += 16;
*((_OWORD *)v3 - 1) = *((_OWORD *)v4 + 7);
v4 += 128;
--v5;
}
while ( v5 );
*(_OWORD *)v3 = *(_OWORD *)v4;
*((_OWORD *)v3 + 1) = *((_OWORD *)v4 + 1);
v3[4] = *((_QWORD *)v4 + 4);
*((_DWORD *)v3 + 10) = *((_DWORD *)v4 + 10);
*((_WORD *)v3 + 22) = *((_WORD *)v4 + 22);
*((_BYTE *)v3 + 46) = v4[46];
*((_BYTE *)v2 + 303) = 0;
v20 = 0;
v21 = 4;
v22 = 15;
strcpy((char *)&v20, "Help");
v6 = SetupTriggerPopup::addHelpButton(a1, &v20, &v17);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8);
cocos2d::CCPoint::CCPoint(*(float *)&v6, v24 * 0.5);
v17 = 0;
v18 = 6;
v19 = 15;
strcpy((char *)&v17, "Bulge:");
cocos2d::CCPoint::CCPoint(0.0, -100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
ValueControl = SetupTriggerPopup::createValueControl(
(_DWORD)a1,
176,
(unsigned int)&v17,
(unsigned int)&v25,
1060320051,
0,
1065353216);
v18 = 7;
v19 = 15;
v17 = 0x3A737569646152uLL;
cocos2d::CCPoint::CCPoint(*(float *)&ValueControl, -100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createValueControl(
(_DWORD)a1,
180,
(unsigned int)&v17,
(unsigned int)&v25,
1060320051,
0,
1065353216);
*((_QWORD *)&v17 + 1) = 58;
v18 = 9;
v19 = 15;
*(_QWORD *)&v17 = 0x656D695465646146LL;
cocos2d::CCPoint::CCPoint(6.7405871e22, -100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createValueControl((_DWORD)a1, 10, (unsigned int)&v17, (unsigned int)&v25, 1060320051, 0, 0);
v25 = &v20;
v21 = 8;
v22 = 15;
v20 = 0x65766974616C6552uLL;
cocos2d::CCPoint::CCPoint(v24 * 0.5, (float)((float)((float)(a1->m_width * 0.5) + (float)(v24 * 0.5)) - 72.0) - 90.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 514, (unsigned int)&v20, v10, 0, 0, 0, 1065353216);
v25 = &v17;
v17 = 0;
v18 = 6;
v19 = 15;
strcpy((char *)&v17, "Target");
cocos2d::CCPoint::CCPoint(0.0, (float)(v24 * 0.5) - 140.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 188, (unsigned int)&v17, v11, 0, 0, 0, 1065353216);
v18 = 12;
v19 = 15;
strcpy((char *)&v17, "Screen\nOffX:");
BYTE13(v17) = 0;
HIWORD(v17) = 0;
cocos2d::CCPoint::CCPoint(7.1540306e22, 100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
290,
(unsigned int)&v17,
(unsigned int)&v25,
1060320051,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
0,
2,
0,
&v17,
&v17);
v18 = 12;
v19 = 15;
strcpy((char *)&v17, "Screen\nOffY:");
BYTE13(v17) = 0;
HIWORD(v17) = 0;
cocos2d::CCPoint::CCPoint(7.1540306e22, 100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
LOBYTE(v15) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
291,
(unsigned int)&v17,
(unsigned int)&v25,
1060320051,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
101,
0,
2,
v15);
*((_QWORD *)&v17 + 1) = 58;
v18 = 9;
v19 = 15;
*(_QWORD *)&v17 = 0x44497265746E6543LL;
cocos2d::CCPoint::CCPoint(7.5550567e31, 100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
LOBYTE(v16) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v17,
(unsigned int)&v25,
1060320051,
1,
2,
6,
1,
0,
1065353216,
0,
100,
0,
2,
v16);
v20 = 0;
v21 = 2;
v22 = 15;
strcpy((char *)&v20, "P1");
cocos2d::CCPoint::CCPoint(0.0, 60.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
138,
(unsigned int)&v20,
(unsigned int)&v25,
0,
0,
100,
1065353216);
v20 = 0;
v21 = 2;
v22 = 15;
strcpy((char *)&v20, "P2");
cocos2d::CCPoint::CCPoint(0.0, 130.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
200,
(unsigned int)&v20,
(unsigned int)&v25,
0,
0,
100,
1065353216);
v12 = a1->getValue(a1, 188) != 0.0;
a1->toggleGroup(a1, 100, v12);
v13 = ((float (__fastcall *)(SetupShaderEffectPopup *, __int64, bool))a1->toggleGroup)(a1, 101, !v12);
cocos2d::CCPoint::CCPoint(v13, 100.0);
cocos2d::CCPoint::operator+(&v23, &v25);
SetupTriggerPopup::createEasingControls(a1, (cocos2d::CCPoint)&v25, 0.80000001, v14, 0);
}