//
// SetupBGSpeedTrigger::init from 0xb4f444 to 0xb4f90c (1224 bytes)
//
// 2 xrefs:
// > SetupBGSpeedTrigger::create @ 0xb4fb3c
// > ??> @ 0x6cca0
//
// 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:01:58 +0000
//
__int64 __fastcall SetupBGSpeedTrigger::init(
SetupBGSpeedTrigger *this,
EffectGameObject *a2,
cocos2d::CCArray *a3,
int a4)
{
unsigned __int8 v6; // w0
unsigned int v7; // w22
cocos2d::CCDirector *v9; // x0
cocos2d::CCDirector *v10; // x0
char *v11; // x1
__int64 v12; // x2
__int64 v13; // x3
__int64 v14; // x4
__int64 v15; // x5
const char *v16; // x6
const char *v17; // x1
size_t v18; // x0
char *v19; // [xsp+88h] [xbp+58h]
__int64 v20; // [xsp+90h] [xbp+60h] BYREF
_BYTE v21[8]; // [xsp+98h] [xbp+68h] BYREF
_BYTE v22[8]; // [xsp+A0h] [xbp+70h] BYREF
__int64 v23; // [xsp+A8h] [xbp+78h] BYREF
__int64 v24; // [xsp+B0h] [xbp+80h] BYREF
size_t v25; // [xsp+B8h] [xbp+88h]
void *v26; // [xsp+C0h] [xbp+90h]
__int64 v27; // [xsp+C8h] [xbp+98h] BYREF
size_t v28; // [xsp+D0h] [xbp+A0h]
void *v29; // [xsp+D8h] [xbp+A8h]
__int64 v30; // [xsp+E0h] [xbp+B0h] BYREF
__int64 v31; // [xsp+E8h] [xbp+B8h]
void *v32; // [xsp+F0h] [xbp+C0h]
__int64 v33[2]; // [xsp+F8h] [xbp+C8h] BYREF
void *v34; // [xsp+108h] [xbp+D8h]
__int64 v35[2]; // [xsp+110h] [xbp+E0h] BYREF
void *v36; // [xsp+120h] [xbp+F0h]
__int64 v37[2]; // [xsp+128h] [xbp+F8h] BYREF
void *v38; // [xsp+138h] [xbp+108h]
__int64 v39[2]; // [xsp+140h] [xbp+110h] BYREF
void *v40; // [xsp+150h] [xbp+120h]
v6 = SetupTriggerPopup::init(this, a2, a3, 300.0, 240.0, 1u, 0.0);
v7 = v6;
if ( !v6 )
return v7;
v9 = (cocos2d::CCDirector *)SetupTriggerPopup::preSetup(this);
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(&v20, v10);
if ( a4 == 3612 )
v11 = "Change MG Speed";
else
v11 = "Change BG Speed";
v24 = 0;
v25 = 0;
v26 = nullptr;
std::string::__init(&v24, v11, 0xFu);
v27 = 0;
v28 = 0;
v29 = nullptr;
if ( (v24 & 1) != 0 )
{
std::string::__init(&v27, v26, v25);
}
else
{
v29 = v26;
v27 = v24;
v28 = v25;
}
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v27);
if ( (v27 & 1) != 0 )
operator delete(v29);
v30 = 0;
v31 = 0;
v32 = nullptr;
std::string::__init(&v30, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v30, v12, v13, v14, v15, v16);
if ( (v30 & 1) != 0 )
{
operator delete(v32);
v30 = 0;
v31 = 0;
v32 = nullptr;
if ( a4 != 3612 )
goto LABEL_11;
LABEL_27:
std::string::assign(
&v30,
"Lets you change the speed of the middle ground during gameplay movement. Default X: 0.3, Y: 0.5");
goto LABEL_12;
}
v30 = 0;
v31 = 0;
v32 = nullptr;
if ( a4 == 3612 )
goto LABEL_27;
LABEL_11:
std::string::assign(
&v30,
"Lets you change the speed of the background during gameplay movement. Default X: 0.1, Y: 0.1");
LABEL_12:
v33[0] = 0;
v33[1] = 0;
v34 = nullptr;
std::string::__init(v33, "Help", 4u);
v17 = (char *)&v30 + 1;
if ( (v30 & 1) != 0 )
v17 = (const char *)v32;
v19 = (char *)v17;
v35[0] = 0;
v35[1] = 0;
v36 = nullptr;
v18 = strlen(v17);
std::string::__init(v35, v19, v18);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v33, (char *)v35, 1.0);
if ( (v35[0] & 1) != 0 )
operator delete(v36);
if ( (v33[0] & 1) != 0 )
operator delete(v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, *(float *)&v20 * 0.5, *((float *)&v20 + 1) * 0.5);
v37[0] = 0;
v37[1] = 0;
v38 = nullptr;
std::string::__init(v37, "Mod X:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, 0.0, 60.0);
cocos2d::CCPoint::operator+(&v23, v21);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
143,
(char *)v37,
(__int64)&v23,
0,
1,
10,
0,
0.8,
0.0,
1.0,
0,
0,
0,
2,
0);
if ( (v37[0] & 1) != 0 )
operator delete(v38);
v39[0] = 0;
v39[1] = 0;
v40 = nullptr;
std::string::__init(v39, "Mod Y:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v23, v21);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
144,
(char *)v39,
(__int64)&v23,
0,
1,
10,
0,
0.8,
0.0,
1.0,
0,
0,
0,
2,
0);
if ( (v39[0] & 1) != 0 )
operator delete(v40);
SetupTriggerPopup::createMultiTriggerItemsDefault(this);
SetupTriggerPopup::postSetup(this);
if ( (v30 & 1) != 0 )
operator delete(v32);
if ( (v24 & 1) != 0 )
operator delete(v26);
return v7;
}