//
// SetupTeleportPopup::init from 0x6807e4 to 0x6812a8 (2756 bytes)
//
// 1 xrefs:
// > SetupTeleportPopup::create @ 0x6814b4
//
// 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:56:02 +0000
//
GameManager *__fastcall SetupTeleportPopup::init(
cocos2d::CCArray **this,
TeleportPortalObject *a2,
cocos2d::CCArray *a3,
int a4,
bool a5)
{
cocos2d::CCDirector *v6; // r0
int v7; // r8
const char *v8; // r2
int v9; // r4
cocos2d::CCArray *v10; // r0
cocos2d::CCObject *v11; // r0
char *v12; // r1
const cocos2d::CCPoint *v13; // r11
int v14; // r10
cocos2d::CCObject *ToggleButton; // r10
const char *v16; // r2
int v17; // r7
void (__fastcall *v18)(cocos2d::CCArray **, int, _BOOL4); // r4
_BOOL4 v19; // r2
void (__fastcall *v20)(cocos2d::CCArray **, int, bool); // r4
float v21; // r0
GameManager *v23; // [sp+34h] [bp-80h]
float v25; // [sp+54h] [bp-60h] BYREF
float v26; // [sp+58h] [bp-5Ch]
_BYTE v27[8]; // [sp+5Ch] [bp-58h] BYREF
_BYTE v28[8]; // [sp+64h] [bp-50h] BYREF
_BYTE v29[8]; // [sp+6Ch] [bp-48h] BYREF
_BYTE v30[8]; // [sp+74h] [bp-40h] BYREF
_BYTE v31[8]; // [sp+7Ch] [bp-38h] BYREF
_BYTE v32[8]; // [sp+84h] [bp-30h] BYREF
int (__fastcall *v33)(cocos2d::CCDictionary **, cocos2d::CCObject *); // [sp+8Ch] [bp-28h] BYREF
int v34; // [sp+90h] [bp-24h]
int v35; // [sp+94h] [bp-20h] BYREF
size_t v36; // [sp+98h] [bp-1Ch]
const void *v37; // [sp+9Ch] [bp-18h]
int v38; // [sp+A0h] [bp-14h] BYREF
size_t v39; // [sp+A4h] [bp-10h]
const void *v40; // [sp+A8h] [bp-Ch]
v23 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 420.0, 280.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v23 )
{
(*((void (__fastcall **)(cocos2d::CCArray **))*this + 170))(this);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Setup Teleport", 0xEu);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v38);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v38);
std::string::~string((int)&v38);
v35 = 0;
v36 = 0;
v37 = nullptr;
std::string::__init(&v35, "Help", 4u);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(
&v38,
"Teleports to an object using Target GroupID.\n"
"Smooth Ease makes the camera move slower.\n"
"Static Force lets you specify an exit force.\n"
"Redirect Force exits based on input force.\n"
"Save Offset keeps the offset from entering when exiting.\n"
"Redirect Dash will rotate the dash to the exit rotation in platformer mode.",
0x16Bu);
SetupTriggerPopup::addHelpButton((int)this, (int)&v35, (int)&v38, 1065353216);
std::string::~string((int)&v38);
v6 = (cocos2d::CCDirector *)std::string::~string((int)&v35);
cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, v25 * 0.5, (float)(v26 * 0.5) + 75.0);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Target GroupID:", 0xFu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v33, v27, v32);
IDNameInput::create((int)this, (int)(this + 110), 1, 51, (int)&v38, (int)&v33, 0.7, 6, 0, 0, 0);
std::string::~string((int)&v38);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v33, 130.0, 42.0);
cocos2d::CCPoint::operator+(v28, v27, &v33);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Smooth\nEase", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl((int)this, 55, (int)&v38, (const cocos2d::CCPoint *)&v33, 0, 0, 0, 0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Save\nOffset", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -24.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
351,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Ignore X", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -48.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
352,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Ignore Y", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -72.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
353,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Instant\nCamera", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -96.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
464,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Snap\nGround", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -120.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
510,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Redirect\nDash", 0xDu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, -144.0);
cocos2d::CCPoint::operator+(&v33, v28, v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
591,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
0.78);
std::string::~string((int)&v38);
if ( a4 != 3022 )
{
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v32,
(float)(v25 * 0.5) + 120.0,
(float)((float)(v26 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 24.0);
v38 = 0;
v39 = 0;
v40 = nullptr;
if ( a5 )
{
std::string::__init(&v38, "NO Multi\nActivate", 0x11u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v33, (const cocos2d::CCPoint *)v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
444,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
1.0);
}
else
{
std::string::__init(&v38, "Multi\nActivate", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v33, (const cocos2d::CCPoint *)v32);
SetupTriggerPopup::createToggleValueControl(
(int)this,
99,
(int)&v38,
(const cocos2d::CCPoint *)&v33,
0,
0,
0,
1.0);
}
std::string::~string((int)&v38);
}
v7 = 1;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v29,
(float)(v25 * 0.5) - 140.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v26 * 0.5)) - 20.0);
v9 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Gravity", "goldFont.fnt", v8);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 80))(v9, 1056964608);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v9);
v10 = (cocos2d::CCArray *)(*(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 92))(v9, v29);
v11 = (cocos2d::CCObject *)cocos2d::CCArray::create(v10);
*(this + 178) = v11;
cocos2d::CCObject::retain(v11);
do
{
v35 = 0;
v36 = 0;
v37 = nullptr;
if ( v7 == 1 )
{
v12 = "Normal";
}
else if ( v7 == 2 )
{
v12 = "Flipped";
}
else
{
v12 = "Toggle";
}
std::string::assign(&v35, v12);
v38 = 0;
v39 = 0;
v40 = nullptr;
if ( (v35 & 1) != 0 )
{
std::string::__init(&v38, v37, v36);
}
else
{
v38 = v35;
v39 = v36;
v40 = v37;
}
v13 = *(this + 111);
v33 = SetupTeleportPopup::onTeleportGravity;
v34 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, -25.0, (float)(-25 * v7));
cocos2d::CCPoint::operator+(v31, v29, v30);
v14 = (int)*(this + 115);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 6.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(int)&v38,
(int)v33,
v34,
0,
v13,
(int)v31,
(int)this,
v14,
0.6,
0.35,
60.0,
(int)v32,
"bigFont.fnt",
0,
0,
nullptr);
std::string::~string((int)&v38);
*((_BYTE *)ToggleButton + 309) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)ToggleButton + 36))(ToggleButton, v7);
cocos2d::CCArray::addObject(*(this + 178), ToggleButton);
++v7;
std::string::~string((int)&v35);
}
while ( v7 != 4 );
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, -25.0, -60.0);
cocos2d::CCPoint::operator+(v30, v27, v32);
v17 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Rotate Force", "goldFont.fnt", v16);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 80))(v17, 1056964608);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 115) + 228))(*(this + 115), v17);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92))(v17, v30);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Static\nForce", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, -80.0, -30.0);
cocos2d::CCPoint::operator+(v32, v30, v31);
SetupTriggerPopup::createToggleValueControl((int)this, 345, (int)&v38, (const cocos2d::CCPoint *)v32, 0, 0, 0, 1.0);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Redirect\nForce", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 20.0, -30.0);
cocos2d::CCPoint::operator+(v32, v30, v31);
SetupTriggerPopup::createToggleValueControl((int)this, 347, (int)&v38, (const cocos2d::CCPoint *)v32, 0, 0, 0, 1.0);
std::string::~string((int)&v38);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, v25 * 0.5, (float)(v26 * 0.5) - 60.0);
cocos2d::CCPoint::operator=(v27, v32);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Force:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, -50.0, 0.0);
cocos2d::CCPoint::operator+(v32, v27, v31);
SetupTriggerPopup::createValueControlAdvanced(
this,
346,
(unsigned __int8 *)&v38,
(int)v32,
1058642330,
0,
1,
6,
0,
0,
1106247680,
0,
1,
0,
2,
0);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Additive", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 50.0, 0.0);
cocos2d::CCPoint::operator+(v32, v27, v31);
SetupTriggerPopup::createToggleValueControl((int)this, 443, (int)&v38, (const cocos2d::CCPoint *)v32, 0, 0, 1, 1.0);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Min:", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, -120.0, 0.0);
cocos2d::CCPoint::operator+(v32, v27, v31);
SetupTriggerPopup::createValueControlAdvanced(
this,
348,
(unsigned __int8 *)&v38,
(int)v32,
1058642330,
0,
1,
6,
0,
0,
1092616192,
0,
2,
0,
2,
0);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Max:", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 0.0, 0.0);
cocos2d::CCPoint::operator+(v32, v27, v31);
SetupTriggerPopup::createValueControlAdvanced(
this,
349,
(unsigned __int8 *)&v38,
(int)v32,
1058642330,
0,
1,
6,
0,
0,
1106247680,
0,
2,
0,
2,
0);
std::string::~string((int)&v38);
v38 = 0;
v39 = 0;
v40 = nullptr;
std::string::__init(&v38, "Mod:", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v31, 120.0, 0.0);
cocos2d::CCPoint::operator+(v32, v27, v31);
SetupTriggerPopup::createValueControlAdvanced(
this,
350,
(unsigned __int8 *)&v38,
(int)v32,
1058642330,
0,
1,
6,
0,
0,
0x40000000,
0,
2,
0,
2,
0);
std::string::~string((int)&v38);
if ( a4 == 3022 )
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal((SetupTriggerPopup *)this);
(*((void (__fastcall **)(cocos2d::CCArray **))*this + 179))(this);
v18 = *((void (__fastcall **)(cocos2d::CCArray **, int, _BOOL4))*this + 169);
v19 = COERCE_FLOAT((*((int (__fastcall **)(cocos2d::CCArray **, int))*this + 183))(this, 345)) != 0.0;
v18(this, 1, v19);
v20 = *((void (__fastcall **)(cocos2d::CCArray **, int, bool))*this + 169);
v21 = COERCE_FLOAT((*((int (__fastcall **)(cocos2d::CCArray **, int))*this + 183))(this, 347));
v20(this, 2, v21 != 0.0);
*((_BYTE *)this + 568) = 0;
}
return v23;
}