//
// SetupDashRingPopup::init from 0xa531a0 to 0xa53a28 (2184 bytes)
//
// 2 xrefs:
// > SetupDashRingPopup::create @ 0xa53bd4
// > ??> @ 0xa44f0
//
// 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
//
bool SetupDashRingPopup::init(SetupDashRingPopup *a1, DashRingObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w26
cocos2d::CCPoint *p_m_textOffset; // x0
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCPoint *v12; // x0
cocos2d::CCPoint *v13; // x0
void *v14; // x0
cocos2d::CCDirector *v15; // x0
float v16; // s3
float v17; // s4
cocos2d::CCPoint *v18; // x0
float v19; // s3
float v20; // s4
cocos2d::CCPoint *v21; // x0
float v22; // s3
float v23; // s4
cocos2d::CCPoint *v24; // x0
cocos2d::CCPoint *v25; // x0
cocos2d::CCPoint *v26; // x0
cocos2d::CCPoint *v27; // x19
unsigned int *p_m_caption; // x1
int m_data; // w2
unsigned int *v30; // x1
int v31; // w2
unsigned int *v32; // x1
int v33; // w2
unsigned int *v34; // x1
int v35; // w2
unsigned int *v36; // x1
int v37; // w2
unsigned int *v38; // x1
int v39; // w2
unsigned int *v40; // x1
int v41; // w2
unsigned int *v42; // x1
int v43; // w2
unsigned int *v44; // x1
int v45; // w2
unsigned int *v46; // x22
int v47; // w0
_QWORD v48[2]; // [xsp+30h] [xbp+0h] BYREF
float v49; // [xsp+B0h] [xbp+80h]
float v50; // [xsp+B4h] [xbp+84h]
cocos2d::CCPoint v51; // [xsp+B8h] [xbp+88h] BYREF
cocos2d::CCPoint v52; // [xsp+C0h] [xbp+90h] BYREF
cocos2d::CCPoint v53; // [xsp+C8h] [xbp+98h] BYREF
ButtonSprite *v54; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCPoint v55; // 0:s0.4,4:s1.4
cocos2d::CCPoint v56; // 0:s0.4,4:s1.4
cocos2d::CCPoint v57; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 320.0, 240.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_D153B8((unsigned int)v48 + 160, "Dash Orb");
SetupTriggerPopup::addTitle((__int64)a1);
p_m_textOffset = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
p_m_caption = (unsigned int *)&v54[-1].m_caption;
do
m_data = __ldaxr(p_m_caption);
while ( __stlxr(m_data - 1, p_m_caption) );
}
else
{
m_data = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = m_data - 1;
}
if ( m_data <= 0 )
operator delete(p_m_textOffset);
}
sub_D153B8((unsigned int)v48 + 160, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, &v54, v7, v8, v9, v10, v11);
v12 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v30 = (unsigned int *)&v54[-1].m_caption;
do
v31 = __ldaxr(v30);
while ( __stlxr(v31 - 1, v30) );
}
else
{
v31 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v31 - 1;
}
if ( v31 <= 0 )
operator delete(v12);
}
sub_D153B8((int)&v53, "Help");
sub_D153B8(
(int)&v54,
"Speed changes the speed of the dash.\n"
"End Boost is the force applied when the dash stops.\n"
"Max Duration will end the dash automatically after this time.\n"
"Allow Collide makes the dash not end on collision.\n"
"Stop Slide will limit the end momentum.");
SetupTriggerPopup::addHelpButton((__int64)a1, 1.0);
v13 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v32 = (unsigned int *)&v54[-1].m_caption;
do
v33 = __ldaxr(v32);
while ( __stlxr(v33 - 1, v32) );
}
else
{
v33 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v33 - 1;
}
if ( v33 <= 0 )
operator delete(v13);
}
v14 = (void *)(*(_QWORD *)&v53 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v53 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v40 = (unsigned int *)(*(_QWORD *)&v53 - 8LL);
do
v41 = __ldaxr(v40);
while ( __stlxr(v41 - 1, v40) );
}
else
{
v41 = *(_DWORD *)(*(_QWORD *)&v53 - 8LL);
*(_DWORD *)(*(_QWORD *)&v53 - 8LL) = v41 - 1;
}
if ( v41 <= 0 )
operator delete(v14);
}
v15 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v15);
cocos2d::CCPoint::CCPoint(&v51, v49 * 0.5, (float)(v50 * 0.5) + 70.0);
sub_D153B8((int)&v54, "Speed");
cocos2d::CCPoint::CCPoint(&v52, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v53, &v51, &v52);
v55.y = 0.0;
v55.x = 0.8;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x24Au,
v55,
2.0,
v16,
v17,
(std::string)&v54,
&v53,
(InputValueType)0,
Float,
6,
0,
0,
0,
1,
2,
0);
v18 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v36 = (unsigned int *)&v54[-1].m_caption;
do
v37 = __ldaxr(v36);
while ( __stlxr(v37 - 1, v36) );
}
else
{
v37 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v37 - 1;
}
if ( v37 <= 0 )
operator delete(v18);
}
sub_D153B8((int)&v54, "End Boost");
cocos2d::CCPoint::CCPoint(&v52, 0.0, -40.0);
cocos2d::CCPoint::operator+(&v53, &v51, &v52);
v56.x = 0.8;
v56.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x24Cu,
v56,
2.0,
v19,
v20,
(std::string)&v54,
&v53,
(InputValueType)0,
Float,
6,
0,
0,
0,
1,
2,
0);
v21 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v44 = (unsigned int *)&v54[-1].m_caption;
do
v45 = __ldaxr(v44);
while ( __stlxr(v45 - 1, v44) );
}
else
{
v45 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v45 - 1;
}
if ( v45 <= 0 )
operator delete(v21);
}
sub_D153B8((int)&v54, "Max Duration");
cocos2d::CCPoint::CCPoint(&v52, 0.0, -80.0);
cocos2d::CCPoint::operator+(&v53, &v51, &v52);
v57.x = 0.8;
v57.y = 0.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
0x24Eu,
v57,
2.0,
v22,
v23,
(std::string)&v54,
&v53,
(InputValueType)0,
Float,
6,
0,
0,
0,
1,
2,
0);
v24 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v34 = (unsigned int *)&v54[-1].m_caption;
do
v35 = __ldaxr(v34);
while ( __stlxr(v35 - 1, v34) );
}
else
{
v35 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v35 - 1;
}
if ( v35 <= 0 )
operator delete(v24);
}
sub_D153B8((int)&v54, "Allow\nCollide");
cocos2d::CCPoint::CCPoint(&v52, -80.0, -120.0);
cocos2d::CCPoint::operator+(&v53, &v51, &v52);
SetupTriggerPopup::createToggleValueControl(a1, 587, 1.0, (__int64)&v54, &v53, 0, 0, 0);
v25 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v42 = (unsigned int *)&v54[-1].m_caption;
do
v43 = __ldaxr(v42);
while ( __stlxr(v43 - 1, v42) );
}
else
{
v43 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v43 - 1;
}
if ( v43 <= 0 )
operator delete(v25);
}
sub_D153B8((int)&v54, "Stop\nSlide");
cocos2d::CCPoint::CCPoint(&v52, 20.0, -120.0);
cocos2d::CCPoint::operator+(&v53, &v51, &v52);
SetupTriggerPopup::createToggleValueControl(a1, 589, 1.0, (__int64)&v54, &v53, 0, 0, 0);
v26 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v38 = (unsigned int *)&v54[-1].m_caption;
do
v39 = __ldaxr(v38);
while ( __stlxr(v39 - 1, v38) );
}
else
{
v39 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v39 - 1;
}
if ( v39 <= 0 )
operator delete(v26);
}
sub_D153B8((int)&v54, "NO Multi\nActivate");
cocos2d::CCPoint::CCPoint(
&v53,
20.0 - (float)((float)(a1->m_width * 0.5) - (float)(v49 * 0.5)),
25.0 - (float)((float)(a1->m_height * 0.5) - (float)(v50 * 0.5)));
SetupTriggerPopup::createToggleValueControl(a1, 444, 1.0, (__int64)&v54, &v53, 0, 0, 0);
v27 = &v54[-1].m_textOffset;
if ( &v54[-1].m_textOffset != (cocos2d::CCPoint *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v46 = (unsigned int *)&v54[-1].m_caption;
do
v47 = __ldaxr(v46);
while ( __stlxr(v47 - 1, v46) );
}
else
{
v47 = (int)v54[-1].m_caption.m_data.m_data;
LODWORD(v54[-1].m_caption.m_data.m_data) = v47 - 1;
}
if ( v47 <= 0 )
operator delete(v27);
}
SetupTriggerPopup::postSetup(a1);
}
return v4;
}