//
// SetupBGSpeedTrigger::init from 0x563998 to 0x563bd4 (572 bytes)
//
// 1 xrefs:
// > SetupBGSpeedTrigger::create @ 0x563c8a
//
// 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 SetupBGSpeedTrigger::init(SetupBGSpeedTrigger *a1, EffectGameObject *a2, cocos2d::CCArray *a3, int a4)
{
cocos2d::CCDirector *v6; // r0
char *v7; // r1
char *v8; // r1
_BOOL4 v10; // [sp+30h] [bp-4Ch]
_BYTE v11[4]; // [sp+3Ch] [bp-40h] BYREF
_BYTE v12[4]; // [sp+40h] [bp-3Ch] BYREF
ButtonSprite *v13; // [sp+44h] [bp-38h] BYREF
char *v14; // [sp+48h] [bp-34h] BYREF
_BYTE v15[4]; // [sp+4Ch] [bp-30h] BYREF
_BYTE v16[4]; // [sp+50h] [bp-2Ch] BYREF
cocos2d::CCSize v17; // [sp+54h] [bp-28h] BYREF
cocos2d::CCPoint v18; // [sp+5Ch] [bp-20h] BYREF
cocos2d::CCPoint v19; // [sp+64h] [bp-18h] BYREF
cocos2d::CCPoint v20; // [sp+6Ch] [bp-10h] BYREF
v10 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1);
if ( v10 )
{
SetupTriggerPopup::preSetup(a1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v17, v6);
if ( a4 == 3612 )
v7 = "Change MG Speed";
else
v7 = "Change BG Speed";
sub_776584((int)v11, v7);
sub_775C20(v12);
SetupTriggerPopup::addTitle((int)a1);
sub_774008(v12);
sub_776584((int)&v13, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, &v13);
sub_774008(&v13);
v14 = (char *)&unk_ACDDA8;
if ( a4 == 3612 )
v8 = "Lets you change the speed of the middle ground during gameplay movement. Default X: 0.3, Y: 0.5";
else
v8 = "Lets you change the speed of the background during gameplay movement. Default X: 0.1, Y: 0.1";
sub_7753D4((int)&v14, v8);
sub_776584((int)&v19, "Help");
sub_776584((int)&v20, v14);
SetupTriggerPopup::addHelpButton((int)a1, (int)&v19, (int)&v20, 1065353216);
sub_774008(&v20);
sub_774008(&v19);
cocos2d::CCPoint::CCPoint(&v18, v17.width * 0.5, v17.height * 0.5);
sub_776584((int)v15, "Mod X:");
cocos2d::CCPoint::CCPoint(&v19, 0.0, 60.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
143,
(int)v15,
&v20,
(cocos2d::CCZone *)0x3F4CCCCD,
0,
Float,
10,
0,
nullptr,
1.0,
0,
0,
0,
2,
0);
sub_774008(v15);
sub_776584((int)v16, "Mod Y:");
cocos2d::CCPoint::CCPoint(&v19, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v20, &v18, &v19);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
144,
(int)v16,
&v20,
(cocos2d::CCZone *)0x3F4CCCCD,
0,
Float,
10,
0,
nullptr,
1.0,
0,
0,
0,
2,
0);
sub_774008(v16);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
SetupTriggerPopup::postSetup(a1);
sub_774008(&v14);
sub_774008(v11);
}
return v10;
}