//
// SetupSFXEditPopup::init from 0x6b0bd0 to 0x6b12fe (1838 bytes)
//
// 1 xrefs:
// > SetupSFXEditPopup::create @ 0x6b1380
//
// 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:39 +0000
//
GameManager *__fastcall SetupSFXEditPopup::init(
SetupSFXEditPopup *this,
SFXTriggerGameObject *a2,
cocos2d::CCArray *a3,
int a4)
{
char *v4; // r7
const char *v7; // r6
size_t v8; // r0
char *v9; // r1
size_t v10; // r0
cocos2d::CCDirector *MultiTriggerItemsDefault; // r0
GameManager *v13; // [sp+38h] [bp-E4h]
float v14; // [sp+44h] [bp-D8h] BYREF
float v15; // [sp+48h] [bp-D4h]
_BYTE v16[8]; // [sp+4Ch] [bp-D0h] BYREF
_BYTE v17[8]; // [sp+54h] [bp-C8h] BYREF
_BYTE v18[8]; // [sp+5Ch] [bp-C0h] BYREF
_BYTE v19[8]; // [sp+64h] [bp-B8h] BYREF
int v20[2]; // [sp+6Ch] [bp-B0h] BYREF
char *v21; // [sp+74h] [bp-A8h]
int v22[3]; // [sp+78h] [bp-A4h] BYREF
int v23[3]; // [sp+84h] [bp-98h] BYREF
int v24[3]; // [sp+90h] [bp-8Ch] BYREF
int v25[3]; // [sp+9Ch] [bp-80h] BYREF
int v26[3]; // [sp+A8h] [bp-74h] BYREF
int v27[3]; // [sp+B4h] [bp-68h] BYREF
int v28[3]; // [sp+C0h] [bp-5Ch] BYREF
int v29[3]; // [sp+CCh] [bp-50h] BYREF
int v30[3]; // [sp+D8h] [bp-44h] BYREF
int v31[3]; // [sp+E4h] [bp-38h] BYREF
int v32[3]; // [sp+F0h] [bp-2Ch] BYREF
int v33[3]; // [sp+FCh] [bp-20h] BYREF
int v34; // [sp+108h] [bp-14h] BYREF
int v35; // [sp+10Ch] [bp-10h]
int v36; // [sp+110h] [bp-Ch]
v13 = SetupTriggerPopup::init(this, a2, a3, 380.0, 280.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v13 )
{
SetupTriggerPopup::preSetup(this);
if ( a4 )
v7 = "Edit Song Trigger";
else
v7 = "Edit SFX Trigger";
v34 = 0;
v35 = 0;
v36 = 0;
v8 = strlen(v7);
std::string::__init(&v34, v7, v8);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v34);
std::string::~string((int)&v34);
v34 = 0;
v35 = 0;
v36 = 0;
std::string::__init(&v34, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v34);
std::string::~string((int)&v34);
v20[0] = 0;
v20[1] = 0;
v21 = nullptr;
if ( a4 )
v9 = "Lets you edit the properties of a song in a specified Channel.\n"
"Page 2 lets you change the volume depending on proximity.\n"
"Group ID 1 is the target that volume is calculated around. Use the arrow buttons to define which dire"
"ction it works in.\n"
"By default, the player changes the volume depending on how close they are to this group. You can also use Group ID 2 on an object to make this object control volume.";
else
v9 = "Lets you edit the properties of a sound effect. Use Group ID, SFXGroup, or Unique"
" ID to refer to the correct one.\n"
"Page 2 lets you change the volume depending on proximity.\n"
"Group ID 1 is the target that volume is calculated around. Use the arrow buttons to define which dire"
"ction it works in.\n"
"By default, the player changes the volume depending on how close they are to this group. You can also use Group ID 2 on an object to make this object control volume.";
std::string::assign(v20, v9);
memset(v22, 0, sizeof(v22));
std::string::__init(v22, "Help", 4u);
if ( (v20[0] & 1) == 0 )
v4 = (char *)v20 + 1;
v23[0] = 0;
if ( (v20[0] & 1) != 0 )
v4 = v21;
v23[1] = 0;
v23[2] = 0;
v10 = strlen(v4);
std::string::__init(v23, v4, v10);
SetupTriggerPopup::addHelpButton((int)this, (int)v22, (int)v23, 1065353216);
std::string::~string((int)v23);
std::string::~string((int)v22);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
*((_BYTE *)this + 652) = 1;
cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, v14 * 0.5, v15 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v14 * 0.5, (float)(v15 * 0.5) + 35.0);
if ( a4 )
{
memset(v27, 0, sizeof(v27));
std::string::__init(v27, "Channel:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 80.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
432,
(unsigned __int8 *)v27,
(int)v19,
1059481190,
1,
3,
10,
1,
0,
1082130432,
0,
0,
0,
2,
0);
std::string::~string((int)v27);
SetupTriggerPopup::toggleLimitValue((int **)this, 432, 1);
}
else
{
memset(v24, 0, sizeof(v24));
std::string::__init(v24, "Group ID:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, -110.0, 80.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
IDNameInput::create((int)this, (int)this + 440, 1, 457, (int)v24, (int)v19, 0.65, 6, 0, 0, 0);
std::string::~string((int)v24);
memset(v25, 0, sizeof(v25));
std::string::__init(v25, "SFXGroup:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 80.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
455,
(unsigned __int8 *)v25,
(int)v19,
1059481190,
1,
2,
10,
1,
-1027080192,
1120403456,
0,
0,
0,
0,
0);
std::string::~string((int)v25);
memset(v26, 0, sizeof(v26));
std::string::__init(v26, "Unique ID:", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 110.0, 80.0);
cocos2d::CCPoint::operator+(v19, v16, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
416,
(unsigned __int8 *)v26,
(int)v19,
1059481190,
1,
3,
10,
1,
0,
1120403456,
0,
0,
0,
0,
0);
std::string::~string((int)v26);
}
memset(v28, 0, sizeof(v28));
std::string::__init(v28, "Duration:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, -84.5, -0.0);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
10,
(unsigned __int8 *)v28,
(int)v19,
1059481190,
0,
1,
6,
0,
0,
0x40000000,
0,
0,
1,
2,
0);
std::string::~string((int)v28);
memset(v29, 0, sizeof(v29));
std::string::__init(v29, "Speed:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, -84.5, -35.75);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
404,
(unsigned __int8 *)v29,
(int)v19,
1059481190,
0,
2,
6,
0,
-1052770304,
1094713344,
0,
0,
1,
2,
0);
std::string::~string((int)v29);
memset(v30, 0, sizeof(v30));
std::string::__init(v30, "Volume:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, -84.5, -71.5);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
406,
(unsigned __int8 *)v30,
(int)v19,
1059481190,
0,
1,
6,
0,
0,
0x40000000,
0,
0,
1,
2,
0);
std::string::~string((int)v30);
memset(v31, 0, sizeof(v31));
std::string::__init(v31, "Stop", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 34.5, -0.0);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 417, (int)v31, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)v31);
memset(v32, 0, sizeof(v32));
std::string::__init(v32, "Stop\nLoop", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 114.5, -0.0);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 414, (int)v32, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)v32);
memset(v33, 0, sizeof(v33));
std::string::__init(v33, "Change Speed", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 34.5, -35.75);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 419, (int)v33, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)v33);
v34 = 0;
v35 = 0;
v36 = 0;
std::string::__init(&v34, "Change Volume", 0xDu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 34.5, -71.5);
cocos2d::CCPoint::operator+(v19, v17, v18);
SetupTriggerPopup::createToggleValueControl((int)this, 418, (int)&v34, (const cocos2d::CCPoint *)v19, 0, 0, 0, 1.0);
std::string::~string((int)&v34);
SetupTriggerPopup::toggleLimitValue((int **)this, 404, 1);
SetupTriggerPopup::toggleLimitValue((int **)this, 406, 1);
SetupAudioTriggerPopup::addProxVolControls((cocos2d::CCArray **)this, 1u);
SetupTriggerPopup::createPageButtons(this, (float)(*((float *)this + 139) * 0.5) + 15.0, 1u);
SetupTriggerPopup::goToPage((cocos2d::CCArray **)this, nullptr, 0);
SetupTriggerPopup::postSetup(this);
std::string::~string((int)v20);
}
return v13;
}