//
// SetupSequenceTriggerPopup::init from 0xb82564 to 0xb831d8 (3188 bytes)
//
// 2 xrefs:
// > SetupSequenceTriggerPopup::create @ 0xb83464
// > ??> @ 0x6df48
//
// 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:29 +0000
//
__int64 __fastcall SetupSequenceTriggerPopup::init(SetupSequenceTriggerPopup *this, SequenceTriggerGameObject *a2)
{
unsigned __int8 v3; // w0
unsigned int v4; // w27
cocos2d::CCArray *v6; // x0
cocos2d::CCObject *v7; // x0
cocos2d::CCDirector *v8; // x0
cocos2d::CCDirector *v9; // x0
const char *v10; // x2
__int64 v11; // x23
void (__fastcall *v12)(__int64, __int64 *); // x24
const char *v13; // x6
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x23
cocos2d::CCNode *v17; // x28
int v18; // w23
__int64 (__fastcall *v19)(SetupSequenceTriggerPopup *, cocos2d::CCObject *); // x24
const char *v20; // x1
cocos2d::CCSprite *v21; // x0
__int64 v22; // x0
ButtonSprite *v23; // x28
cocos2d::CCSprite *v24; // x4
__int64 v25; // x0
_DWORD *v26; // x24
void (__fastcall *v27)(_DWORD *, __int64 *); // x28
__int64 v28; // x22
void (__fastcall *v29)(__int64, __int64 *); // x24
void (__fastcall *v30)(__int64, __int64 *); // x24
int v31; // w23
float v32; // s0
int v33; // w24
cocos2d::CCNode *v34; // [xsp+B0h] [xbp+80h]
void (__fastcall *v35)(__int64, __int64 *); // [xsp+B8h] [xbp+88h]
__int64 v36; // [xsp+C8h] [xbp+98h] BYREF
_BYTE v37[8]; // [xsp+D0h] [xbp+A0h] BYREF
__int64 v38; // [xsp+D8h] [xbp+A8h] BYREF
_BYTE v39[8]; // [xsp+E0h] [xbp+B0h] BYREF
__int64 v40; // [xsp+E8h] [xbp+B8h] BYREF
_BYTE v41[8]; // [xsp+F0h] [xbp+C0h] BYREF
__int64 v42[2]; // [xsp+F8h] [xbp+C8h] BYREF
__int64 v43; // [xsp+108h] [xbp+D8h] BYREF
__int64 v44; // [xsp+110h] [xbp+E0h]
void *v45; // [xsp+118h] [xbp+E8h]
__int64 v46; // [xsp+120h] [xbp+F0h] BYREF
__int64 v47; // [xsp+128h] [xbp+F8h]
void *v48; // [xsp+130h] [xbp+100h]
v3 = SetupTriggerPopup::init(this, a2, nullptr, 420.0, 300.0, 1u, 0.0);
v4 = v3;
if ( !v3 )
return v4;
v6 = (cocos2d::CCArray *)SetupTriggerPopup::preSetup(this);
v7 = (cocos2d::CCObject *)cocos2d::CCArray::create(v6);
*((_QWORD *)this + 129) = v7;
v8 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(v7);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::getWinSize(&v36, v9);
v11 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Sequence Trigger", "goldFont.fnt", v10);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v11);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.7);
v12 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v42,
*(float *)&v36 * 0.5,
(float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v36 + 1) * 0.5)) - 18.0);
v12(v11, v42);
v14 = ButtonSprite::create(
(ButtonSprite *)"OK",
(const char *)&qword_28,
0,
1,
0.8,
"goldFont.fnt",
"GJ_button_01.png",
v13,
30.0);
v15 = CCMenuItemSpriteExtra::create(v14, 0, (__int64)this, 1368, 1);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v15);
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "Help", 4u);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(
&v46,
"Activates a sequence of triggers. Every time it is called, the sequence is advanced one step.\n"
"GroupID is called the amount of times given by Count.\n"
"MinInt is the minimum interval between each step.\n"
"Mode Stop stops the sequence at the end.\n"
"Mode Loop restarts the sequence after ending.\n"
"Mode Last calls last group after the end.\n"
"Reset Full and Reset Step go back in the sequence if activation does not happen in a set time.",
0x1E5u);
v16 = InfoAlertButton::create((char *)&v43, (char *)&v46, 1.0);
if ( (v46 & 1) != 0 )
{
operator delete(v48);
if ( (v43 & 1) == 0 )
goto LABEL_5;
LABEL_44:
operator delete(v45);
goto LABEL_5;
}
if ( (v43 & 1) != 0 )
goto LABEL_44;
LABEL_5:
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v16);
v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
v34 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v41,
18.0 - (float)((float)(*((float *)this + 183) * 0.5) - (float)(*(float *)&v36 * 0.5)),
(float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v36 + 1) * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace(v42, v34, (const cocos2d::CCPoint *)v41);
v35(v16, v42);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
(float)(*(float *)&v36 * 0.5) + -65.0,
(float)(*((float *)&v36 + 1) * 0.5) + 82.0);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "GroupID:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -60.0, 0.0);
cocos2d::CCPoint::operator+(v42, v37);
IDNameInput::create(this, (char *)this + 544, 1, 0xFFFFFFFFLL, &v46, v42, 6, 0, 0.7, 0, 0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Count:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 60.0, 0.0);
cocos2d::CCPoint::operator+(v42, v37);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
-2,
(char *)&v46,
(__int64)v42,
1,
2,
6,
1,
0.7,
0.0,
100.0,
0,
0,
0,
2,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v17 = *((cocos2d::CCNode **)this + 69);
v18 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 138.0, 0.0);
cocos2d::CCPoint::operator+(v42, v37);
cocos2d::CCNode::convertToNodeSpace(&v38, v17, (const cocos2d::CCPoint *)v42);
do
{
v19 = SetupSequenceTriggerPopup::onAddChance;
v43 = 0;
v44 = 0;
v45 = nullptr;
std::string::__init(&v43, "edit_addCBtn_001.png", 0x14u);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "GJ_button_01.png", 0x10u);
if ( v18 == 1 )
{
std::string::assign(&v43, "edit_delCBtn_001.png");
v19 = SetupSequenceTriggerPopup::onDeleteSelected;
std::string::assign(&v46, "GJ_button_06.png");
}
else if ( v18 > 1 )
{
std::string::assign(&v43, "edit_upBtn_001.png");
v19 = SetupSequenceTriggerPopup::onChangeOrder;
std::string::assign(&v46, "GJ_button_05.png");
}
if ( (v43 & 1) != 0 )
v21 = (cocos2d::CCSprite *)v45;
else
v21 = (cocos2d::CCSprite *)((char *)&v43 + 1);
v22 = cocos2d::CCSprite::createWithSpriteFrameName(v21, v20);
v23 = (ButtonSprite *)v22;
if ( v18 == 2 )
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 360LL))(v22, -90.0);
}
else if ( v18 == 3 )
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 360LL))(v22, 90.0);
}
v24 = (cocos2d::CCSprite *)((char *)&v46 + 1);
if ( (v46 & 1) != 0 )
v24 = (cocos2d::CCSprite *)v48;
v25 = ButtonSprite::create(
v23,
(cocos2d::CCSprite *)&qword_20,
0,
(char)&dword_0 + 1,
32.0,
1.0,
v24,
(const char *)&dword_0 + 1,
0.0);
v26 = (_DWORD *)CCMenuItemSpriteExtra::create(v25, 0, (__int64)this, (__int64)v19, 0);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v26 + 160LL))(v26, 0.6);
v26[101] = 1058642330;
(*(void (__fastcall **)(_QWORD, _DWORD *))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v26);
v27 = *(void (__fastcall **)(_DWORD *, __int64 *))(*(_QWORD *)v26 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (float)v18 * 32.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v38);
v27(v26, v42);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)v26 + 72LL))(v26, (unsigned int)v18);
if ( (v46 & 1) != 0 )
operator delete(v48);
if ( (v43 & 1) != 0 )
operator delete(v45);
++v18;
}
while ( v18 != 4 );
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v42, 0.0, 0.0, 80.0, 80.0);
v28 = cocos2d::extension::CCScale9Sprite::create("square02_001.png", v42);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v28 + 912LL))(v28, 50);
v29 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v28 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v42, 370.0, 90.0);
v29(v28, v42);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v28,
0xFFFFFFFFLL);
v30 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v28 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, *(float *)&v36 * 0.5, (float)(*((float *)&v36 + 1) * 0.5) + 14.0);
v30(v28, v42);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, *(float *)&v36 * 0.5, (float)(*((float *)&v36 + 1) * 0.5) + -50.0);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "MinInt:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -91.0, -0.0);
cocos2d::CCPoint::operator+(v42, v39);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
437,
(char *)&v46,
(__int64)v42,
0,
1,
6,
0,
0.65,
0.0,
1.0,
0,
0,
1,
2,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Reset:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 91.0, -0.0);
cocos2d::CCPoint::operator+(v42, v39);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
438,
(char *)&v46,
(__int64)v42,
0,
1,
6,
0,
0.65,
0.0,
1.0,
0,
0,
1,
2,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, -25.0, -34.0);
cocos2d::CCPoint::operator+(&v40, v39);
v31 = (int)(*(float (__fastcall **)(SetupSequenceTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 436);
(*(void (__fastcall **)(SetupSequenceTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 439);
v46 = 0;
v33 = (int)v32;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Mode\nStop", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -158.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v40);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
0,
v31 == 0,
1u,
(char *)&v46,
(const cocos2d::CCPoint *)v42,
0,
0,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Mode\nLoop", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -79.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v40);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
1u,
v31 == 1,
1u,
(char *)&v46,
(const cocos2d::CCPoint *)v42,
0,
0,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Mode\nLast", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v40);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
2u,
v31 == 2,
1u,
(char *)&v46,
(const cocos2d::CCPoint *)v42,
0,
0,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Reset\nFull", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 79.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v40);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
0x64u,
v33 != 1,
1u,
(char *)&v46,
(const cocos2d::CCPoint *)v42,
0,
0,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Reset\nStep", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 158.0, 0.0);
cocos2d::CCPoint::operator+(v42, &v40);
SetupTriggerPopup::createCustomToggleValueControl(
(__int64)this,
0x65u,
v33 == 1,
1u,
(char *)&v46,
(const cocos2d::CCPoint *)v42,
0,
0,
0);
if ( (v46 & 1) != 0 )
operator delete(v48);
v46 = 0;
v47 = 0;
v48 = nullptr;
std::string::__init(&v46, "Unique\nRemap", 0xCu);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v42,
(float)(*(float *)&v36 * 0.5) + 55.0,
20.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v36 + 1) * 0.5)));
SetupTriggerPopup::createToggleValueControl((__int64)this, 0x1F9u, &v46, (const cocos2d::CCPoint *)v42, 0, 0, 0, 1.0);
if ( (v46 & 1) != 0 )
operator delete(v48);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(this);
SetupSequenceTriggerPopup::updateGroupIDButtons(this);
SetupTriggerPopup::postSetup(this);
SetupTriggerPopup::updateValue((cocos2d::CCDictionary **)this, 0xFFFFFFFE, 1.0);
return v4;
}