//
// CustomSongWidget::updateError from 0x1400cd6b0 to 0x1400cd780 (208 bytes)
//
// 3 xrefs:
// > CustomSongWidget::loadSongInfoFailed @ 0x1400ccea6
// > CustomSongWidget::downloadSongFailed @ 0x1400cd01d
// > ??> @ 0x1406c8400
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void CustomSongWidget::updateError(CustomSongWidget *a1, GJSongError a2)
{
cocos2d::CCRGBAProtocol *v4; // rcx
cocos2d::CCLabelBMFont *m_errorLabel; // rcx
__int32 v6; // ebx
__int32 v7; // ebx
cocos2d::CCLabelProtocol *v8; // rcx
cocos2d::CCLabelProtocol_vtbl *v9; // rax
const char *v10; // rdx
float v11; // xmm2_4
float v12; // xmm1_4
__int16 v13; // [rsp+38h] [rbp+10h] BYREF
char v14; // [rsp+3Ah] [rbp+12h]
v13 = 13055;
v4 = &a1->m_errorLabel->cocos2d::CCRGBAProtocol;
v14 = 25;
v4->setColor(v4, (const cocos2d::ccColor3B *)&v13);
m_errorLabel = a1->m_errorLabel;
v6 = a2 - 1;
if ( v6 )
{
v7 = v6 - 1;
if ( v7 )
{
v8 = &m_errorLabel->cocos2d::CCLabelProtocol;
v9 = v8->__vftable;
if ( v7 == 1 )
v10 = "Download canceled.";
else
v10 = "Download failed. Please try later.";
goto LABEL_9;
}
v10 = "Song is not allowed for use.";
}
else
{
v10 = "Failed to fetch song info.";
}
v8 = &m_errorLabel->cocos2d::CCLabelProtocol;
v9 = v8->__vftable;
LABEL_9:
v9->setString(v8, v10);
if ( a1->m_isMusicLibrary )
{
v11 = 0.34999999;
v12 = 140.0;
}
else
{
v11 = 0.40000001;
v12 = 230.0;
}
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_errorLabel, v12, v11, 0.0);
CustomSongWidget::showError(a1, 0);
}