//
// CustomSongWidget::positionInfoObjects from 0x1000fb6bc to 0x1000fbc24 (1384 bytes)
//
// 2 xrefs:
// > CustomSongWidget::init @ 0x1000fa77c
// > CustomSongWidget::updateSongInfo @ 0x1000fbd8c
//
// 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 __fastcall CustomSongWidget::positionInfoObjects(CustomSongWidget *a1)
{
__n128 v1; // q0
__n128 v2; // q1
SongInfoObject *m_songInfoObject; // x9
_BOOL8 v5; // x20
cocos2d::CCLabelBMFont *m_songLabel; // x21
__n128 v7; // q0
cocos2d::CCLabelBMFont *m_songIDLabel; // x21
__n128 v9; // q1
__n128 v10; // q0
cocos2d::CCLabelBMFont *m_errorLabel; // x21
__n128 v12; // q1
cocos2d::CCSprite *m_sliderGroove; // x21
float32x2_t *v14; // x22
__n128 v15; // q0
__n128 v16; // q1
double v17; // d0
cocos2d::extension::CCScale9Sprite *m_bgSpr; // x21
__int64 v19; // x1
cocos2d::CCLabelBMFont *m_artistLabel; // x21
float32x2_t *v21; // x22
__n128 v22; // q0
__n128 v23; // q1
double v24; // d0
cocos2d::CCLabelBMFont *v25; // x21
float32x2_t *v26; // x22
__n128 v27; // q0
__n128 v28; // q1
double v29; // d0
cocos2d::CCLabelBMFont *v30; // x21
__n128 v31; // q0
__n128 v32; // q1
cocos2d::CCLabelBMFont *v33; // x21
float32x2_t *v34; // x22
__n128 v35; // q0
__n128 v36; // q1
double v37; // d0
cocos2d::CCSprite *v38; // x21
__n128 v39; // q1
__n128 v40; // q0
int m_nongType; // w22
char *v42; // x1
void **v43; // x8
const char *v44; // x9
cocos2d::CCString *v45; // x0
char *CString; // x0
cocos2d::CCSprite *m_ncsLogo; // x20
cocos2d::CCSpriteFrameCache *v48; // x0
void **v49; // x1
cocos2d::CCSpriteFrame *v50; // x0
cocos2d::CCSprite *v51; // x20
float32x2_t *v52; // x21
__n128 v53; // q0
__n128 v54; // q1
double v55; // d0
unsigned int v56; // w22
cocos2d::CCLabelBMFont *v57; // x20
float32x2_t *v58; // x21
__n128 v59; // q1
__n128 v60; // q0
double v61; // d0
cocos2d::CCLabelBMFont *v62; // x19
float32x2_t *v63; // x20
__n128 v64; // q1
__n128 v65; // q0
double v66; // d0
float32x2_t *v67; // x21
__n128 v68; // q0
__n128 v69; // q1
double v70; // d0
cocos2d::CCLabelBMFont *v71; // x19
float32x2_t *v72; // x20
__n128 v73; // q0
__n128 v74; // q1
unsigned int v75; // w8
double v76; // d0
float32x2_t v77; // [xsp+10h] [xbp-70h] BYREF
float32x2_t v78; // [xsp+18h] [xbp-68h] BYREF
void *__p[2]; // [xsp+20h] [xbp-60h] BYREF
char v80; // [xsp+37h] [xbp-49h]
void *v81[2]; // [xsp+38h] [xbp-48h] BYREF
char v82; // [xsp+4Fh] [xbp-31h]
m_songInfoObject = a1->m_songInfoObject;
if ( m_songInfoObject )
v5 = m_songInfoObject->m_nongType > 0;
else
v5 = 0;
m_songLabel = a1->m_songLabel;
if ( a1->m_isMusicLibrary )
{
v1.n128_u32[0] = -1021968384;
v2.n128_u32[0] = 9.0;
sub_100022980(v1, v2, v81);
v7 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_songLabel->setPosition)(m_songLabel, v81);
m_songIDLabel = a1->m_songIDLabel;
v7.n128_u32[0] = -1022033920;
v9.n128_u32[0] = -9.0;
sub_100022980(v7, v9, v81);
v10 = ((__n128 (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_songIDLabel->setPosition)(m_songIDLabel, v81);
m_errorLabel = a1->m_errorLabel;
v10.n128_u32[0] = 0;
v12.n128_u32[0] = -22.0;
sub_100022980(v10, v12, v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_errorLabel->setPosition)(m_errorLabel, v81);
m_sliderGroove = a1->m_sliderGroove;
v14 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_errorLabel->getPosition)(a1->m_errorLabel);
v15.n128_u32[0] = 0;
v16.n128_u32[0] = -0.5;
sub_100022980(v15, v16, __p);
*(float32x2_t *)&v17 = sub_1000229DC(v14, (float32x2_t *)__p, (float32x2_t *)v81);
((void (__fastcall *)(cocos2d::CCSprite *, void **, double))m_sliderGroove->setPosition)(m_sliderGroove, v81, v17);
m_bgSpr = a1->m_bgSpr;
v19 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sliderGroove->getPosition)(a1->m_sliderGroove);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, __int64))m_bgSpr->setPosition)(m_bgSpr, v19);
}
else
{
v1.n128_u32[0] = -1022623744;
v2.n128_u32[0] = 29.0;
sub_100022980(v1, v2, v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_songLabel->setPosition)(m_songLabel, v81);
m_artistLabel = a1->m_artistLabel;
v21 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songLabel->getPosition)(a1->m_songLabel);
v22.n128_u32[0] = 1.0;
v23.n128_u32[0] = -24.0;
sub_100022980(v22, v23, __p);
*(float32x2_t *)&v24 = sub_1000229DC(v21, (float32x2_t *)__p, (float32x2_t *)v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))m_artistLabel->setPosition)(
m_artistLabel,
v81,
v24);
v25 = a1->m_errorLabel;
v26 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_artistLabel->getPosition)(a1->m_artistLabel);
v27.n128_u32[0] = 1.0;
v28.n128_u32[0] = -20.0;
sub_100022980(v27, v28, __p);
*(float32x2_t *)&v29 = sub_1000229DC(v26, (float32x2_t *)__p, (float32x2_t *)v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v25->setPosition)(v25, v81, v29);
v30 = a1->m_songIDLabel;
v31.n128_f32[0] = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songLabel->getPosition)(a1->m_songLabel)
+ 1.0;
v32.n128_u32[0] = -31.0;
sub_100022980(v31, v32, v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))v30->setPosition)(v30, v81);
if ( AppDelegate::get()->m_startupScriptFilename.m_data.m_short.shortStorage.__elems_[4] == 1 )
{
v33 = a1->m_songIDLabel;
v34 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v33->getPosition)(v33);
v35.n128_u32[0] = 0;
v36.n128_u32[0] = 4.0;
sub_100022980(v35, v36, __p);
*(float32x2_t *)&v37 = sub_1000229DC(v34, (float32x2_t *)__p, (float32x2_t *)v81);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **, double))v33->setPosition)(v33, v81, v37);
}
v38 = a1->m_sliderGroove;
v39.n128_u32[0] = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_errorLabel->getPosition)(a1->m_errorLabel)
+ 4);
v40.n128_u32[0] = -1039663104;
sub_100022980(v40, v39, v81);
((void (__fastcall *)(cocos2d::CCSprite *, void **))v38->setPosition)(v38, v81);
}
((void (__fastcall *)(cocos2d::CCSprite *, _BOOL8))a1->m_ncsLogo->setVisible)(a1->m_ncsLogo, v5);
if ( v5 )
{
m_nongType = a1->m_songInfoObject->m_nongType;
if ( m_nongType == 2 )
v42 = "chompo";
else
v42 = "ncs";
sub_100009900(v81, v42);
if ( v82 >= 0 )
v43 = v81;
else
v43 = (void **)v81[0];
if ( a1->m_isMusicLibrary )
v44 = "small";
else
v44 = "med";
v45 = (cocos2d::CCString *)sub_100268F4C("%s_%s_001.png", (const char *)v43, v44);
CString = (char *)cocos2d::CCString::getCString(v45);
sub_100009900(__p, CString);
m_ncsLogo = a1->m_ncsLogo;
v48 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( v80 >= 0 )
v49 = __p;
else
v49 = (void **)__p[0];
v50 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v48, (const char *)v49);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_ncsLogo->setDisplayFrame)(m_ncsLogo, v50);
v51 = a1->m_ncsLogo;
if ( a1->m_isMusicLibrary )
{
v52 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songLabel->getPosition)(a1->m_songLabel);
v53.n128_u32[0] = 0;
v54.n128_u32[0] = -1.0;
sub_100022980(v53, v54, &v77);
*(float32x2_t *)&v55 = sub_1000229DC(v52, &v77, &v78);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v51->setPosition)(v51, &v78, v55);
if ( m_nongType == 2 )
v56 = 45;
else
v56 = 37;
v57 = a1->m_songLabel;
v58 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v57->getPosition)(v57);
v59.n128_u32[0] = 0;
v60.n128_f32[0] = (float)v56;
sub_100022980(v60, v59, &v77);
*(float32x2_t *)&v61 = sub_1000229DC(v58, &v77, &v78);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v57->setPosition)(v57, &v78, v61);
v62 = a1->m_artistLabel;
v63 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v62->getPosition)(v62);
v64.n128_u32[0] = 0;
v65.n128_f32[0] = (float)v56;
sub_100022980(v65, v64, &v77);
*(float32x2_t *)&v66 = sub_1000229DC(v63, &v77, &v78);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v62->setPosition)(v62, &v78, v66);
}
else
{
v67 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songLabel->getPosition)(a1->m_songLabel);
v68.n128_u32[0] = 0;
v69.n128_u32[0] = -2.0;
sub_100022980(v68, v69, &v77);
*(float32x2_t *)&v70 = sub_1000229DC(v67, &v77, &v78);
((void (__fastcall *)(cocos2d::CCSprite *, float32x2_t *, double))v51->setPosition)(v51, &v78, v70);
v71 = a1->m_songLabel;
v72 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v71->getPosition)(v71);
if ( m_nongType == 2 )
v75 = 61;
else
v75 = 53;
v73.n128_f32[0] = (float)v75;
v74.n128_u32[0] = 0;
sub_100022980(v73, v74, &v77);
*(float32x2_t *)&v76 = sub_1000229DC(v72, &v77, &v78);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float32x2_t *, double))v71->setPosition)(v71, &v78, v76);
}
if ( v80 < 0 )
operator delete(__p[0]);
if ( v82 < 0 )
operator delete(v81[0]);
}
}