//
// SetupEnterTriggerPopup::init from 0xa22a5c to 0xa22f5c (1280 bytes)
//
// 2 xrefs:
// > SetupEnterTriggerPopup::create @ 0xa2319c
// > ??> @ 0xf1000
//
// 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 12:59:41 +0000
//
__int64 __fastcall SetupEnterTriggerPopup::init(
SetupEnterTriggerPopup *this,
EnterEffectObject *a2,
cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w22
__int64 v7; // x1
cocos2d::CCDirector *MultiTriggerItemsDefault; // x0
cocos2d::CCDirector *v9; // x0
CCMenuItemToggler *ToggleButton; // x0
char v11; // w1
cocos2d::CCNode *v12; // x27
__int64 v13; // x26
CCMenuItemToggler *v14; // x0
char v15; // w1
int v16; // [xsp+8h] [xbp-28h]
__int64 v17; // [xsp+B8h] [xbp+88h]
cocos2d::CCNode *v18; // [xsp+C0h] [xbp+90h]
unsigned __int8 v19; // [xsp+CCh] [xbp+9Ch]
unsigned __int8 v20; // [xsp+CCh] [xbp+9Ch]
__int64 v21; // [xsp+D0h] [xbp+A0h] BYREF
_BYTE v22[8]; // [xsp+D8h] [xbp+A8h] BYREF
_BYTE v23[8]; // [xsp+E0h] [xbp+B0h] BYREF
__int64 v24; // [xsp+E8h] [xbp+B8h] BYREF
__int64 v25; // [xsp+F0h] [xbp+C0h] BYREF
__int64 v26[2]; // [xsp+F8h] [xbp+C8h] BYREF
void *v27; // [xsp+108h] [xbp+D8h]
__int64 v28; // [xsp+110h] [xbp+E0h] BYREF
__int64 v29; // [xsp+118h] [xbp+E8h]
void *v30; // [xsp+120h] [xbp+F0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 330.0, 200.0, 1, 0.0);
v5 = v4;
if ( v4 )
{
v7 = *(_QWORD *)this;
*((_BYTE *)this + 744) = 1;
(*(void (__fastcall **)(SetupEnterTriggerPopup *))(v7 + 1360))(this);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "Enter Effect Trigger", 0x14u);
SetupTriggerPopup::addTitle(this, &v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "OK", 2u);
SetupTriggerPopup::addCloseButton(this, &v28);
if ( (v28 & 1) != 0 )
operator delete(v30);
v26[0] = 0;
v26[1] = 0;
v27 = nullptr;
std::string::__init(v26, "Help", 4u);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(
&v28,
"Target Enter Channel lets you target only objects with a set Enter Channel.\n"
"Enter and Exit Only makes the effect only apply upon entering or exiting respectively.",
0xB2u);
SetupTriggerPopup::addHelpButton(this, v26, &v28, 1.0);
if ( (v28 & 1) != 0 )
operator delete(v30);
if ( (v26[0] & 1) != 0 )
operator delete(v27);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize(&v21, v9);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v22,
*(float *)&v21 * 0.5,
(float)(*((float *)&v21 + 1) * 0.5) + -25.0);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "Enter\nOnly", 0xAu);
v19 = *((_DWORD *)this + 258) == 1;
v18 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -50.0, 0.0);
cocos2d::CCPoint::operator+(&v24, v22);
v17 = *((_QWORD *)this + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 6.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(__int64)&v28,
(const char *)SetupEnterTriggerPopup::onEnterType,
0,
v19,
v18,
(const cocos2d::CCPoint *)&v24,
(__int64)this,
v17,
0.7,
0.35,
110.0,
(float *)&v25,
"bigFont.fnt",
0,
0,
nullptr);
v11 = v28;
*((_QWORD *)this + 127) = ToggleButton;
if ( (v11 & 1) != 0 )
operator delete(v30);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "Exit\nOnly", 9u);
v20 = *((_DWORD *)this + 258) == 2;
v12 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v24, v22);
v13 = *((_QWORD *)this + 73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, 6.0, 0.0);
v14 = GameToolbox::createToggleButton(
(__int64)&v28,
(const char *)SetupEnterTriggerPopup::onEnterType,
0,
v20,
v12,
(const cocos2d::CCPoint *)&v24,
(__int64)this,
v13,
0.7,
0.35,
110.0,
(float *)&v25,
"bigFont.fnt",
0,
0,
nullptr);
v15 = v28;
*((_QWORD *)this + 128) = v14;
if ( (v15 & 1) != 0 )
operator delete(v30);
*(_BYTE *)(*((_QWORD *)this + 127) + 393LL) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 127) + 72LL))(*((_QWORD *)this + 127), 1);
*(_BYTE *)(*((_QWORD *)this + 128) + 393LL) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 128) + 72LL))(*((_QWORD *)this + 128), 2);
v28 = 0;
v29 = 0;
v30 = nullptr;
std::string::__init(&v28, "Target Enter Channel:", 0x15u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, 0.0, 50.0);
cocos2d::CCPoint::operator+(&v25, v22);
LOBYTE(v16) = 0;
IDNameInput::create(this, (char *)this + 544, 8, 344, &v28, &v25, 6, 0, 0.7, 0, v16);
if ( (v28 & 1) != 0 )
operator delete(v30);
(*(void (__fastcall **)(SetupEnterTriggerPopup *))(*(_QWORD *)this + 1432LL))(this);
*((_BYTE *)this + 744) = 0;
}
return v5;
}