//
// CustomSongWidget::init from 0x745730 to 0x7467f4 (4292 bytes)
//
// 2 xrefs:
// > CustomSongWidget::create @ 0x74699c
// > ??> @ 0x68910
//
// 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
//
bool CustomSongWidget::init(
CustomSongWidget *a1,
SongInfoObject *a2,
CustomSongDelegate *a3,
bool a4,
bool a5,
bool a6,
bool a7,
bool a8,
bool a9,
int a10)
{
_BOOL4 v16; // w26
bool v17; // w0
CustomSongDelegate *v18; // x2
bool v19; // w24
SongInfoObject *m_songInfoObject; // x0
cocos2d::CCDirector *v22; // x0
float v23; // s13
float v24; // s9
cocos2d::CCNode *v25; // x22
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x27
cocos2d::CCMenu *v27; // x0
cocos2d::CCDirector *v28; // x0
cocos2d::CCTouchDispatcher *v29; // x0
cocos2d::CCLabelBMFont *v30; // x0
cocos2d::CCLabelBMFont_vtbl *v31; // x2
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x2
float v33; // s10
cocos2d::CCSprite *v34; // x22
CCMenuItemSpriteExtra *v35; // x0
cocos2d::CCMenu *v36; // x2
cocos2d::CCSprite *v37; // x22
CCMenuItemSpriteExtra *v38; // x0
cocos2d::CCMenu *v39; // x2
cocos2d::CCSprite *v40; // x22
CCMenuItemSpriteExtra *v41; // x0
cocos2d::CCSprite *v42; // x22
CCMenuItemSpriteExtra *v43; // x0
cocos2d::CCMenu *v44; // x2
cocos2d::CCSprite *v45; // x0
CCMenuItemSpriteExtra *v46; // x0
cocos2d::CCMenu *v47; // x2
cocos2d::CCSprite *v48; // x22
CCMenuItemSpriteExtra *v49; // x0
cocos2d::CCMenu *v50; // x2
const char *v51; // x6
CCMenuItemSpriteExtra *v52; // x0
cocos2d::CCMenu *v53; // x2
cocos2d::CCSprite *v54; // x27
CCMenuItemSpriteExtra *v55; // x0
CCMenuItemSpriteExtra *m_infoBtn; // x27
float v57; // s9
cocos2d::CCMenu *v58; // x22
float v59; // s11
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28
cocos2d::CCLabelBMFont *m_artistLabel; // x0
void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28
float *v63; // x0
cocos2d::CCLabelBMFont *v64; // x27
__int64 v65; // x0
const char *v66; // x1
cocos2d::CCSprite *v67; // x0
const char *v68; // x1
cocos2d::CCSprite *v69; // x0
cocos2d::CCSprite_vtbl *v70; // x3
__int64 (*getTexture)(void); // x2
cocos2d::CCTexture2D *v72; // x0
cocos2d::CCSprite *m_sliderBar; // x22
void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28
cocos2d::CCSprite *v75; // x22
void (__fastcall *v76)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28
cocos2d::CCLabelBMFont *v77; // x26
void (__fastcall *v78)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27
cocos2d::CCLabelBMFont *v79; // x26
void (__fastcall *v80)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27
cocos2d::CCLabelBMFont *v81; // x26
void (__fastcall *v82)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27
cocos2d::CCLabelBMFont *v83; // x26
void (__fastcall *v84)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27
CCMenuItemSpriteExtra *v85; // x26
float v86; // s11
cocos2d::CCMenu *v87; // x28
void (__fastcall *v88)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
CCMenuItemSpriteExtra *v89; // x26
cocos2d::CCMenu *v90; // x28
void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
CCMenuItemSpriteExtra *v92; // x26
void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
const cocos2d::CCPoint *v94; // x0
CCMenuItemSpriteExtra *m_getSongInfoBtn; // x26
void (__fastcall *v96)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
const cocos2d::CCPoint *v97; // x0
cocos2d::CCSprite *v98; // x0
CustomSongWidget_vtbl *v99; // x2
cocos2d::CCSprite *m_ncsLogo; // x25
void (__fastcall *v101)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26
CCMenuItemSpriteExtra *m_cancelDownloadBtn; // x25
void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
const cocos2d::CCPoint *v104; // x0
CCMenuItemSpriteExtra *m_deleteBtn; // x25
void (__fastcall *v106)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
const cocos2d::CCPoint *v107; // x27
MusicDownloadManager *v108; // x0
cocos2d::CCLabelBMFont *m_songLabel; // x28
float v110; // s13
cocos2d::CCLabelBMFont *v111; // x28
cocos2d::CCLabelBMFont *m_songIDLabel; // x28
cocos2d::CCLabelBMFont *v113; // x28
cocos2d::CCLabelBMFont *m_errorLabel; // x28
CCMenuItemSpriteExtra *m_downloadBtn; // x28
float v116; // s9
CCMenuItemSpriteExtra *m_selectSongBtn; // x28
CCMenuItemSpriteExtra *m_playbackBtn; // x28
const cocos2d::CCPoint *v119; // x0
cocos2d::CCLabelBMFont *v120; // x28
cocos2d::CCLabelBMFont *v121; // x28
cocos2d::CCSprite *m_sliderGroove; // x28
cocos2d::extension::CCScale9Sprite *v123; // x0
cocos2d::extension::CCScale9Sprite_vtbl *v124; // x2
cocos2d::extension::CCScale9Sprite *m_bgSpr; // x28
const cocos2d::CCPoint *v126; // x0
const char *v127; // x1
cocos2d::CCNode *v128; // x27
cocos2d::CCTexture2D *v129; // x0
void (__fastcall *v130)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
void (__fastcall *v131)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x3
float (__fastcall *getPositionY)(cocos2d::CCNode *__hidden); // x26
cocos2d::CCSprite *v134; // x0
CustomSongWidget_vtbl *v135; // x2
cocos2d::CCMenu *m_buttonMenu; // x22
void (__fastcall *setTouchPriority)(cocos2d::CCLayer *__hidden, int); // x26
cocos2d::CCDirector *v138; // x0
__int64 v139; // x0
MusicDownloadManager *v140; // x0
float v141; // [xsp+A0h] [xbp+A0h]
cocos2d::CCNode *v142; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v143; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v144; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v145; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v146; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v147; // [xsp+B0h] [xbp+B0h]
cocos2d::CCMenu *v148; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v149; // [xsp+B0h] [xbp+B0h]
cocos2d::CCNode *v150; // [xsp+B0h] [xbp+B0h]
CustomSongDelegate *v152; // [xsp+B8h] [xbp+B8h]
float v153; // [xsp+B8h] [xbp+B8h]
void (__fastcall *v154)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B8h] [xbp+B8h]
const cocos2d::CCPoint *v155; // [xsp+B8h] [xbp+B8h]
void (__fastcall *v156)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B8h] [xbp+B8h]
void (__fastcall *v157)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // [xsp+B8h] [xbp+B8h]
void (__fastcall *v158)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B8h] [xbp+B8h]
const cocos2d::CCPoint *v159; // [xsp+B8h] [xbp+B8h]
void (__fastcall *v160)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B8h] [xbp+B8h]
cocos2d::CCPoint v161; // [xsp+D0h] [xbp+D0h] BYREF
cocos2d::ccTexParams v162; // [xsp+D8h] [xbp+D8h] BYREF
cocos2d::CCRect v163; // [xsp+E8h] [xbp+E8h] BYREF
cocos2d::CCPoint v164; // 0:kr08_8.8
cocos2d::CCPoint v165; // 0:kr10_8.8
cocos2d::CCPoint v166; // 0:kr18_8.8
cocos2d::CCPoint v167; // 0:kr20_8.8
cocos2d::SEL_MenuHandler v168; // 0:x2.16
cocos2d::SEL_MenuHandler v169; // 0:x2.16
cocos2d::SEL_MenuHandler v170; // 0:x2.16
cocos2d::SEL_MenuHandler v171; // 0:x2.16
cocos2d::SEL_MenuHandler v172; // 0:x2.16
cocos2d::SEL_MenuHandler v173; // 0:x2.16
cocos2d::SEL_MenuHandler v174; // 0:x2.16
cocos2d::SEL_MenuHandler v175; // 0:x2.16
cocos2d::CCRect v176; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
cocos2d::CCRect v177; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
v16 = a8;
v17 = cocos2d::CCNode::init(a1);
v18 = a3;
v19 = v17;
if ( !v17 )
return v19;
m_songInfoObject = a1->m_songInfoObject;
if ( a2 != m_songInfoObject )
{
if ( a2 )
{
cocos2d::CCObject::retain(a2);
m_songInfoObject = a1->m_songInfoObject;
v18 = a3;
}
if ( m_songInfoObject )
{
v152 = v18;
cocos2d::CCObject::release(m_songInfoObject);
v18 = v152;
}
a1->m_songInfoObject = a2;
}
a1->m_songDelegate = v18;
a1->m_showSelectSongBtn = a4;
a1->m_showPlayMusicBtn = a5;
a1->m_isRobtopSong = a7;
a1->m_showDownloadBtn = a6;
a1->m_isMusicLibrary = a9;
if ( a10 == 1 )
a1->m_showSelectSongBtn = 0;
v22 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v22);
if ( a1->m_isMusicLibrary )
{
v23 = 320.0;
v24 = 50.0;
v153 = -50.0;
}
else
{
v23 = 300.0;
v24 = 90.0;
v153 = -90.0;
}
cocos2d::CCRect::CCRect(&v163, 0.0, 0.0, 80.0, 80.0);
v25 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_square01.png",
(const char *)&v163,
v176);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v25->__vftable[1].~CCNode_0)(v25, 0xFFFFFFFFLL);
setContentSize = v25->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v163, v23, v24);
setContentSize(v25, (const cocos2d::CCSize *)&v163);
a1->addChild_0(a1, v25, -2);
if ( v16 )
v25->setVisible(v25, 0);
v27 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v27;
a1->addChild(a1, v27);
v28 = cocos2d::CCDirector::sharedDirector();
v29 = v28->getTouchDispatcher(v28);
if ( cocos2d::CCTouchDispatcher::isUsingForcePrio(v29) )
{
m_buttonMenu = a1->m_buttonMenu;
setTouchPriority = m_buttonMenu->setTouchPriority;
v138 = cocos2d::CCDirector::sharedDirector();
v139 = (__int64)v138->getTouchDispatcher(v138);
setTouchPriority(m_buttonMenu, *(_DWORD *)(v139 + 124) - 1);
}
a1->m_songLabel = cocos2d::CCLabelBMFont::create();
a1->m_artistLabel = cocos2d::CCLabelBMFont::create();
a1->m_songIDLabel = cocos2d::CCLabelBMFont::create();
v30 = cocos2d::CCLabelBMFont::create();
v31 = v30->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_errorLabel = v30;
setColor = v31->setColor;
LOWORD(v163.origin.x) = 13055;
BYTE2(v163.origin.x) = 25;
setColor(v30, (const cocos2d::ccColor3B *)&v163);
a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);
a1->addChild(a1, a1->m_songLabel);
if ( !a1->m_isMusicLibrary )
a1->addChild(a1, a1->m_artistLabel);
a1->addChild(a1, a1->m_songIDLabel);
a1->addChild_0(a1, a1->m_errorLabel, 2);
if ( a1->m_isMusicLibrary )
v33 = 0.9;
else
v33 = 1.0;
v34 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadBtn_001.png");
v34->setScale(v34, v33);
v168.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v168.adj = (size_t)CustomSongWidget::onDownload;
v35 = CCMenuItemSpriteExtra::create(v34, nullptr, v168);
v36 = a1->m_buttonMenu;
a1->m_downloadBtn = v35;
v36->addChild(v36, v35);
CCMenuItemSpriteExtra::setSizeMult(a1->m_downloadBtn, 1.1);
v37 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_cancelDownloadBtn_001.png");
v37->setScale(v37, v33);
v169.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v169.adj = (size_t)CustomSongWidget::onCancelDownload;
v38 = CCMenuItemSpriteExtra::create(v37, nullptr, v169);
v39 = a1->m_buttonMenu;
a1->m_cancelDownloadBtn = v38;
v39->addChild(v39, v38);
CCMenuItemSpriteExtra::setSizeMult(a1->m_cancelDownloadBtn, 1.1);
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
v40->setScale(v40, 0.8);
v170.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v170.adj = (size_t)CustomSongWidget::onDelete;
v41 = CCMenuItemSpriteExtra::create(v40, nullptr, v170);
a1->m_deleteBtn = v41;
if ( a10 == 1 )
v41->setTag(v41, -999);
((void (__fastcall *)(cocos2d::CCMenu *))a1->m_buttonMenu->addChild)(a1->m_buttonMenu);
CCMenuItemSpriteExtra::setSizeMult(a1->m_deleteBtn, 1.1);
v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_selectSongBtn_001.png");
v42->setScale(v42, v33);
v171.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v171.adj = (size_t)CustomSongWidget::onSelect;
v43 = CCMenuItemSpriteExtra::create(v42, nullptr, v171);
v44 = a1->m_buttonMenu;
a1->m_selectSongBtn = v43;
v44->addChild(v44, v43);
CCMenuItemSpriteExtra::setSizeMult(a1->m_selectSongBtn, 1.1);
v45 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_getSongInfoBtn_001.png");
v172.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v172.adj = (size_t)CustomSongWidget::onGetSongInfo;
v46 = CCMenuItemSpriteExtra::create(v45, nullptr, v172);
v47 = a1->m_buttonMenu;
a1->m_getSongInfoBtn = v46;
v47->addChild(v47, v46);
CCMenuItemSpriteExtra::setSizeMult(a1->m_getSongInfoBtn, 1.1);
v48 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playMusicBtn_001.png");
v48->setScale(v48, v33);
v173.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v173.adj = (size_t)CustomSongWidget::onPlayback;
v49 = CCMenuItemSpriteExtra::create(v48, nullptr, v173);
v50 = a1->m_buttonMenu;
a1->m_playbackBtn = v49;
v50->addChild(v50, v49);
v142 = (cocos2d::CCNode *)ButtonSprite::create(
(ButtonSprite *)"More",
(const char *)&qword_D8 + 4,
0,
0,
0.6,
"bigFont.fnt",
"GJ_button_01.png",
v51,
25.0);
v174.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v174.adj = (size_t)CustomSongWidget::onMore;
v52 = CCMenuItemSpriteExtra::create(v142, nullptr, v174);
v53 = a1->m_buttonMenu;
a1->m_moreBtn = v52;
v53->addChild(v53, v52);
v54 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v54->setScale(v54, 0.65);
v175.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v175.adj = (size_t)CustomSongWidget::onInfo;
v55 = CCMenuItemSpriteExtra::create(v54, nullptr, v175);
a1->m_infoBtn = v55;
CCMenuItemSpriteExtra::setSizeMult(v55, 1.2);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_infoBtn);
m_infoBtn = a1->m_infoBtn;
v57 = v24 * 0.5;
v58 = a1->m_buttonMenu;
v59 = v23 * 0.5;
setPosition = m_infoBtn->setPosition;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v162, (float)(v23 * 0.5) - 14.0, (float)(v57 - 14.0) - 1.0);
v164 = cocos2d::CCNode::convertToNodeSpace(v58, (const cocos2d::CCPoint *)&v162);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))setPosition)(
m_infoBtn,
&v163,
v164.x,
v164.y);
a1->m_infoBtn->setVisible(a1->m_infoBtn, 0);
if ( a1->m_isMusicLibrary )
{
CCMenuItemSpriteExtra::setSizeMult(a1->m_moreBtn, 0.9);
a1->m_moreBtn->addChild(a1->m_moreBtn, a1->m_artistLabel);
m_artistLabel = a1->m_artistLabel;
v62 = m_artistLabel->setPosition;
v63 = (float *)m_artistLabel->getContentSize(m_artistLabel);
v64 = a1->m_artistLabel;
v141 = *v63 * 0.5;
v65 = (__int64)v64->getContentSize(v64);
cocos2d::CCPoint::CCPoint(&v163.origin, v141, *(float *)(v65 + 4) * 0.5);
v62(v64, &v163.origin);
v142->setVisible(v142, 0);
}
else
{
CCMenuItemSpriteExtra::setSizeMult(a1->m_moreBtn, 1.1);
a1->m_moreBtn->setScale(a1->m_moreBtn, 0.7);
a1->m_moreBtn->m_baseScale = 0.7;
}
v67 = (cocos2d::CCSprite *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"slidergroove.png", v66);
a1->m_sliderGroove = v67;
a1->addChild_0(a1, v67, 3);
v69 = (cocos2d::CCSprite *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"sliderBar.png", v68);
v70 = v69->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_sliderBar = v69;
v162.minFilter = 9729;
v162.magFilter = 9729;
getTexture = (__int64 (*)(void))v70->getTexture;
v162.wrapS = 10497;
v162.wrapT = 10497;
v72 = (cocos2d::CCTexture2D *)getTexture();
cocos2d::CCTexture2D::setTexParameters(v72, &v162);
a1->m_sliderGroove->addChild_0(a1->m_sliderGroove, a1->m_sliderBar, -1);
m_sliderBar = a1->m_sliderBar;
setAnchorPoint = m_sliderBar->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.0);
setAnchorPoint(m_sliderBar, &v163.origin);
v75 = a1->m_sliderBar;
v76 = v75->setPosition;
cocos2d::CCPoint::CCPoint(&v163.origin, 2.0, 4.0);
v76(v75, &v163.origin);
if ( a1->m_isMusicLibrary )
{
m_songLabel = a1->m_songLabel;
v110 = -v23;
v143 = (cocos2d::CCNode *)m_songLabel->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v143)(m_songLabel, &v163);
v111 = a1->m_songLabel;
v144 = (cocos2d::CCNode *)v111->setPosition;
cocos2d::CCPoint::CCPoint(&v163.origin, (float)(v110 * 0.5) + 10.0, v57 - 16.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v144)(v111, &v163);
m_songIDLabel = a1->m_songIDLabel;
v145 = (cocos2d::CCNode *)m_songIDLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v163.origin, (float)(v110 * 0.5) + 11.0, v57 - 34.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v145)(m_songIDLabel, &v163);
v113 = a1->m_songIDLabel;
v146 = (cocos2d::CCNode *)v113->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v146)(v113, &v163);
a1->m_songIDLabel->setScale(a1->m_songIDLabel, 0.5);
a1->m_songIDLabel->setColor(a1->m_songIDLabel, (const cocos2d::ccColor3B *)&unk_ECD708);
a1->m_songIDLabel->setOpacity(a1->m_songIDLabel, 4294967240LL);
m_errorLabel = a1->m_errorLabel;
v147 = (cocos2d::CCNode *)m_errorLabel->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v147)(m_errorLabel, &v163);
m_downloadBtn = a1->m_downloadBtn;
v116 = v153;
v148 = a1->m_buttonMenu;
v154 = m_downloadBtn->setPosition;
cocos2d::CCPoint::CCPoint(&v161, v59 - 23.0, (float)((float)(v116 * 0.5) + 23.0) + 2.0);
v167 = cocos2d::CCNode::convertToNodeSpace(v148, &v161);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v154)(
m_downloadBtn,
&v163,
v167.x,
v167.y);
m_selectSongBtn = a1->m_selectSongBtn;
v149 = (cocos2d::CCNode *)m_selectSongBtn->setPosition;
v155 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
cocos2d::CCPoint::CCPoint(&v161, -40.0, 0.0);
cocos2d::CCPoint::operator+(&v163, v155, &v161);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v149)(m_selectSongBtn, &v163);
m_playbackBtn = a1->m_playbackBtn;
v156 = m_playbackBtn->setPosition;
v119 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
v156(m_playbackBtn, v119);
a1->m_sliderGroove->setScaleY(a1->m_sliderGroove, 0.6);
a1->m_sliderGroove->setScaleX(a1->m_sliderGroove, 0.8);
v120 = a1->m_errorLabel;
v157 = v120->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.5, 0.5);
v157(v120, &v163.origin);
v121 = a1->m_errorLabel;
v158 = v121->setPosition;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, (float)(v116 * 0.5) + 3.0);
v158(v121, &v163.origin);
m_sliderGroove = a1->m_sliderGroove;
v150 = (cocos2d::CCNode *)m_sliderGroove->setPosition;
v159 = a1->m_errorLabel->getPosition(a1->m_errorLabel);
cocos2d::CCPoint::CCPoint(&v161, 0.0, -0.5);
cocos2d::CCPoint::operator+(&v163, v159, &v161);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))v150)(m_sliderGroove, &v163);
cocos2d::CCRect::CCRect(&v163, 0.0, 0.0, 86.0, 86.0);
v123 = (cocos2d::extension::CCScale9Sprite *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_squareB_01.png",
(const char *)&v163,
v177);
v124 = v123->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_bgSpr = v123;
v124->setOpacity(v123, 0xFFFFFFFFLL);
m_bgSpr = a1->m_bgSpr;
v160 = m_bgSpr->setPosition;
v126 = a1->m_sliderGroove->getPosition(a1->m_sliderGroove);
v160(m_bgSpr, v126);
a1->addChild_0(a1, a1->m_bgSpr, 1);
a1->m_bgSpr->setVisible(a1->m_bgSpr, 0);
v128 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"sliderBar.png", v127);
a1->m_sliderGroove->addChild_0(a1->m_sliderGroove, v128, -2);
v129 = (cocos2d::CCTexture2D *)((__int64 (__fastcall *)(cocos2d::CCNode *))v128->__vftable[1].setScale_0)(v128);
cocos2d::CCTexture2D::setTexParameters(v129, &v162);
v130 = v128->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.0);
v130(v128, &v163.origin);
v131 = v128->setPosition;
cocos2d::CCPoint::CCPoint(&v163.origin, 2.0, 4.0);
v131(v128, &v163.origin);
getTag = v128->__vftable[1].getTag;
memset(&v163, 50, 3);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v128, &v163);
getPositionY = v128->__vftable[1].getPositionY;
cocos2d::CCRect::CCRect(&v163, 0.0, 0.0, a1->m_sliderGroove->m_obRect.size.width - 4.0, 8.0);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getPositionY)(v128, &v163);
if ( a9 )
goto LABEL_27;
LABEL_34:
v134 = cocos2d::CCSprite::createWithSpriteFrameName("ncs_med_001.png");
v135 = a1->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_ncsLogo = v134;
((void (__fastcall *)(CustomSongWidget *))v135->addChild)(a1);
goto LABEL_28;
}
v77 = a1->m_songLabel;
v78 = v77->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
v78(v77, &v163.origin);
v79 = a1->m_artistLabel;
v80 = v79->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
v80(v79, &v163.origin);
v81 = a1->m_errorLabel;
v82 = v81->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
v82(v81, &v163.origin);
v83 = a1->m_songIDLabel;
v84 = v83->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
v84(v83, &v163.origin);
a1->m_songIDLabel->setScale(a1->m_songIDLabel, 0.5);
v85 = a1->m_downloadBtn;
v86 = v59 - 23.0;
v87 = a1->m_buttonMenu;
v88 = v85->setPosition;
cocos2d::CCPoint::CCPoint(&v161, v86, (float)((float)(v153 * 0.5) + 23.0) + 2.0);
v165 = cocos2d::CCNode::convertToNodeSpace(v87, &v161);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v88)(v85, &v163, v165.x, v165.y);
v89 = a1->m_playbackBtn;
v90 = a1->m_buttonMenu;
v91 = v89->setPosition;
cocos2d::CCPoint::CCPoint(&v161, v86, (float)(v57 - 23.0) - 1.0);
v166 = cocos2d::CCNode::convertToNodeSpace(v90, &v161);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v91)(v89, &v163, v166.x, v166.y);
v92 = a1->m_selectSongBtn;
v93 = v92->setPosition;
v94 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
v93(v92, v94);
m_getSongInfoBtn = a1->m_getSongInfoBtn;
v96 = m_getSongInfoBtn->setPosition;
v97 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
v96(m_getSongInfoBtn, v97);
if ( !a9 )
goto LABEL_34;
LABEL_27:
v98 = cocos2d::CCSprite::createWithSpriteFrameName("ncs_small_001.png");
v99 = a1->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_ncsLogo = v98;
((void (__fastcall *)(CustomSongWidget *))v99->addChild)(a1);
a1->m_ncsLogo->setScale(a1->m_ncsLogo, 1.1);
LABEL_28:
m_ncsLogo = a1->m_ncsLogo;
v101 = m_ncsLogo->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v163.origin, 0.0, 0.5);
v101(m_ncsLogo, &v163.origin);
a1->m_ncsLogo->setVisible(a1->m_ncsLogo, 0);
CustomSongWidget::positionInfoObjects(a1);
m_cancelDownloadBtn = a1->m_cancelDownloadBtn;
v103 = m_cancelDownloadBtn->setPosition;
v104 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
v103(m_cancelDownloadBtn, v104);
m_deleteBtn = a1->m_deleteBtn;
v106 = m_deleteBtn->setPosition;
v107 = a1->m_downloadBtn->getPosition(a1->m_downloadBtn);
cocos2d::CCPoint::CCPoint(&v161, 1.0, -2.0);
cocos2d::CCPoint::operator+(&v163, v107, &v161);
v106(m_deleteBtn, &v163.origin);
CustomSongWidget::updateProgressBar(a1, 0);
a1->m_sliderGroove->setVisible(a1->m_sliderGroove, 0);
if ( a2 )
CustomSongWidget::updateSongObject(a1, a2);
else
CustomSongWidget::updateSongInfo(a1);
v108 = MusicDownloadManager::sharedState();
MusicDownloadManager::addMusicDownloadDelegate(v108, &a1->MusicDownloadDelegate);
if ( a1->m_customSongID )
{
v140 = MusicDownloadManager::sharedState();
if ( MusicDownloadManager::isRunningActionForSongID(v140, a1->m_customSongID) )
CustomSongWidget::startMonitorDownload(a1);
}
CustomSongWidget::updatePlaybackBtn(a1);
return v19;
}