//
// SetupReverbPopup::init from 0xb6cb9c to 0xb6d154 (1464 bytes)
//
// 2 xrefs:
// > SetupReverbPopup::create @ 0xb6d38c
// > ??> @ 0xa7f68
//
// 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:02:18 +0000
//
__int64 __fastcall SetupReverbPopup::init(cocos2d::CCNode **this, SFXTriggerGameObject *a2, cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *v12; // x0
cocos2d::CCDirector *v13; // x0
const char *v14; // x2
__int64 v15; // x0
__int64 v16; // x25
void (__fastcall *v17)(__int64, __int64 *); // x27
const char *v18; // x1
cocos2d::CCSprite *v19; // x25
__int64 v20; // x25
const char *v21; // x1
__int64 v22; // x25
__int64 v23; // x25
cocos2d::CCNode *v24; // x28
void (__fastcall *v25)(__int64, __int64 *); // x27
const char *v26; // x1
__int64 v27; // x25
__int64 v28; // x25
cocos2d::CCNode *v29; // x28
void (__fastcall *v30)(__int64, __int64 *); // x27
cocos2d::CCNode *v31; // [xsp+78h] [xbp+78h]
void (__fastcall *v32)(__int64, __int64 *); // [xsp+80h] [xbp+80h]
__int64 v33; // [xsp+88h] [xbp+88h]
__int64 v34; // [xsp+88h] [xbp+88h]
__int64 v35; // [xsp+90h] [xbp+90h] BYREF
_BYTE v36[8]; // [xsp+98h] [xbp+98h] BYREF
_BYTE v37[8]; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v38; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v39; // [xsp+B0h] [xbp+B0h] BYREF
cocos2d::CCDirector *v40[2]; // [xsp+B8h] [xbp+B8h] BYREF
void *v41; // [xsp+C8h] [xbp+C8h]
__int64 v42; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v43; // [xsp+D8h] [xbp+D8h]
void *v44; // [xsp+E0h] [xbp+E0h]
v4 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 320.0, 140.0, 2u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup((SetupTriggerPopup *)this);
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(&v42, "Edit Global Reverb", 0x12u);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v42);
if ( (v42 & 1) != 0 )
operator delete(v44);
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(&v42, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v42, v7, v8, v9, v10, v11);
if ( (v42 & 1) != 0 )
operator delete(v44);
v40[0] = nullptr;
v40[1] = nullptr;
v41 = nullptr;
std::string::__init((__int64 *)v40, "Help", 4u);
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(
&v42,
"Lets you change the Reverb settings.\n"
"The sound engine has one global reverb channel. This means that two sounds with different reverb settings cannot b"
"e played simultaneously.",
0xB7u);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v40, (char *)&v42, 1.0);
if ( (v42 & 1) != 0 )
operator delete(v44);
v12 = (cocos2d::CCDirector *)LOBYTE(v40[0]);
if ( ((__int64)v40[0] & 1) != 0 )
operator delete(v41);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(&v35, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, *(float *)&v35 * 0.5, *((float *)&v35 + 1) * 0.5);
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(&v42, "Enable", 6u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v38,
(float)(*((float *)this + 183) * 0.5) + -78.0,
24.0 - (float)(*((float *)this + 184) * 0.5));
cocos2d::CCPoint::operator+(&v39, v36);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x1F7u,
&v42,
(const cocos2d::CCPoint *)&v39,
0,
0,
0,
1.0);
if ( (v42 & 1) != 0 )
operator delete(v44);
v15 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Reverb", "goldFont.fnt", v14);
*(this + 127) = (cocos2d::CCNode *)v15;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v15, 1);
v16 = (__int64)*(this + 127);
v17 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, 0.0, 5.0);
cocos2d::CCPoint::operator+(&v39, v36);
v17(v16, &v39);
v19 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v18);
cocos2d::CCSprite::setFlipX(v19, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v19 + 160LL))(v19, 0.8);
v20 = CCMenuItemSpriteExtra::create((__int64)v19, 0, (__int64)this, (__int64)SetupReverbPopup::onReverb, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v20);
v32 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 184LL);
v31 = *(this + 69);
v33 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 127) + 192LL))(*(this + 127));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, 100.0, 0.0);
cocos2d::CCPoint::operator+(&v38, v33);
cocos2d::CCNode::convertToNodeSpace(&v39, v31, (const cocos2d::CCPoint *)&v38);
v32(v20, &v39);
CCMenuItemSpriteExtra::setSizeMult(v20, 1.4);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 72LL))(v20, 1);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v21);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 160LL))(v22, 0.8);
v23 = CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, (__int64)SetupReverbPopup::onReverb, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v23);
v24 = *(this + 69);
v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v23 + 184LL);
v34 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 127) + 192LL))(*(this + 127));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v37, -100.0, 0.0);
cocos2d::CCPoint::operator+(&v38, v34);
cocos2d::CCNode::convertToNodeSpace(&v39, v24, (const cocos2d::CCPoint *)&v38);
v25(v23, &v39);
CCMenuItemSpriteExtra::setSizeMult(v23, 1.4);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v23 + 72LL))(v23, 0);
SetupReverbPopup::updateReverbLabel((SetupReverbPopup *)this);
v27 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_playMusicBtn_001.png", v26);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v27 + 160LL))(v27, 0.9);
v28 = CCMenuItemSpriteExtra::create(v27, 0, (__int64)this, (__int64)SetupReverbPopup::onPlay, 0);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v28);
v29 = *(this + 69);
v30 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v28 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v37,
(float)(*((float *)this + 183) * 0.5) + -24.0,
(float)(*((float *)this + 184) * 0.5) + -24.0);
cocos2d::CCPoint::operator+(&v38, v36);
cocos2d::CCNode::convertToNodeSpace(&v39, v29, (const cocos2d::CCPoint *)&v38);
v30(v28, &v39);
SetupTriggerPopup::postSetup((SetupTriggerPopup *)this);
}
return v5;
}