//
// SetupShaderEffectPopup::setupMotionBlur from 0xa033dc to 0xa0427c (3744 bytes)
//
// 2 xrefs:
// > SetupShaderEffectPopup::init @ 0xa0867c
// > ??> @ 0xb49c0
//
// 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::setupMotionBlur(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
void *v11; // x0
void *v12; // x0
float v13; // s3
float v14; // s4
void *v15; // x0
void *v16; // x0
void *v17; // x0
float v18; // s3
float v19; // s4
void *v20; // x0
void *v21; // x0
void *v22; // x0
void *v23; // x0
void *v24; // x0
void *v25; // x0
float v26; // s2
unsigned int *v27; // x1
int v28; // w2
unsigned int *v29; // x1
int v30; // w2
unsigned int *v31; // x1
int v32; // w2
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; // x21
int v64; // w1
float v65; // [xsp+B0h] [xbp+80h]
float v66; // [xsp+B4h] [xbp+84h]
cocos2d::CCPoint v67; // [xsp+B8h] [xbp+88h] BYREF
cocos2d::CCPoint v68; // [xsp+C0h] [xbp+90h] BYREF
cocos2d::CCPoint v69; // [xsp+C8h] [xbp+98h] BYREF
__int64 v70; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCPoint v71; // 0:s0.4,4:s1.4
cocos2d::CCPoint v72; // 0:s0.4,4:s1.4
cocos2d::CCPoint v73; // 0:s0.4,4:s1.4
sub_D153B8((int)&v70, "Setup Motion Blur");
SetupTriggerPopup::addTitle((__int64)a1);
v2 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v27 = (unsigned int *)(v70 - 8);
do
v28 = __ldaxr(v27);
while ( __stlxr(v28 - 1, v27) );
}
else
{
v28 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v28 - 1;
}
if ( v28 <= 0 )
operator delete(v2);
}
sub_D153B8((int)&v69, "Help");
sub_D153B8(
(int)&v70,
"Applies motion blur.\n"
"TargetX and TargetY is how much blur to apply to each axis.\n"
"FadeTime is time until final state is reached.\n"
"Fade sets how much blur fades out at the edges.\n"
"DualDir blurs in both directions instead of the default.\n"
"Target lets you set a specific target object as the reference.\n"
"You can also reference the player using P1 and P2 or the center of the screen using C.");
SetupTriggerPopup::addHelpButton((__int64)a1, 1.0);
v3 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v29 = (unsigned int *)(v70 - 8);
do
v30 = __ldaxr(v29);
while ( __stlxr(v30 - 1, v29) );
}
else
{
v30 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v30 - 1;
}
if ( v30 <= 0 )
operator delete(v3);
}
v4 = (void *)(*(_QWORD *)&v69 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v69 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v31 = (unsigned int *)(*(_QWORD *)&v69 - 8LL);
do
v32 = __ldaxr(v31);
while ( __stlxr(v32 - 1, v31) );
}
else
{
v32 = *(_DWORD *)(*(_QWORD *)&v69 - 8LL);
*(_DWORD *)(*(_QWORD *)&v69 - 8LL) = v32 - 1;
}
if ( v32 <= 0 )
operator delete(v4);
}
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v5);
cocos2d::CCPoint::CCPoint(&v67, v65 * 0.5, (float)(v66 * 0.5) + 95.0);
sub_D153B8((int)&v70, "TargetX:");
cocos2d::CCPoint::CCPoint(&v68, -130.0, 0.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xB4u, 0.6, 0.0, 0.0, (__int64)&v70, &v69);
v6 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v33 = (unsigned int *)(v70 - 8);
do
v34 = __ldaxr(v33);
while ( __stlxr(v34 - 1, v33) );
}
else
{
v34 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v34 - 1;
}
if ( v34 <= 0 )
operator delete(v6);
}
sub_D153B8((int)&v70, "TargetY:");
cocos2d::CCPoint::CCPoint(&v68, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xBDu, 0.6, 0.0, 0.0, (__int64)&v70, &v69);
v7 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(v70 - 8);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v70, "FadeTime:");
cocos2d::CCPoint::CCPoint(&v68, -130.0, -50.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xAu, 0.6, 0.0, 0.0, (__int64)&v70, &v69);
v8 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v70 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v8);
}
sub_D153B8((int)&v70, "Use\nX");
cocos2d::CCPoint::CCPoint(&v68, -45.0, -105.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 188, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v9 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(v70 - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v9);
}
sub_D153B8((int)&v70, "Use\nY");
cocos2d::CCPoint::CCPoint(&v68, 20.0, -105.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 190, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v10 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(v70 - 8);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v10);
}
sub_D153B8((int)&v70, "Intensity:");
cocos2d::CCPoint::CCPoint(&v68, -130.0, -100.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xB0u, 0.6, 0.0, 5.0, (__int64)&v70, &v69);
v11 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(v70 - 8);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v11);
}
sub_D153B8((int)&v70, "Fade:");
cocos2d::CCPoint::CCPoint(&v68, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xB5u, 0.6, 0.0, 1.0, (__int64)&v70, &v69);
v12 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(v70 - 8);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v12);
}
sub_D153B8((int)&v70, "Ref\nChannel:");
cocos2d::CCPoint::CCPoint(&v68, 130.0, 0.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
v71.y = 0.0;
v71.x = 0.6;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x47u,
v71,
0.0,
v13,
v14,
(std::string)&v70,
&v69,
Float,
Int,
6,
0,
0,
0,
0,
2,
0);
v15 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(v70 - 8);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v15);
}
sub_D153B8((int)&v70, "Follow\nEase:");
cocos2d::CCPoint::CCPoint(&v68, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createValueControl(a1, 0xBFu, 0.6, 0.0, 10.0, (__int64)&v70, &v69);
v16 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(v70 - 8);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v16);
}
sub_D153B8((int)&v70, "Relative");
cocos2d::CCPoint::CCPoint(
&v69,
(float)((float)((float)(a1->m_width * 0.5) + (float)(v65 * 0.5)) - 72.0) - 90.0,
20.0 - (float)((float)(a1->m_height * 0.5) - (float)(v66 * 0.5)));
SetupTriggerPopup::createToggleValueControl(a1, 514, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v17 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(v70 - 8);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v17);
}
sub_D153B8((int)&v70, "TargetID:");
cocos2d::CCPoint::CCPoint(&v68, 130.0, -115.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
v72.x = 0.6;
v72.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x33u,
v72,
1.0,
v18,
v19,
(std::string)&v70,
&v69,
Float,
Int,
6,
1u,
0,
0,
0,
2,
0);
v20 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(v70 - 8);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v20);
}
sub_D153B8((int)&v70, "P1");
cocos2d::CCPoint::CCPoint(&v68, 100.0, -150.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 138, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v21 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v55 = (unsigned int *)(v70 - 8);
do
v56 = __ldaxr(v55);
while ( __stlxr(v56 - 1, v55) );
}
else
{
v56 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v56 - 1;
}
if ( v56 <= 0 )
operator delete(v21);
}
sub_D153B8((int)&v70, "P2");
cocos2d::CCPoint::CCPoint(&v68, 160.0, -150.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 200, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v22 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v57 = (unsigned int *)(v70 - 8);
do
v58 = __ldaxr(v57);
while ( __stlxr(v58 - 1, v57) );
}
else
{
v58 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v58 - 1;
}
if ( v58 <= 0 )
operator delete(v22);
}
sub_D153B8((int)&v70, "C");
cocos2d::CCPoint::CCPoint(&v68, 130.0, -180.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 201, 1.0, (__int64)&v70, &v69, 0, 0, 0);
v23 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v59 = (unsigned int *)(v70 - 8);
do
v60 = __ldaxr(v59);
while ( __stlxr(v60 - 1, v59) );
}
else
{
v60 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v60 - 1;
}
if ( v60 <= 0 )
operator delete(v23);
}
sub_D153B8((int)&v70, "DualDir");
cocos2d::CCPoint::CCPoint(&v68, 0.0, -140.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 194, 0.9, (__int64)&v70, &v69, 0, 0, 0);
v24 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v61 = (unsigned int *)(v70 - 8);
do
v62 = __ldaxr(v61);
while ( __stlxr(v62 - 1, v61) );
}
else
{
v62 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v62 - 1;
}
if ( v62 <= 0 )
operator delete(v24);
}
sub_D153B8((int)&v70, "EmptyOnly");
cocos2d::CCPoint::CCPoint(&v68, 0.0, -170.0);
cocos2d::CCPoint::operator+(&v69, &v67, &v68);
SetupTriggerPopup::createToggleValueControl(a1, 515, 0.9, (__int64)&v70, &v69, 0, 0, 0);
v25 = (void *)(v70 - 24);
if ( (__int64 *)(v70 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v63 = (unsigned int *)(v70 - 8);
do
v64 = __ldaxr(v63);
while ( __stlxr(v64 - 1, v63) );
}
else
{
v64 = *(_DWORD *)(v70 - 8);
*(_DWORD *)(v70 - 8) = v64 - 1;
}
if ( v64 <= 0 )
operator delete(v25);
}
cocos2d::CCPoint::CCPoint(&v69, -110.0, -143.0);
cocos2d::CCPoint::operator+(&v70, &v67, &v69);
v73.x = 0.7;
SetupTriggerPopup::createEasingControls(a1, v73, v26, (int)&v70, 0);
}