//
// EditorSoundConfigInfoLayer::downloadMissingSFX from 0x7886c4 to 0x788798 (212 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::startSFXDownload @ 0x7887e4
// > EditorSoundConfigInfoLayer::musicActionFinished @ 0x788bc0
//
// 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:59:34 +0000
//
char **__fastcall EditorSoundConfigInfoLayer::downloadMissingSFX(EditorSoundConfigInfoLayer *this)
{
unsigned int v2; // r4
MusicDownloadManager *i; // r0
unsigned int v4; // r1
int v5; // r0
cocos2d::CCString *v6; // r0
const char *CString; // r0
int v8; // r3
const char *v9; // r10
void (__fastcall *v10)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int); // r9
size_t v11; // r0
cocos2d::CCNode *v12; // r0
char *v14[3]; // [sp+8h] [bp-28h] BYREF
int v15[3]; // [sp+14h] [bp-1Ch] BYREF
int v16[3]; // [sp+20h] [bp-10h] BYREF
v2 = 0;
for ( i = EditorSoundConfigInfoLayer::missingSFXIDs((EditorSoundConfigInfoLayer *)v14, (int)this);
;
i = (MusicDownloadManager *)MusicDownloadManager::downloadSFX(v5, *(const char **)&v14[0][4 * v2++]) )
{
v4 = (v14[1] - v14[0]) >> 2;
if ( v2 >= v4 )
break;
v5 = MusicDownloadManager::sharedState(i);
}
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Downloading %i SFX",
(const char *)v4);
CString = (const char *)cocos2d::CCString::getCString(v6);
v8 = *(_DWORD *)this;
v9 = CString;
memset(v15, 0, sizeof(v15));
v10 = *(void (__fastcall **)(EditorSoundConfigInfoLayer *, cocos2d::CCNode *, int))(v8 + 232);
v11 = strlen(CString);
std::string::__init(v15, v9, v11);
memset(v16, 0, sizeof(v16));
std::string::__init(v16, &unk_B6B226, 0);
v12 = TextAlertPopup::create((int)v15, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v16);
v10(this, v12, 100);
std::string::~string((int)v16);
std::string::~string((int)v15);
return std::__vector_base::~__vector_base(v14);
}