//
// SetupObjectTogglePopup::init from 0x5ea1a0 to 0x5ea6f4 (1364 bytes)
//
// 1 xrefs:
// > SetupObjectTogglePopup::create @ 0x5ea912
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:54:22 +0000
//
int __fastcall SetupObjectTogglePopup::init(
SetupObjectTogglePopup *this,
EffectGameObject *a2,
cocos2d::CCArray *a3,
int a4)
{
EffectGameObject *v6; // r4
int v8; // r10
int v9; // r7
int v10; // r0
const char *v11; // r11
size_t v12; // r0
int *v13; // r0
cocos2d::CCDirector *v14; // r0
float v16; // [sp+2Ch] [bp-60h] BYREF
float v17; // [sp+30h] [bp-5Ch]
_BYTE v18[8]; // [sp+34h] [bp-58h] BYREF
_BYTE v19[8]; // [sp+3Ch] [bp-50h] BYREF
_BYTE v20[8]; // [sp+44h] [bp-48h] BYREF
_BYTE v21[8]; // [sp+4Ch] [bp-40h] BYREF
int v22; // [sp+54h] [bp-38h] BYREF
size_t v23; // [sp+58h] [bp-34h]
const void *v24; // [sp+5Ch] [bp-30h]
int v25; // [sp+60h] [bp-2Ch] BYREF
size_t v26; // [sp+64h] [bp-28h]
const void *v27; // [sp+68h] [bp-24h]
int v28; // [sp+6Ch] [bp-20h] BYREF
int v29; // [sp+70h] [bp-1Ch]
int v30; // [sp+74h] [bp-18h]
int v31; // [sp+78h] [bp-14h] BYREF
int v32; // [sp+7Ch] [bp-10h]
int v33; // [sp+80h] [bp-Ch]
v6 = a2;
v8 = SetupTriggerPopup::init(this, a2, a3, 300.0, 240.0, 1, 0.0);
if ( !v8 )
return v8;
SetupTriggerPopup::preSetup(this);
if ( v6 )
{
v9 = *((_DWORD *)v6 + 223);
}
else
{
v9 = -1;
if ( !a3 )
goto LABEL_13;
while ( (unsigned int)v6 < cocos2d::CCArray::count(a3) )
{
v10 = cocos2d::CCArray::objectAtIndex(a3, (unsigned int)v6);
if ( v9 == -1 )
{
v9 = *(_DWORD *)(v10 + 892);
}
else if ( *(_DWORD *)(v10 + 892) != v9 )
{
v9 = 0;
goto LABEL_13;
}
v6 = (EffectGameObject *)((char *)v6 + 1);
}
}
if ( v9 == 1812 )
{
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "On Death Trigger", 0x10u);
SetupTriggerPopup::addTitle(this, &v31);
std::string::~string((int)&v31);
v28 = 0;
v29 = 0;
v30 = 0;
std::string::__init(&v28, "Help", 4u);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(
&v31,
"Works like a Toggle + Spawn trigger that is activated upon player death.\n"
"Disable using a Stop trigger.",
0x86u);
SetupTriggerPopup::addHelpButton(this, &v28, &v31, 1065353216);
LABEL_21:
std::string::~string((int)&v31);
v13 = &v28;
goto LABEL_22;
}
if ( v9 == 3643 )
{
v11 = "Toggle Block";
goto LABEL_16;
}
LABEL_13:
if ( v9 != 1594 )
{
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "Toggle Group", 0xCu);
SetupTriggerPopup::addTitle(this, &v31);
std::string::~string((int)&v31);
v28 = 0;
v29 = 0;
v30 = 0;
std::string::__init(&v28, "Help", 4u);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(
&v31,
"Toggles off a group of objects.\n"
"Use Activate Group to toggle on instead.\n"
"Objects that are toggled off are invisible and untouchable.\n"
"Triggers that are toggled off do not activate.",
0xC3u);
SetupTriggerPopup::addHelpButton(this, &v28, &v31, 1065353216);
goto LABEL_21;
}
v11 = "Toggle Orb";
LABEL_16:
v22 = 0;
v23 = 0;
v24 = nullptr;
v12 = strlen(v11);
std::string::__init(&v22, v11, v12);
v25 = 0;
v26 = 0;
v27 = nullptr;
if ( (v22 & 1) != 0 )
{
std::string::__init(&v25, v24, v23);
}
else
{
v25 = v22;
v26 = v23;
v27 = v24;
}
SetupTriggerPopup::addTitle(this, &v25);
std::string::~string((int)&v25);
v28 = 0;
v29 = 0;
v30 = 0;
std::string::__init(&v28, "Help", 4u);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(
&v31,
"Disables Group ID if the player clicks within the hitbox.\n"
"Use Activate Group to activate and spawn instead.\n"
"Claim Touch disables player jump, rings, and click buffering.\n"
"Spawn Only makes the group spawn and not toggle on or off.",
0x104u);
SetupTriggerPopup::addHelpButton(this, &v28, &v31, 1065353216);
std::string::~string((int)&v31);
std::string::~string((int)&v28);
v13 = &v22;
LABEL_22:
std::string::~string((int)v13);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "OK", 2u);
SetupTriggerPopup::addCloseButton(this, &v31);
v14 = (cocos2d::CCDirector *)std::string::~string((int)&v31);
cocos2d::CCDirector::sharedDirector(v14);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v16 * 0.5, (float)(v17 * 0.5) + 30.0);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "Group ID", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (const cocos2d::CCPoint *)v18);
IDNameInput::create((int)this, (int)this + 440, 1, 51, (int)&v31, (int)v21, 0.9, 6, 0, 0, 0);
std::string::~string((int)&v31);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v19,
(float)((float)(v16 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 20.0,
(float)((float)(v17 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 60.0);
if ( v9 == 3643 || v9 == 1594 )
{
v31 = 0;
v32 = 0;
v33 = 0;
if ( a4 )
{
std::string::__init(&v31, "NO Multi\nActivate", 0x11u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, -35.0);
cocos2d::CCPoint::operator+(v21, v19, v20);
SetupTriggerPopup::createToggleValueControl((int)this, 444, (int)&v31, (int)v21, 0, 0, 0, 1.0);
}
else
{
std::string::__init(&v31, "Multi\nActivate", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, -35.0);
cocos2d::CCPoint::operator+(v21, v19, v20);
SetupTriggerPopup::createToggleValueControl((int)this, 99, (int)&v31, (int)v21, 0, 0, 0, 1.0);
}
std::string::~string((int)&v31);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "Claim Touch", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, 0.0);
cocos2d::CCPoint::operator+(v21, v19, v20);
SetupTriggerPopup::createToggleValueControl((int)this, 445, (int)&v31, (int)v21, 0, 0, 0, 1.0);
std::string::~string((int)&v31);
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "Spawn\nOnly", 0xAu);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v21,
(float)((float)(*((float *)this + 139) * 0.5) + (float)(v16 * 0.5)) - 65.0,
(float)((float)((float)(v17 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 60.0) - 35.0);
SetupTriggerPopup::createToggleValueControl((int)this, 504, (int)&v31, (int)v21, 0, 0, 0, 1.0);
std::string::~string((int)&v31);
}
else
{
SetupTriggerPopup::createMultiTriggerItemsDefault(this);
}
v31 = 0;
v32 = 0;
v33 = 0;
std::string::__init(&v31, "Activate Group", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (float)(v16 * 0.5) - 50.0, (float)(v17 * 0.5) - 20.0);
SetupTriggerPopup::createToggleValueControl((int)this, 56, (int)&v31, (int)v21, 0, 0, 0, 1.0);
std::string::~string((int)&v31);
SetupTriggerPopup::postSetup(this);
return v8;
}