//
// SetupAdvFollowRetargetPopup::init from 0x696f34 to 0x697284 (848 bytes)
//
// 1 xrefs:
// > SetupAdvFollowRetargetPopup::create @ 0x69734e
//
// 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:15 +0000
//
GameManager *__fastcall SetupAdvFollowRetargetPopup::init(
SetupAdvFollowRetargetPopup *this,
AdvancedFollowEditObject *a2,
cocos2d::CCArray *a3)
{
GameManager *v4; // r10
cocos2d::CCDirector *v5; // r0
float v6; // r0
int v7; // r3
int v9; // [sp+20h] [bp-4Ch]
float v10[2]; // [sp+2Ch] [bp-40h] BYREF
_BYTE v11[8]; // [sp+34h] [bp-38h] BYREF
_BYTE v12[8]; // [sp+3Ch] [bp-30h] BYREF
_BYTE v13[8]; // [sp+44h] [bp-28h] BYREF
int v14[3]; // [sp+4Ch] [bp-20h] BYREF
int v15; // [sp+58h] [bp-14h] BYREF
int v16; // [sp+5Ch] [bp-10h]
int v17; // [sp+60h] [bp-Ch]
v4 = SetupTriggerPopup::init(this, a2, a3, 380.0, 240.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v15);
std::string::~string((int)&v15);
SetupTriggerPopup::createMultiTriggerItemsDefault(this);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "Re-Target AdvFollow Trigger", 0x1Bu);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v15);
std::string::~string((int)&v15);
memset(v14, 0, sizeof(v14));
std::string::__init(v14, "Help", 4u);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(
&v15,
"Lets you change the target of an active Advanced Follow trigger.\n"
"Target GID is the objects that follow Follow GID.\n"
"You can also follow the player using P1 and P2 or the center of the screen using C.\n"
"View the editor guide for more details. ",
0x117u);
SetupTriggerPopup::addHelpButton((int)this, (int)v14, (int)&v15, 1065353216);
std::string::~string((int)&v15);
v5 = (cocos2d::CCDirector *)std::string::~string((int)v14);
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, v10[0] * 0.5, (float)(v10[1] * 0.5) + 30.0);
v6 = COERCE_FLOAT((*(int (__fastcall **)(SetupAdvFollowRetargetPopup *, int))(*(_DWORD *)this + 732))(this, 535));
v15 = 0;
v16 = 0;
v17 = 0;
if ( v6 == 0.0 )
v7 = 1;
else
v7 = 6;
v9 = v7;
std::string::__init(&v15, "Target GID:", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, -88.0, 0.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
IDNameInput::create((int)this, (int)this + 440, v9, 51, (int)&v15, (int)v13, 0.8, 6, 0, 0, 0);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "Follow GID:", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 88.0, 0.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
IDNameInput::create((int)this, (int)this + 440, 1, 71, (int)&v15, (int)v13, 0.8, 6, 0, 0, 0);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "P1", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 18.0, -56.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
SetupTriggerPopup::createToggleValueControl((int)this, 138, (int)&v15, (const cocos2d::CCPoint *)v13, 0, 0, 0, 1.0);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "P2", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 78.0, -56.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
SetupTriggerPopup::createToggleValueControl((int)this, 200, (int)&v15, (const cocos2d::CCPoint *)v13, 0, 0, 0, 1.0);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "C", 1u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 138.0, -56.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
SetupTriggerPopup::createToggleValueControl((int)this, 201, (int)&v15, (const cocos2d::CCPoint *)v13, 0, 0, 0, 1.0);
std::string::~string((int)&v15);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, "Target\nControl ID", 0x11u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, -120.0, -56.0);
cocos2d::CCPoint::operator+(v13, v11, v12);
SetupTriggerPopup::createToggleValueControl((int)this, 535, (int)&v15, (const cocos2d::CCPoint *)v13, 0, 2u, 0, 1.0);
std::string::~string((int)&v15);
SetupTriggerPopup::postSetup(this);
}
return v4;
}