//
// SetupAudioLineGuidePopup::init from 0x6b7518 to 0x6b79a0 (1160 bytes)
//
// 1 xrefs:
// > SetupAudioLineGuidePopup::create @ 0x6b7a2c
//
// 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:43 +0000
//
GameManager *__fastcall SetupAudioLineGuidePopup::init(
SetupAudioLineGuidePopup *this,
AudioLineGuideGameObject *a2,
cocos2d::CCArray *a3)
{
GameManager *v4; // r9
cocos2d::CCDirector *v5; // r0
const char *v6; // r2
int v7; // r7
float v8; // r0
const char *v9; // r1
cocos2d::CCSprite *v10; // r0
int v11; // r0
int v12; // r4
int v13; // r11
void (__fastcall *v15)(int, _BYTE *); // [sp+30h] [bp-64h]
cocos2d::CCPoint *v16; // [sp+34h] [bp-60h]
float v17; // [sp+3Ch] [bp-58h] BYREF
float v18; // [sp+40h] [bp-54h]
_BYTE v19[8]; // [sp+44h] [bp-50h] BYREF
_BYTE v20[8]; // [sp+4Ch] [bp-48h] BYREF
_BYTE v21[8]; // [sp+54h] [bp-40h] BYREF
_BYTE v22[8]; // [sp+5Ch] [bp-38h] BYREF
_BYTE v23[8]; // [sp+64h] [bp-30h] BYREF
_DWORD v24[2]; // [sp+6Ch] [bp-28h] BYREF
int v25[3]; // [sp+74h] [bp-20h] BYREF
int v26; // [sp+80h] [bp-14h] BYREF
int v27; // [sp+84h] [bp-10h]
cocos2d::CCSprite *v28; // [sp+88h] [bp-Ch]
v4 = SetupTriggerPopup::init(this, a2, a3, 340.0, 250.0, (_BYTE *)&dword_0 + 1, 0.0);
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
*((_BYTE *)this + 652) = 1;
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "BPM Guide", 9u);
SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v26);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = nullptr;
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 = nullptr;
std::string::__init(
&v26,
"Creates lines in the editor to help synchronize to music.\n"
"BPM is beats per minute. The position is based on speed.\n"
"BPB is beats per bar. This adds more lines to each beat.",
0xC3u);
SetupTriggerPopup::addHelpButton((int)this, (int)v25, (int)&v26, 1065353216);
std::string::~string((int)&v26);
v5 = (cocos2d::CCDirector *)std::string::~string((int)v25);
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v17 * 0.5, v18 * 0.5);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "BPM", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -80.0, 60.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
498,
(unsigned __int8 *)&v26,
(int)v24,
1061997773,
0,
3,
10,
0,
COERCE_INT(1.0),
1128792064,
0,
0,
0,
0,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "BPB", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 80.0, 60.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
501,
(unsigned __int8 *)&v26,
(int)v24,
1061997773,
0,
3,
10,
0,
COERCE_INT(1.0),
1092616192,
0,
0,
0,
0,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Duration", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 0.0, -10.0);
cocos2d::CCPoint::operator+(v24, v19, v23);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCDictionary **)this,
10,
(unsigned __int8 *)&v26,
(int)v24,
1061997773,
0,
3,
10,
0,
COERCE_INT(1.0),
1123024896,
0,
0,
0,
0,
0);
std::string::~string((int)&v26);
v26 = 0;
v27 = 0;
v28 = nullptr;
std::string::__init(&v26, "Disable", 7u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v24,
(float)((float)(*((float *)this + 139) * 0.5) + (float)(v17 * 0.5)) - 35.0,
(float)((float)(v18 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 25.0);
SetupTriggerPopup::createToggleValueControl((int)this, 500, (int)&v26, (const cocos2d::CCPoint *)v24, 1, 0, 0, 1.0);
std::string::~string((int)&v26);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v20,
(float)((float)(v17 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 40.0,
(float)((float)(v18 * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 70.0);
v7 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Speed:", "goldFont.fnt", v6);
(*(void (__fastcall **)(int, float))(*(_DWORD *)v7 + 80))(v7, 0.5);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v7);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v7 + 92))(v7, v20);
v8 = (*(float (__fastcall **)(SetupAudioLineGuidePopup *, int))(*(_DWORD *)this + 732))(this, 499);
SelectSettingLayer::frameForValue(&v26, 2u, (int)v8);
if ( (v26 & 1) != 0 )
v10 = v28;
else
v10 = (cocos2d::CCSprite *)((char *)&v26 + 1);
*((_DWORD *)this + 179) = cocos2d::CCSprite::createWithSpriteFrameName(v10, v9);
std::string::~string((int)&v26);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 179) + 80))(*((_DWORD *)this + 179), 1058642330);
v11 = *((_DWORD *)this + 179);
v24[0] = SetupAudioLineGuidePopup::onSpeed;
v24[1] = 0;
v12 = CCMenuItemSpriteExtra::create(v11, 0, (int)this, (int)SetupAudioLineGuidePopup::onSpeed, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v12);
v15 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v12 + 92);
v16 = *((cocos2d::CCPoint **)this + 111);
v13 = (*(int (__fastcall **)(int))(*(_DWORD *)v7 + 96))(v7);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, 0.0, -34.0);
cocos2d::CCPoint::operator+(v22, v13, v21);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v23, v16);
v15(v12, v23);
SetupTriggerPopup::postSetup(this);
}
return v4;
}