//
// SetupAudioLineGuidePopup::init from 0xb79df4 to 0xb7a444 (1616 bytes)
//
// 2 xrefs:
// > SetupAudioLineGuidePopup::create @ 0xb7a69c
// > ??> @ 0x85690
//
// 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:24 +0000
//
__int64 __fastcall SetupAudioLineGuidePopup::init(
SetupAudioLineGuidePopup *this,
AudioLineGuideGameObject *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; // x25
float v16; // s0
cocos2d::CCSprite *v17; // x0
__int64 v18; // x0
char v19; // w1
__int64 v20; // x26
cocos2d::CCNode *v21; // x27
__int64 v22; // x0
__int64 (__fastcall *v23)(__int64); // x1
void (__fastcall *v24)(__int64, __int64 *); // x25
__int64 v25; // x28
__int64 v26; // [xsp+B8h] [xbp+88h] BYREF
_BYTE v27[8]; // [xsp+C0h] [xbp+90h] BYREF
_BYTE v28[8]; // [xsp+C8h] [xbp+98h] BYREF
_BYTE v29[8]; // [xsp+D0h] [xbp+A0h] BYREF
__int64 v30; // [xsp+D8h] [xbp+A8h] BYREF
__int64 v31; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCDirector *v32[2]; // [xsp+E8h] [xbp+B8h] BYREF
void *v33; // [xsp+F8h] [xbp+C8h]
char *v34; // [xsp+100h] [xbp+D0h] BYREF
__int64 v35; // [xsp+108h] [xbp+D8h]
void *v36; // [xsp+110h] [xbp+E0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 340.0, 250.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v34 = nullptr;
*((_BYTE *)this + 904) = 1;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "BPM Guide", 9u);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v34);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v34, v7, v8, v9, v10, v11);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v32[0] = nullptr;
v32[1] = nullptr;
v33 = nullptr;
std::string::__init((__int64 *)v32, "Help", 4u);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init(
(__int64 *)&v34,
"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((__int64)this, (char *)v32, (char *)&v34, 1.0);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v12 = (cocos2d::CCDirector *)LOBYTE(v32[0]);
if ( ((__int64)v32[0] & 1) != 0 )
operator delete(v33);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(&v26, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, *(float *)&v26 * 0.5, *((float *)&v26 + 1) * 0.5);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "BPM", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, -80.0, 60.0);
cocos2d::CCPoint::operator+(&v31, v27);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
498,
(char *)&v34,
(__int64)&v31,
0,
3,
10,
0,
0.8,
1.0,
200.0,
0,
0,
0,
0,
0);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "BPB", 3u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 80.0, 60.0);
cocos2d::CCPoint::operator+(&v31, v27);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
501,
(char *)&v34,
(__int64)&v31,
0,
3,
10,
0,
0.8,
1.0,
10.0,
0,
0,
0,
0,
0);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "Duration", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v30, 0.0, -10.0);
cocos2d::CCPoint::operator+(&v31, v27);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
10,
(char *)&v34,
(__int64)&v31,
0,
3,
10,
0,
0.8,
1.0,
120.0,
0,
0,
0,
0,
0);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
v34 = nullptr;
v35 = 0;
v36 = nullptr;
std::string::__init((__int64 *)&v34, "Disable", 7u);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v31,
(float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v26 * 0.5)) - 35.0,
25.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v26 + 1) * 0.5)));
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x1F4u,
&v34,
(const cocos2d::CCPoint *)&v31,
1,
0,
0,
1.0);
if ( ((unsigned __int8)v34 & 1) != 0 )
operator delete(v36);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v28,
40.0 - (float)((float)(*((float *)this + 183) * 0.5) - (float)(*(float *)&v26 * 0.5)),
70.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v26 + 1) * 0.5)));
v15 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Speed:", "goldFont.fnt", v14);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, 0.5);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 73) + 456LL))(*((_QWORD *)this + 73), v15);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v15 + 184LL))(v15, v28);
v16 = (*(float (__fastcall **)(SetupAudioLineGuidePopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 499);
SelectSettingLayer::frameForValue(2u, (int)v16, (__int64 *)&v34);
v17 = (cocos2d::CCSprite *)((char *)&v34 + 1);
if ( ((unsigned __int8)v34 & 1) != 0 )
v17 = (cocos2d::CCSprite *)v36;
v18 = cocos2d::CCSprite::createWithSpriteFrameName(v17, (const char *)(unsigned __int8)v34);
v19 = (char)v34;
*((_QWORD *)this + 128) = v18;
if ( (v19 & 1) != 0 )
{
operator delete(v36);
v18 = *((_QWORD *)this + 128);
}
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL))(v18, 0.6);
v20 = CCMenuItemSpriteExtra::create(
*((_QWORD *)this + 128),
0,
(__int64)this,
(__int64)SetupAudioLineGuidePopup::onSpeed,
0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v20);
v21 = *((cocos2d::CCNode **)this + 69);
v22 = v15;
v23 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 192LL);
v24 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v20 + 184LL);
v25 = v23(v22);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, 0.0, -34.0);
cocos2d::CCPoint::operator+(&v30, v25);
cocos2d::CCNode::convertToNodeSpace(&v31, v21, (const cocos2d::CCPoint *)&v30);
v24(v20, &v31);
SetupTriggerPopup::postSetup(this);
}
return v5;
}