//
// SetupSFXPopup::init from 0x6b177c to 0x6b22c2 (2886 bytes)
//
// 1 xrefs:
// > SetupSFXPopup::create @ 0x6b2380
//
// 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:40 +0000
//
GameManager *__fastcall SetupSFXPopup::init(
SetupSFXPopup *this,
SFXTriggerGameObject *a2,
cocos2d::CCArray *a3,
int a4)
{
cocos2d::CCDirector *MultiTriggerItemsDefault; // r0
int v7; // r2
const char *v8; // r1
int v9; // r6
int v10; // r7
const cocos2d::CCPoint *v11; // r10
void (__fastcall *v12)(int, _BYTE *); // r9
float v13; // r0
GameManager *v15; // [sp+34h] [bp-70h]
float v16; // [sp+44h] [bp-60h] BYREF
float v17; // [sp+48h] [bp-5Ch]
_BYTE v18[8]; // [sp+4Ch] [bp-58h] BYREF
_BYTE v19[8]; // [sp+54h] [bp-50h] BYREF
_BYTE v20[8]; // [sp+5Ch] [bp-48h] BYREF
_BYTE v21[8]; // [sp+64h] [bp-40h] BYREF
_BYTE v22[8]; // [sp+6Ch] [bp-38h] BYREF
_BYTE v23[8]; // [sp+74h] [bp-30h] BYREF
_DWORD v24[2]; // [sp+7Ch] [bp-28h] BYREF
int v25[3]; // [sp+84h] [bp-20h] BYREF
int v26; // [sp+90h] [bp-14h] BYREF
int v27; // [sp+94h] [bp-10h]
int v28; // [sp+98h] [bp-Ch]
v15 = SetupTriggerPopup::init(this, a2, a3, 380.0, 280.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v15 )
{
*((_DWORD *)this + 184) = a4;
SetupTriggerPopup::preSetup(this);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "SFX Trigger", 0xBu);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v26);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "OK", 2u);
SetupTriggerPopup::addCloseButton((int)this, (int)&v26);
std::string::~string((int)&v26);
memset(v25, 0, sizeof(v25));
std::string::__init(v25, "Help", 4u);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(
&v26,
"Lets you start a specified sound effect (browser top right).\n"
"Unique ID is used to refer to a specific sound effect in the level while SFXGroup refers to multip"
"le.\n"
"Start, End, FadeIn, and FadeOut are in milliseconds.\n"
"Ignore Volume Test does not ignore sound effects regardless of whether any volume setting is 0.\n"
"Page 4 lets you change the volume depending on proximity.",
0x199u);
SetupTriggerPopup::addHelpButton((int)this, (int)v25, (int)&v26, 1065353216);
std::string::~string((int)&v26);
MultiTriggerItemsDefault = (cocos2d::CCDirector *)std::string::~string((int)v25);
if ( (a4 & 1) == 0 )
MultiTriggerItemsDefault = (cocos2d::CCDirector *)SetupTriggerPopup::createMultiTriggerItemsDefault(this);
*((_BYTE *)this + 652) = !(a4 & 1);
cocos2d::CCDirector::sharedDirector(MultiTriggerItemsDefault);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v16);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, v16 * 0.5, v17 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v16 * 0.5, (float)(v17 * 0.5) + 10.0);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Speed:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -91.0, -0.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
404,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
2,
6,
0,
-1052770304,
1094713344,
0,
0,
1,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Pitch:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 91.0, -0.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
405,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
2,
6,
0,
-1052770304,
1094713344,
0,
0,
1,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Volume:", 7u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -91.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
406,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
1,
6,
0,
0,
0x40000000,
0,
0,
1,
2,
0);
std::string::~string((int)&v26);
SetupTriggerPopup::toggleLimitValue((int **)this, 404, 1);
SetupTriggerPopup::toggleLimitValue((int **)this, 405, 1);
SetupTriggerPopup::toggleLimitValue((int **)this, 406, 1);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Reverb", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 21.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createToggleValueControl((int)this, 407, (int)&v26, (const cocos2d::CCPoint *)v24, 0, 0, 0, 1.0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "FFT", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 127.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createToggleValueControl((int)this, 412, (int)&v26, (const cocos2d::CCPoint *)v24, 0, 0, 0, 1.0);
std::string::~string((int)&v26);
if ( (a4 & 1) == 0 )
{
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Loop", 4u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 21.0, -78.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
413,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
0,
0,
1.0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Pre\nload", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 127.0, -78.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
433,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
0,
0,
1.0);
std::string::~string((int)&v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 94.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "GJ_plus3Btn_001.png", 0x13u);
SetupTriggerPopup::createPlusButton((cocos2d::CCArray **)this, 2, (int)v24, 1058642330, &v26, 0, 0);
std::string::~string((int)&v26);
}
SetupAudioTriggerPopup::addTimeControls(this, 1, 10.0);
if ( (a4 & 1) != 0 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -91.0, -78.0);
cocos2d::CCPoint::operator+(v20, v19, v23);
}
else
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, -50.0, -40.0);
cocos2d::CCPoint::operator+(v20, v18, v24);
}
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "MinInterval:", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v24, (const cocos2d::CCPoint *)v20);
if ( (a4 & 1) != 0 )
v7 = 0;
else
v7 = 2;
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
434,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
1,
6,
0,
0,
1065353216,
v7,
0,
a4 & 1,
2,
0);
std::string::~string((int)&v26);
if ( (a4 & 1) == 0 )
{
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Unique ID:", 0xAu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -50.0, 60.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
416,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
1,
3,
10,
1,
0,
1120403456,
2,
0,
0,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "IsUnique", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 50.0, 60.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
415,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
2u,
0,
1.0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "SFXGroup:", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -50.0, 0.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
455,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
1,
2,
6,
1,
0,
1148846080,
2,
0,
0,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Override", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 50.0, 10.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
420,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
2u,
0,
1.0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Ignore\nVolume\nTest", 0x12u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 50.0, -40.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
489,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
2u,
0,
1.0);
std::string::~string((int)&v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 10.0, 83.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, &unk_B6B226, 0);
SetupTriggerPopup::createPlusButton((cocos2d::CCArray **)this, 0, (int)v24, 1061997773, &v26, 2u, 0);
std::string::~string((int)&v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 10.0, 23.0);
cocos2d::CCPoint::operator+(v24, v18, v23);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, &unk_B6B226, 0);
SetupTriggerPopup::createPlusButton((cocos2d::CCArray **)this, 1, (int)v24, 1061997773, &v26, 2u, 0);
std::string::~string((int)&v26);
SetupAudioTriggerPopup::addProxVolControls((cocos2d::CCArray **)this, 3u);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Speed +-", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -91.0, -0.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
596,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
2,
6,
0,
0,
1094713344,
4,
0,
1,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Pitch +-", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 91.0, -0.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
597,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
2,
6,
0,
0,
1094713344,
4,
0,
1,
2,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Volume +-", 9u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -91.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
598,
(unsigned __int8 *)&v26,
(int)v24,
1059481190,
0,
1,
6,
0,
0,
1065353216,
4,
0,
1,
2,
0);
std::string::~string((int)&v26);
SetupTriggerPopup::toggleLimitValue((int **)this, 596, 1);
SetupTriggerPopup::toggleLimitValue((int **)this, 597, 1);
SetupTriggerPopup::toggleLimitValue((int **)this, 598, 1);
v26 = 0;
v27 = 0;
v28 = 0;
std::string::__init(&v26, "Pitch\nSteps", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 21.0, -39.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createToggleValueControl(
(int)this,
599,
(int)&v26,
(const cocos2d::CCPoint *)v24,
0,
4u,
0,
1.0);
std::string::~string((int)&v26);
}
v9 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v8);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 80))(v9, 1057803469);
v24[0] = SetupSFXPopup::onBrowseSFX;
v24[1] = 0;
v10 = CCMenuItemSpriteExtra::create(v9, 0, (int)this, (int)SetupSFXPopup::onBrowseSFX, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v10);
v11 = *((const cocos2d::CCPoint **)this + 111);
v12 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v21,
(float)(*((float *)this + 139) * 0.5) - 22.0,
(float)(*((float *)this + 140) * 0.5) - 22.0);
cocos2d::CCPoint::operator+(v22, v18, v21);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v23, v11);
v12(v10, v23);
*((_DWORD *)this + 181) = (int)(*(float (__fastcall **)(SetupSFXPopup *, int))(*(_DWORD *)this + 732))(this, 392);
SetupSFXPopup::createSFXWidget(this);
SetupTriggerPopup::createPageButtons(this, (float)(*((float *)this + 139) * 0.5) + 15.0, 1u);
v13 = (*(float (__fastcall **)(SetupSFXPopup *, int))(*(_DWORD *)this + 732))(this, 427);
SetupTriggerPopup::goToPage((cocos2d::CCArray **)this, (cocos2d::CCArray *)(int)v13, 0);
SetupTriggerPopup::postSetup(this);
}
return v15;
}