//
// SetupAnimSettingsPopup::init from 0x94e6c4 to 0x94f150 (2700 bytes)
//
// 2 xrefs:
// > SetupAnimSettingsPopup::create @ 0x94f30c
// > ??> @ 0x7ea50
//
// 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 SetupAnimSettingsPopup::init(SetupAnimSettingsPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w27
void *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
cocos2d::CCDirector *v10; // x0
float v11; // s2
void *v12; // x0
float v13; // s2
void *v14; // x0
float v15; // s2
void *v16; // x0
float v17; // s2
void *v18; // x0
float v19; // s2
void *v20; // x0
float v21; // s2
void *v22; // x0
float v23; // s3
float v24; // s4
void *v25; // x0
float v26; // s3
float v27; // s4
void *v28; // x0
float v29; // s2
void *v30; // x19
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; // x21
int v56; // w0
int v57; // [xsp+18h] [xbp-18h]
__int64 v58; // [xsp+18h] [xbp-18h]
char v59; // [xsp+20h] [xbp-10h]
__int64 v60; // [xsp+20h] [xbp-10h]
_QWORD v61[2]; // [xsp+30h] [xbp+0h] BYREF
float v62; // [xsp+B8h] [xbp+88h]
float v63; // [xsp+BCh] [xbp+8Ch]
cocos2d::CCPoint v64; // [xsp+C0h] [xbp+90h] BYREF
__int64 v65; // [xsp+C8h] [xbp+98h] BYREF
cocos2d::CCPoint v66; // [xsp+D0h] [xbp+A0h] BYREF
__int64 v67; // [xsp+D8h] [xbp+A8h] BYREF
cocos2d::CCPoint v68; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCPoint v69; // 0:s0.4,4:s1.4
cocos2d::CCPoint v70; // 0:s0.4,4:s1.4
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
cocos2d::CCPoint v74; // 0:s0.4,4:s1.4
cocos2d::CCPoint v75; // 0:s0.4,4:s1.4
cocos2d::CCPoint v76; // 0:s0.4,4:s1.4
cocos2d::CCPoint v77; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 240.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_D153B8((unsigned int)v61 + 176, "Edit Animation Settings");
SetupTriggerPopup::addTitle(a1, (std::string)&v68);
v6 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v31 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v32 = __ldaxr(v31);
while ( __stlxr(v32 - 1, v31) );
}
else
{
v32 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v32 - 1;
}
if ( v32 <= 0 )
operator delete(v6);
}
sub_D153B8((unsigned int)v61 + 176, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v68);
v7 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v33 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v34 = __ldaxr(v33);
while ( __stlxr(v34 - 1, v33) );
}
else
{
v34 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v34 - 1;
}
if ( v34 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v67, "Help");
sub_D153B8(
(unsigned int)v61 + 176,
"Disable Anim Shine removes the white flash at the start of the animation for some animated objects.\n"
"Use Speed lets you set a custom animation speed.\n"
"Use Animate On Trigger to toggle on with Animate trigger.\n"
"Only If Active only does this if the object is active.\n"
"Single Frame lets you select a specific frame of the animation.\n"
"Offset Anim will offset the animation the value of single frame.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v67, (std::string)&v68, 1.0);
v8 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v8);
}
v9 = (void *)(v67 - 24);
if ( (__int64 *)(v67 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v67 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(v67 - 8);
*(_DWORD *)(v67 - 8) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v9);
}
v10 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v10);
cocos2d::CCPoint::CCPoint(&v64, v62 * 0.5, v63 * 0.5);
cocos2d::CCPoint::CCPoint(&v68, -40.0, 60.0);
cocos2d::CCPoint::operator+(&v65, &v64, &v68);
sub_D153B8((unsigned int)v61 + 176, "Randomize\nStart");
cocos2d::CCPoint::CCPoint(&v66, -125.0, 0.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v69.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 106, (std::string)&v68, v69, (bool)&v67, 0, 0, v11);
v12 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v12);
}
sub_D153B8((unsigned int)v61 + 176, "Use\nSpeed");
cocos2d::CCPoint::CCPoint(&v66, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v70.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 122, (std::string)&v68, v70, (bool)&v67, 0, 0, v13);
v14 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v14);
}
sub_D153B8((unsigned int)v61 + 176, "Animate\non Trigger");
cocos2d::CCPoint::CCPoint(&v66, 125.0, 0.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v71.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 123, (std::string)&v68, v71, (bool)&v67, 0, 0, v15);
v16 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v16);
}
sub_D153B8((unsigned int)v61 + 176, "Disable\ndelayed\nloop");
cocos2d::CCPoint::CCPoint(&v66, -125.0, -40.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v72.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 126, (std::string)&v68, v72, (bool)&v67, 0, 0, v17);
v18 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v18);
}
sub_D153B8((unsigned int)v61 + 176, "Disable\nAnimShine");
cocos2d::CCPoint::CCPoint(&v66, 0.0, -40.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v73.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 127, (std::string)&v68, v73, (bool)&v67, 0, 0, v19);
v20 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v20);
}
sub_D153B8((unsigned int)v61 + 176, "Only if\nactive");
cocos2d::CCPoint::CCPoint(&v66, 125.0, -40.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v74.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 214, (std::string)&v68, v74, (bool)&v67, 0, 0, v21);
v22 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v22);
}
sub_D153B8((unsigned int)v61 + 176, "Speed:");
cocos2d::CCPoint::CCPoint(&v66, -100.0, -30.0);
cocos2d::CCPoint::operator+(&v67, &v64, &v66);
v75.x = 0.8;
v57 = 2;
v59 = 0;
v75.y = -2.0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
107,
(std::string)&v68,
v75,
2.0,
(bool)&v67,
(InputValueType)0,
1,
6,
v23,
v24,
0,
0,
GoldLabel,
0,
v57,
v59);
v25 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v25);
}
sub_D153B8((unsigned int)v61 + 176, "Single Frame:");
cocos2d::CCPoint::CCPoint(&v66, 100.0, -45.0);
cocos2d::CCPoint::operator+(&v67, &v64, &v66);
v76.x = 0.8;
v76.y = 0.0;
LODWORD(v58) = 2;
LOBYTE(v60) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
462,
(std::string)&v68,
v76,
20.0,
(bool)&v67,
Float,
3,
3,
v26,
v27,
1,
0,
GoldLabel,
0,
v58,
v60);
v28 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v28);
}
sub_D153B8((unsigned int)v61 + 176, "Offset\nAnim");
cocos2d::CCPoint::CCPoint(&v66, 125.0, -155.0);
cocos2d::CCPoint::operator+(&v67, &v65, &v66);
v77.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 592, (std::string)&v68, v77, (bool)&v67, 0, 0, v29);
v30 = (void *)(*(_QWORD *)&v68 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v68 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v55 = (unsigned int *)(*(_QWORD *)&v68 - 8LL);
do
v56 = __ldaxr(v55);
while ( __stlxr(v56 - 1, v55) );
}
else
{
v56 = *(_DWORD *)(*(_QWORD *)&v68 - 8LL);
*(_DWORD *)(*(_QWORD *)&v68 - 8LL) = v56 - 1;
}
if ( v56 <= 0 )
operator delete(v30);
}
SetupTriggerPopup::postSetup(a1);
}
return v4;
}