//
// SetupShaderEffectPopup::setupShockWave from 0x5522f4 to 0x552d32 (2622 bytes)
//
// 1 xrefs:
// > SetupShaderEffectPopup::init @ 0x5571d8
//
// 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::setupShockWave(SetupShaderEffectPopup *a1)
{
cocos2d::CCLabelBMFont *v2; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
int v4; // r9
cocos2d::CCDirector *v5; // r0
cocos2d::CCPoint v6; // r1
float v7; // s15
void (__fastcall *toggleGroup)(SetupShaderEffectPopup *__hidden, int, bool); // r5
float v9; // r0
void (__fastcall *v10)(SetupShaderEffectPopup *__hidden, int, bool); // r5
float v11; // r0
float v12; // s15
int v13; // [sp+4h] [bp-58h]
_BYTE v14[4]; // [sp+38h] [bp-24h] BYREF
cocos2d::CCSize v15; // [sp+3Ch] [bp-20h] BYREF
cocos2d::CCPoint v16; // [sp+44h] [bp-18h] BYREF
cocos2d::CCPoint v17; // [sp+4Ch] [bp-10h] BYREF
cocos2d::CCPoint v18; // [sp+54h] [bp-8h] BYREF
cocos2d::CCPoint v19; // [sp+5Ch] [bp+0h] BYREF
cocos2d::CCPoint v20; // [sp+64h] [bp+8h] BYREF
sub_776584((int)&v20, "Setup ShockWave");
v2 = SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v20);
setPosition = v2->setPosition;
v4 = (int)v2->getPosition(v2);
cocos2d::CCPoint::CCPoint(&v19, 0.0, 2.0);
cocos2d::CCPoint::operator+(&v20, v4, &v19);
setPosition(v2, &v20);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v2->setScale)(v2, 1053609165);
sub_776584((int)&v19, "ShockWave");
sub_776584(
(int)&v20,
"Speed defines how fast the shockwave effect happens.\n"
"Strength sets how distorted objects get within the waves.\n"
"Thickness is how big each wave is.\n"
"MaxSize modifies the maximum size of the wave.\n"
"TimeOff is offset in seconds before the effect begins.\n"
"Target lets you set a specific object to do the effect around.\n"
"Relative makes the effect follow screen movement.\n"
"Invert makes the effect go towards the center.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v19, (int)&v20, 1065353216);
sub_774008(&v20);
sub_774008(&v19);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v15, v5);
cocos2d::CCPoint::CCPoint(&v16, (float)(v15.width * 0.5) - 10.0, (float)(v15.height * 0.5) + 110.0);
sub_776584((int)&v18, "Speed:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
175,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "Strength:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
176,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "Thickness:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -25.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
180,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "WaveW:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -25.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
179,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "FadeIn:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -50.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
181,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "FadeOut:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -50.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
182,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "TimeOff:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -75.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
177,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xC1200000,
10.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "MaxSize:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -75.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
512,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
0,
1,
3,
1);
sub_774008(&v18);
cocos2d::CCPoint::CCPoint(&v17, (float)(v15.width * 0.5) - 35.0, v16.y - 100.0);
sub_776584((int)&v18, "Invert");
cocos2d::CCPoint::CCPoint(&v19, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 184, (int)&v18, &v20, 0, 0, 0, 0.8);
sub_774008(&v18);
sub_776584((int)&v18, "Target");
cocos2d::CCPoint::CCPoint(&v19, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 188, (int)&v18, &v20, 0, 0, 0, 0.8);
sub_774008(&v18);
sub_776584((int)&v18, "Relative");
cocos2d::CCPoint::CCPoint(&v19, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v17, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 514, (int)&v18, &v20, 0, 0, 0, 0.8);
sub_774008(&v18);
sub_776584((int)&v19, "Animate");
cocos2d::CCPoint::CCPoint(
&v20,
(float)((float)((float)(a1->m_width * 0.5) + (float)(v15.width * 0.5)) - 72.0) - 90.0,
(float)((float)(v15.height * 0.5) - (float)(a1->m_height * 0.5)) + 20.0);
SetupTriggerPopup::createToggleValueControl(a1, 513, (int)&v19, &v20, 0, 0, 0, 1.0);
sub_774008(&v19);
sub_776584((int)&v18, "Screen\nOffX:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -125.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
290,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
0,
101,
1,
3,
1);
sub_774008(&v18);
sub_776584((int)&v18, "Screen\nOffY:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -125.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
291,
(int)&v18,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
0,
101,
1,
3,
1);
sub_774008(&v18);
cocos2d::CCPoint::CCPoint(&v18, (float)(v15.width * 0.5) - 20.0, v16.y - 125.0);
sub_776584((int)v14, "CenterID");
cocos2d::CCPoint::CCPoint(&v19, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)v14,
&v20,
(cocos2d::CCZone *)0x3F19999A,
1,
Int,
6,
1,
nullptr,
1.0,
0,
100,
1,
2,
0);
sub_774008(v14);
sub_776584((int)v14, "P1");
cocos2d::CCPoint::CCPoint(&v19, 20.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 138, (int)v14, &v20, 0, 0, 100, 0.8);
sub_774008(v14);
sub_776584((int)v14, "P2");
cocos2d::CCPoint::CCPoint(&v19, 80.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 200, (int)v14, &v20, 0, 0, 100, 0.8);
sub_774008(v14);
sub_776584((int)v14, "Follow");
cocos2d::CCPoint::CCPoint(&v19, 140.0, 0.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createToggleValueControl(a1, 190, (int)v14, &v20, 0, 0, 100, 0.8);
sub_774008(v14);
sub_776584((int)v14, "Inner:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -150.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
183,
(int)v14,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
102,
1,
3,
1);
sub_774008(v14);
sub_776584((int)v14, "Outer:");
cocos2d::CCPoint::CCPoint(&v19, 100.0, -150.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
191,
(int)v14,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
5.0,
0,
102,
1,
3,
1);
sub_774008(v14);
sub_776584((int)v14, "FadeTime:");
cocos2d::CCPoint::CCPoint(&v19, -100.0, -185.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
10,
(int)v14,
&v20,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
0,
103,
1,
2,
0);
sub_774008(v14);
cocos2d::CCPoint::CCPoint(&v19, 100.0, -170.0);
cocos2d::CCPoint::operator+(&v20, &v16, &v19);
v6.y = 0.65;
LODWORD(v6.x) = &v20;
SetupTriggerPopup::createEasingControls(a1, v6, 0.0, 103, v13);
v7 = COERCE_FLOAT(((int (__fastcall *)(SetupShaderEffectPopup *, int))a1->getValue)(a1, 188));
a1->toggleGroup(a1, 100, v7 != 0.0);
a1->toggleGroup(a1, 101, v7 == 0.0);
toggleGroup = a1->toggleGroup;
v9 = COERCE_FLOAT(((int (__fastcall *)(SetupShaderEffectPopup *, int))a1->getValue)(a1, 184));
toggleGroup(a1, 102, v9 != 0.0);
v10 = a1->toggleGroup;
v11 = COERCE_FLOAT(((int (__fastcall *)(SetupShaderEffectPopup *, int))a1->getValue)(a1, 513));
v10(a1, 103, v11 != 0.0);
v12 = COERCE_FLOAT(((int (__fastcall *)(SetupShaderEffectPopup *, int))a1->getValue)(a1, 513));
SetupTriggerPopup::toggleDisableButtons(a1, v12 != 0.0);
}