//
// GJPFollowCommandLayer::init from 0xa7a85c to 0xa7ae54 (1528 bytes)
//
// 2 xrefs:
// > GJPFollowCommandLayer::create @ 0xa7b094
// > ??> @ 0xf2a10
//
// 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 13:00:28 +0000
//
__int64 __fastcall GJPFollowCommandLayer::init(GJPFollowCommandLayer *this, EffectGameObject *a2, cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w25
cocos2d::CCDirector *MultiTriggerItemsCorner; // x0
cocos2d::CCDirector *v8; // x0
int v9; // [xsp+8h] [xbp-28h]
int v10; // [xsp+20h] [xbp-10h]
int v11; // [xsp+20h] [xbp-10h]
int v12; // [xsp+20h] [xbp-10h]
int v13; // [xsp+20h] [xbp-10h]
__int64 v14; // [xsp+A8h] [xbp+78h] BYREF
_BYTE v15[8]; // [xsp+B0h] [xbp+80h] BYREF
_BYTE v16[8]; // [xsp+B8h] [xbp+88h] BYREF
__int64 v17; // [xsp+C0h] [xbp+90h] BYREF
__int64 v18[2]; // [xsp+C8h] [xbp+98h] BYREF
void *v19; // [xsp+D8h] [xbp+A8h]
__int64 v20; // [xsp+E0h] [xbp+B0h] BYREF
__int64 v21; // [xsp+E8h] [xbp+B8h]
void *v22; // [xsp+F0h] [xbp+C0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 430.0, 310.0, 1, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Setup Follow Player Command", 0x1Bu);
SetupTriggerPopup::addTitle(this, &v20);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "OK", 2u);
SetupTriggerPopup::addCloseButton(this, &v20);
if ( (v20 & 1) != 0 )
operator delete(v22);
v18[0] = 0;
v18[1] = 0;
v19 = nullptr;
std::string::__init(v18, "Help", 4u);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(
&v20,
"Make a group of objects follow the player's Y position.\n"
"Speed is how fast it snaps to the position. Leaving this at 1.0 makes it instantaneous.\n"
"Max Speed limits how fast the movement can be.",
0xD6u);
SetupTriggerPopup::addHelpButton(this, v18, &v20, 1.0);
if ( (v20 & 1) != 0 )
operator delete(v22);
if ( (v18[0] & 1) != 0 )
operator delete(v19);
MultiTriggerItemsCorner = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsCorner(this);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(MultiTriggerItemsCorner);
cocos2d::CCDirector::getWinSize(&v14, v8);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v15, *(float *)&v14 * 0.5, *((float *)&v14 + 1) * 0.5);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Speed:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, -110.0, 105.0);
cocos2d::CCPoint::operator+(&v17, v15);
SetupTriggerPopup::createValueControlAdvanced(this, 90, &v20, &v17, 0, 1, 10, 0, 0.8, 0.0, 1.0, 0, 0, 0, 3, 0);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Delay:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, 100.0, 105.0);
cocos2d::CCPoint::operator+(&v17, v15);
LOBYTE(v10) = 0;
SetupTriggerPopup::createValueControlAdvanced(this, 91, &v20, &v17, 0, 1, 10, 0, 0.8, 0.0, 1.0, 0, 0, 0, 2, v10);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Offset:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, -110.0, 35.0);
cocos2d::CCPoint::operator+(&v17, v15);
LOBYTE(v11) = 0;
SetupTriggerPopup::createValueControlAdvanced(
this,
92,
&v20,
&v17,
0,
2,
10,
0,
0.8,
-100.0,
100.0,
0,
0,
0,
0,
v11);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Max Speed:", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, 100.0, 35.0);
cocos2d::CCPoint::operator+(&v17, v15);
LOBYTE(v12) = 0;
SetupTriggerPopup::createValueControlAdvanced(this, 105, &v20, &v17, 0, 1, 10, 0, 0.8, 0.0, 100.0, 0, 0, 0, 1, v12);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Move Time:", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, -110.0, -35.0);
cocos2d::CCPoint::operator+(&v17, v15);
LOBYTE(v13) = 0;
SetupTriggerPopup::createValueControlAdvanced(this, 10, &v20, &v17, 0, 1, 10, 0, 0.8, 0.0, 10.0, 0, 0, 0, 2, v13);
if ( (v20 & 1) != 0 )
operator delete(v22);
v20 = 0;
v21 = 0;
v22 = nullptr;
std::string::__init(&v20, "Target Group ID", 0xFu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, 100.0, -50.0);
cocos2d::CCPoint::operator+(&v17, v15);
LOBYTE(v9) = 0;
IDNameInput::create(this, (char *)this + 544, 1, 51, &v20, &v17, 6, 0, 0.8, 0, v9);
if ( (v20 & 1) != 0 )
operator delete(v22);
SetupTriggerPopup::postSetup(this);
}
return v5;
}