//
// SetupAdvFollowEditPhysicsPopup::init from 0x5617cc to 0x561e94 (1736 bytes)
//
// 1 xrefs:
// > SetupAdvFollowEditPhysicsPopup::create @ 0x561f56
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool SetupAdvFollowEditPhysicsPopup::init(
SetupAdvFollowEditPhysicsPopup *a1,
AdvancedFollowEditObject *a2,
cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
_BYTE v7[4]; // [sp+40h] [bp-34h] BYREF
cocos2d::CCSize v8; // [sp+44h] [bp-30h] BYREF
cocos2d::CCPoint v9; // [sp+4Ch] [bp-28h] BYREF
_BYTE v10[8]; // [sp+54h] [bp-20h] BYREF
cocos2d::CCPoint v11; // [sp+5Ch] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+64h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 440.0, 310.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v12, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v12);
sub_774008(&v12);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
sub_776584((int)&v12, "Edit AdvFollow Object");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v12);
sub_776584((int)&v11, "Help");
sub_776584(
(int)&v12,
"Lets you change the attributes of an active Advanced Follow trigger.\n"
"Target GID is the objects that follow.\n"
"X and Y Only limit change to one axis.\n"
"Mod X and Y modify movement on their axis.\n"
"Speed modifies the speed.\n"
"Dir modifies the direction.\n"
"View the editor guide for more details.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v11, (int)&v12, 1065353216);
sub_774008(&v12);
sub_774008(&v11);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v8, v5);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, (float)(v8.height * 0.5) + 110.0);
cocos2d::CCPoint::CCPoint(&v12, 0.0, -30.0);
cocos2d::CCPoint::operator+(v10, &v9, &v12);
sub_776584((int)v7, "Target GID:");
cocos2d::CCPoint::CCPoint(&v11, -88.0, -0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F4CCCCD,
1,
Int,
6,
1,
nullptr,
1.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "X\nOnly");
cocos2d::CCPoint::CCPoint(&v11, 15.0, -0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 306, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Y\nOnly");
cocos2d::CCPoint::CCPoint(&v11, 100.0, -0.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 307, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Mod X:");
cocos2d::CCPoint::CCPoint(&v11, -72.0, -70.2);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
566,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "+-");
cocos2d::CCPoint::CCPoint(&v11, 72.0, -70.2);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
567,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Mod Y:");
cocos2d::CCPoint::CCPoint(&v11, -72.0, -93.6);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
568,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "+-");
cocos2d::CCPoint::CCPoint(&v11, 72.0, -93.6);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
569,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
(cocos2d::CCFloat *)0xBF800000,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Speed:");
cocos2d::CCPoint::CCPoint(&v11, -72.0, -117.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
300,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "+-");
cocos2d::CCPoint::CCPoint(&v11, 72.0, -117.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
301,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Float,
6,
0,
nullptr,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, (char *)&unk_939830);
cocos2d::CCPoint::CCPoint(&v11, 202.0, -117.0);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
560,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
1,
Int,
6,
0,
nullptr,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Dir:");
cocos2d::CCPoint::CCPoint(&v11, -72.0, -140.4);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
563,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
(cocos2d::CCFloat *)0xC3340000,
180.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "+-");
cocos2d::CCPoint::CCPoint(&v11, 72.0, -140.4);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
564,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
0,
Int,
6,
0,
nullptr,
360.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, (char *)&unk_939830);
cocos2d::CCPoint::CCPoint(&v11, 202.0, -140.4);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
565,
(int)v7,
&v12,
(cocos2d::CCZone *)0x3F19999A,
1,
Int,
6,
0,
nullptr,
1.0,
1,
0,
1,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Target\nControl ID");
cocos2d::CCPoint::CCPoint(&v11, -90.0, -163.8);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 535, (int)v7, &v12, 0, 2, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Redirect\nDir");
cocos2d::CCPoint::CCPoint(&v11, 60.0, -163.8);
cocos2d::CCPoint::operator+(&v12, &v9, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 570, (int)v7, &v12, 0, 2, 0, 1.0);
sub_774008(v7);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}