//
// SetupStopTriggerPopup::init from 0xb7947c to 0xb79b4c (1744 bytes)
//
// 2 xrefs:
// > SetupStopTriggerPopup::create @ 0xb79d80
// > ??> @ 0x57fa0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:02:24 +0000
//
__int64 __fastcall SetupStopTriggerPopup::init(SetupStopTriggerPopup *this, EffectGameObject *a2, cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
__int64 v7; // x2
__int64 v8; // x2
__int64 v9; // x3
__int64 v10; // x4
__int64 v11; // x5
const char *v12; // x6
cocos2d::CCDirector *MultiTriggerItemsDefault; // x0
cocos2d::CCDirector *v14; // x0
unsigned int v15; // w25
int v16; // w26
__int64 v17; // [xsp+90h] [xbp+80h] BYREF
float v18[2]; // [xsp+98h] [xbp+88h] BYREF
_BYTE v19[8]; // [xsp+A0h] [xbp+90h] BYREF
_BYTE v20[8]; // [xsp+A8h] [xbp+98h] BYREF
__int64 v21; // [xsp+B0h] [xbp+A0h] BYREF
__int64 v22; // [xsp+B8h] [xbp+A8h] BYREF
size_t v23; // [xsp+C0h] [xbp+B0h]
void *v24; // [xsp+C8h] [xbp+B8h]
__int64 v25; // [xsp+D0h] [xbp+C0h]
__int64 v26; // [xsp+E8h] [xbp+D8h] BYREF
size_t v27; // [xsp+F0h] [xbp+E0h]
void *v28; // [xsp+F8h] [xbp+E8h]
__int64 v29[2]; // [xsp+100h] [xbp+F0h] BYREF
void *v30; // [xsp+110h] [xbp+100h]
__int64 v31; // [xsp+118h] [xbp+108h] BYREF
size_t v32; // [xsp+120h] [xbp+110h]
void *v33; // [xsp+128h] [xbp+118h]
__int64 v34[2]; // [xsp+130h] [xbp+120h] BYREF
void *v35; // [xsp+140h] [xbp+130h]
__int64 v36; // [xsp+148h] [xbp+138h] BYREF
size_t v37; // [xsp+150h] [xbp+140h]
void *v38; // [xsp+158h] [xbp+148h]
__int64 v39[2]; // [xsp+160h] [xbp+150h] BYREF
void *v40; // [xsp+170h] [xbp+160h]
__int64 v41[2]; // [xsp+178h] [xbp+168h] BYREF
void *v42; // [xsp+188h] [xbp+178h]
__int64 v43[2]; // [xsp+190h] [xbp+180h] BYREF
void *v44; // [xsp+1A0h] [xbp+190h]
__int64 v45[2]; // [xsp+1A8h] [xbp+198h] BYREF
void *v46; // [xsp+1B8h] [xbp+1A8h]
__int64 v47[2]; // [xsp+1C0h] [xbp+1B0h] BYREF
void *v48; // [xsp+1D0h] [xbp+1C0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 320.0, 240.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
v22 = 0;
v23 = 0;
v24 = nullptr;
std::string::__init(&v22, "Stop Trigger", 0xCu);
v7 = *(_QWORD *)this;
v25 = 0;
(*(void (__fastcall **)(SetupStopTriggerPopup *, __int64))(v7 + 1464))(this, 533);
SetupTriggerPopup::preSetup(this);
v26 = 0;
v27 = 0;
v28 = nullptr;
if ( (v22 & 1) != 0 )
{
std::string::__init(&v26, v24, v23);
}
else
{
v28 = v24;
v26 = v22;
v27 = v23;
}
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v26);
if ( (v26 & 1) != 0 )
operator delete(v28);
v29[0] = 0;
v29[1] = 0;
v30 = nullptr;
std::string::__init(v29, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)v29, v8, v9, v10, v11, v12);
if ( (v29[0] & 1) != 0 )
operator delete(v30);
v31 = 0;
v32 = 0;
v33 = nullptr;
std::string::__init(
&v31,
"Stops triggers from being active permanently.\n"
"TargetID must be a group on the trigger(s) that you want to stop. If you only want to stop certain trigger"
"s within a group, use Control ID.\n"
"Hint: Unlike Group ID, Control ID can be remapped.\n"
"Pause/Resume works on: Pulse, Col, Alpha, Move, Rotate, Scale, Spawn, Follow, FollowPY, ADVFollow",
0x166u);
v34[0] = 0;
v34[1] = 0;
v35 = nullptr;
std::string::__init(v34, "Help", 4u);
v36 = 0;
v37 = 0;
v38 = nullptr;
if ( (v31 & 1) != 0 )
{
std::string::__init(&v36, v33, v32);
}
else
{
v38 = v33;
v36 = v31;
v37 = v32;
}
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v34, (char *)&v36, 1.0);
if ( (v36 & 1) != 0 )
operator delete(v38);
if ( (v34[0] & 1) != 0 )
operator delete(v35);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize(&v17, v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, *(float *)&v17 * 0.5, *((float *)&v17 + 1) * 0.5);
if ( (*(float (__fastcall **)(SetupStopTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 535) == 0.0 )
v15 = 1;
else
v15 = 6;
v39[0] = 0;
v39[1] = 0;
v40 = nullptr;
std::string::__init(v39, "TargetID", 8u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v21,
(float)(*(float *)&v17 * 0.5) + -70.0,
(float)(*((float *)&v17 + 1) * 0.5) + 45.0);
IDNameInput::create(this, (char *)this + 544, v15, 51, v39, &v21, 6, 0, 0.8, 0, 0);
if ( (v39[0] & 1) != 0 )
operator delete(v40);
v41[0] = 0;
v41[1] = 0;
v42 = nullptr;
std::string::__init(v41, "Use\nControl ID", 0xEu);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v21,
(float)(*(float *)&v17 * 0.5) + 45.0,
(float)(*((float *)&v17 + 1) * 0.5) + 45.0);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x217u,
v41,
(const cocos2d::CCPoint *)&v21,
0,
0,
0,
1.0);
if ( (v41[0] & 1) != 0 )
operator delete(v42);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v18[0], v18[1] - 20.0);
v16 = (int)(*(float (__fastcall **)(SetupStopTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 580);
v43[0] = 0;
v43[1] = 0;
v44 = nullptr;
std::string::__init(v43, "Stop", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, -75.0, 0.0);
cocos2d::CCPoint::operator+(&v21, v19);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
0,
v16 == 0,
1u,
(char *)v43,
(const cocos2d::CCPoint *)&v21,
1u,
0,
0);
if ( (v43[0] & 1) != 0 )
operator delete(v44);
v45[0] = 0;
v45[1] = 0;
v46 = nullptr;
std::string::__init(v45, "Pause", 5u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v21, v19);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
1u,
v16 == 1,
1u,
(char *)v45,
(const cocos2d::CCPoint *)&v21,
1u,
0,
0);
if ( (v45[0] & 1) != 0 )
operator delete(v46);
v47[0] = 0;
v47[1] = 0;
v48 = nullptr;
std::string::__init(v47, "Resume", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 75.0, 0.0);
cocos2d::CCPoint::operator+(&v21, v19);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
2u,
v16 == 2,
1u,
(char *)v47,
(const cocos2d::CCPoint *)&v21,
1u,
0,
0);
if ( (v47[0] & 1) != 0 )
operator delete(v48);
SetupTriggerPopup::postSetup(this);
if ( (v31 & 1) != 0 )
operator delete(v33);
if ( (v22 & 1) != 0 )
operator delete(v24);
}
return v5;
}