//
// CustomSongWidget::init from 0x1400c8470 to 0x1400c9628 (4536 bytes)
//
// 3 xrefs:
// > CustomSongWidget::create @ 0x1400c842b
// > ??> @ 0x1406c8280
// > ??> @ 0x1406c828c
//
// 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
//
// Hidden C++ exception states: #wind=1
bool CustomSongWidget::init(
CustomSongWidget *a1,
SongInfoObject *a2,
CustomSongDelegate *a3,
bool a4,
bool a5,
bool a6,
bool a7,
bool a8,
bool a9,
int a10)
{
int m_songID; // r15d
bool result; // al
SongInfoObject *m_songInfoObject; // rcx
cocos2d::CCDirector *v17; // rax
bool m_isMusicLibrary; // cl
int v19; // eax
float v20; // xmm9_4
int v21; // eax
float v22; // xmm8_4
struct cocos2d::CCRect *v23; // rax
struct cocos2d::extension::CCScale9Sprite *v24; // rdi
__int64 v25; // rdx
cocos2d::extension::CCScale9Sprite_vtbl *v26; // rbx
const cocos2d::CCSize *v27; // rax
__int64 v28; // rcx
cocos2d::CCMenu *v29; // rax
__int64 v30; // rcx
__int64 v31; // rax
cocos2d::CCTouchDispatcher *v32; // rax
__int64 v33; // rcx
__int64 v34; // rax
__int64 v35; // rax
const char *v36; // rdx
struct cocos2d::CCLabelBMFont *v37; // rax
struct cocos2d::CCSprite *v38; // rbx
CCMenuItemSpriteExtra *v39; // rax
struct cocos2d::CCSprite *v40; // rbx
CCMenuItemSpriteExtra *v41; // rax
struct cocos2d::CCSprite *v42; // rbx
CCMenuItemSpriteExtra *v43; // rax
struct cocos2d::CCSprite *v44; // rbx
CCMenuItemSpriteExtra *v45; // rax
struct cocos2d::CCSprite *v46; // rax
CCMenuItemSpriteExtra *v47; // rax
struct cocos2d::CCSprite *v48; // rbx
CCMenuItemSpriteExtra *v49; // rax
ButtonSprite *v50; // rdi
CCMenuItemSpriteExtra *v51; // rax
struct cocos2d::CCSprite *v52; // rbx
CCMenuItemSpriteExtra *v53; // rax
CCMenuItemSpriteExtra_vtbl *v54; // rbx
float v55; // xmm8_4
float v56; // xmm9_4
struct cocos2d::CCPoint v57; // rax
CCMenuItemSpriteExtra *m_moreBtn; // rax
cocos2d::CCLabelBMFont *m_artistLabel; // rcx
cocos2d::CCLabelBMFont_vtbl *v60; // rbx
float height; // xmm6_4
const cocos2d::CCSize *v62; // rax
const cocos2d::CCPoint *v63; // rax
cocos2d::CCSprite *v64; // rax
struct cocos2d::CCSprite *v65; // rax
cocos2d::CCTexture2D *v66; // rax
cocos2d::CCSprite_vtbl *v67; // rbx
const cocos2d::CCPoint *v68; // rax
cocos2d::CCSprite_vtbl *v69; // rbx
const cocos2d::CCPoint *v70; // rax
cocos2d::CCLabelBMFont_vtbl *v71; // rbx
const cocos2d::CCPoint *v72; // rax
cocos2d::CCLabelBMFont_vtbl *v73; // rbx
const cocos2d::CCPoint *v74; // rax
cocos2d::CCLabelBMFont_vtbl *v75; // rbx
const cocos2d::CCPoint *v76; // rax
cocos2d::CCLabelBMFont_vtbl *v77; // rbx
const cocos2d::CCPoint *v78; // rax
CCMenuItemSpriteExtra_vtbl *v79; // rbx
float v80; // xmm9_4
struct cocos2d::CCPoint v81; // rax
CCMenuItemSpriteExtra_vtbl *v82; // rbx
struct cocos2d::CCPoint v83; // rax
CCMenuItemSpriteExtra_vtbl *v84; // rbx
const cocos2d::CCPoint *v85; // rax
CCMenuItemSpriteExtra_vtbl *v86; // rbx
const cocos2d::CCPoint *v87; // rax
const cocos2d::CCPoint *v88; // rax
cocos2d::CCLabelBMFont_vtbl *v89; // rbx
const cocos2d::CCPoint *v90; // rax
cocos2d::CCLabelBMFont_vtbl *v91; // rbx
const cocos2d::CCPoint *v92; // rax
cocos2d::CCLabelBMFont_vtbl *v93; // rbx
const cocos2d::CCPoint *v94; // rax
__int64 v95; // rdx
cocos2d::CCLabelBMFont_vtbl *v96; // rbx
const cocos2d::CCPoint *v97; // rax
CCMenuItemSpriteExtra_vtbl *v98; // rbx
struct cocos2d::CCPoint v99; // rax
const cocos2d::CCPoint *v100; // rax
CCMenuItemSpriteExtra_vtbl *v101; // rbx
const cocos2d::CCPoint *v102; // rax
cocos2d::CCLabelBMFont_vtbl *v103; // rbx
const cocos2d::CCPoint *v104; // rax
cocos2d::CCLabelBMFont_vtbl *v105; // rbx
const cocos2d::CCPoint *v106; // rax
const cocos2d::CCPoint *v107; // rax
struct cocos2d::CCRect *v108; // rax
struct cocos2d::extension::CCScale9Sprite *v109; // rax
__int64 v110; // rdx
cocos2d::extension::CCScale9Sprite_vtbl *v111; // rbx
const cocos2d::CCPoint *v112; // rax
struct cocos2d::CCSprite *v113; // rdi
cocos2d::CCTexture2D *v114; // rax
cocos2d::CCSprite_vtbl *v115; // rbx
const cocos2d::CCPoint *v116; // rax
cocos2d::CCSprite_vtbl *v117; // rbx
const cocos2d::CCPoint *v118; // rax
cocos2d::CCSprite_vtbl *v119; // rbx
const cocos2d::CCRect *v120; // rax
const char *v121; // rcx
cocos2d::CCSprite *v122; // rax
cocos2d::CCSprite_vtbl *v123; // rbx
const cocos2d::CCPoint *v124; // rax
CCMenuItemSpriteExtra_vtbl *v125; // rbx
const cocos2d::CCPoint *v126; // rax
const cocos2d::CCPoint *v127; // rax
cocos2d::CCSprite *m_sliderBar; // rbx
cocos2d::CCSprite_vtbl *v129; // rdi
const cocos2d::CCRect *v130; // rax
cocos2d::extension::CCScale9Sprite *m_bgSpr; // rcx
SongInfoObject *v132; // rax
SongInfoObject *v133; // rcx
MusicDownloadManager *v134; // rax
int m_customSongID; // ebx
MusicDownloadManager *v136; // rax
ButtonSprite *v137; // [rsp+58h] [rbp-B0h] BYREF
cocos2d::CCRect v138; // [rsp+60h] [rbp-A8h] BYREF
struct cocos2d::_ccTexParams v139; // [rsp+78h] [rbp-90h] BYREF
m_songID = 0;
result = cocos2d::CCNode::init(a1);
if ( !result )
return result;
if ( a1->m_songInfoObject != a2 )
{
if ( a2 )
cocos2d::CCObject::retain(a2);
m_songInfoObject = a1->m_songInfoObject;
if ( m_songInfoObject )
cocos2d::CCObject::release(m_songInfoObject);
a1->m_songInfoObject = a2;
}
a1->m_songDelegate = a3;
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;
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(m_songInfoObject);
cocos2d::CCDirector::getWinSize(v17);
m_isMusicLibrary = a1->m_isMusicLibrary;
v19 = 300;
if ( m_isMusicLibrary )
v19 = 320;
v20 = (float)v19;
v21 = 90;
if ( m_isMusicLibrary )
v21 = 50;
v22 = (float)v21;
cocos2d::CCRect::CCRect(&v138, 0.0, 0.0, 80.0, 80.0);
v24 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v23);
LOBYTE(v25) = -1;
v24->setOpacity(&v24->cocos2d::CCRGBAProtocol, v25);
v26 = v24->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v137, v20, v22);
v26->setContentSize(v24, v27);
a1->addChild_0(a1, v24, -2);
if ( a8 )
v24->setVisible(v24, 0);
v29 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v28);
a1->m_buttonMenu = v29;
a1->addChild_1(a1, v29);
v31 = cocos2d::CCDirector::sharedDirector(v30);
v32 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v31 + 144LL))(v31);
if ( cocos2d::CCTouchDispatcher::isUsingForcePrio(v32) )
{
v34 = cocos2d::CCDirector::sharedDirector(v33);
v35 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v34 + 144LL))(v34);
a1->m_buttonMenu->setTouchPriority(a1->m_buttonMenu, *(_DWORD *)(v35 + 124) - 1);
}
a1->m_songLabel = cocos2d::CCLabelBMFont::create("Song Title", (const char *)&qword_14052A4D8);
a1->m_artistLabel = cocos2d::CCLabelBMFont::create("Artist Name", "goldFont.fnt");
v36 = (const char *)&qword_14052A4D8;
if ( a1->m_isMusicLibrary )
v36 = "chatFont.fnt";
a1->m_songIDLabel = cocos2d::CCLabelBMFont::create("Song ID", v36);
v37 = cocos2d::CCLabelBMFont::create("Error", (const char *)&qword_14052A4D8);
a1->m_errorLabel = v37;
LOWORD(v137) = 13055;
BYTE2(v137) = 25;
v37->setColor(&v37->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v137);
a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);
a1->addChild_1(a1, a1->m_songLabel);
if ( !a1->m_isMusicLibrary )
a1->addChild_1(a1, a1->m_artistLabel);
a1->addChild_1(a1, a1->m_songIDLabel);
a1->addChild_0(a1, a1->m_errorLabel, 2);
v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v38->setScale_0)(v38);
v39 = CCMenuItemSpriteExtra::create(v38, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onDownload);
a1->m_downloadBtn = v39;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v39);
HIDWORD(a1->m_downloadBtn->m_pfnSelector.adj) = 1066192077;
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_cancelDownloadBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v40->setScale_0)(v40);
v41 = CCMenuItemSpriteExtra::create(v40, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onCancelDownload);
a1->m_cancelDownloadBtn = v41;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v41);
HIDWORD(a1->m_cancelDownloadBtn->m_pfnSelector.adj) = 1066192077;
v42 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v42->setScale_0)(v42);
v43 = CCMenuItemSpriteExtra::create(v42, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onDelete);
a1->m_deleteBtn = v43;
if ( a10 == 1 )
v43->setTag(v43, -999);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, a1->m_deleteBtn);
HIDWORD(a1->m_deleteBtn->m_pfnSelector.adj) = 1066192077;
v44 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_selectSongBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v44->setScale_0)(v44);
v45 = CCMenuItemSpriteExtra::create(v44, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onSelect);
a1->m_selectSongBtn = v45;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v45);
HIDWORD(a1->m_selectSongBtn->m_pfnSelector.adj) = 1066192077;
v46 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_getSongInfoBtn_001.png");
v47 = CCMenuItemSpriteExtra::create(v46, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onGetSongInfo);
a1->m_getSongInfoBtn = v47;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v47);
HIDWORD(a1->m_getSongInfoBtn->m_pfnSelector.adj) = 1066192077;
v48 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playMusicBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v48->setScale_0)(v48);
v49 = CCMenuItemSpriteExtra::create(v48, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onPlayback);
a1->m_playbackBtn = v49;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v49);
v137 = (ButtonSprite *)operator new(0x2C0u);
v50 = ButtonSprite::ButtonSprite(v137);
if ( v50 )
{
if ( ButtonSprite::init_1(
v50,
"More",
220,
0,
0.60000002,
0,
(const char *)&qword_14052A4D8,
"GJ_button_01.png",
25.0) )
{
cocos2d::CCObject::autorelease(v50);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v50->~ButtonSprite)(v50, 1);
v50 = nullptr;
}
}
v51 = CCMenuItemSpriteExtra::create(v50, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onMore);
a1->m_moreBtn = v51;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v51);
v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v52->setScale_0)(v52);
v53 = CCMenuItemSpriteExtra::create(v52, nullptr, a1, (cocos2d::SEL_MenuHandler *)CustomSongWidget::onInfo);
a1->m_infoBtn = v53;
HIDWORD(v53->m_pfnSelector.adj) = 1067030938;
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, a1->m_infoBtn);
v54 = a1->m_infoBtn->__vftable;
v55 = v22 * 0.5;
v56 = v20 * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v137, v56 - 14.0, (float)(v55 - 14.0) - 1.0);
v57 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v138.origin);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v54->setPosition_0)(a1->m_infoBtn, v57);
a1->m_infoBtn->setVisible(a1->m_infoBtn, 0);
m_moreBtn = a1->m_moreBtn;
if ( a1->m_isMusicLibrary )
{
HIDWORD(m_moreBtn->m_pfnSelector.adj) = 1063675494;
a1->m_moreBtn->addChild_1(a1->m_moreBtn, a1->m_artistLabel);
m_artistLabel = a1->m_artistLabel;
v60 = m_artistLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
height = m_artistLabel->getContentSize(m_artistLabel)->height;
v62 = a1->m_artistLabel->getContentSize(a1->m_artistLabel);
cocos2d::CCPoint::CCPoint(&v138.origin, v62->width * 0.5, height * 0.5);
v60->setPosition_0(a1->m_artistLabel, v63);
v50->setVisible(v50, 0);
}
else
{
HIDWORD(m_moreBtn->m_pfnSelector.adj) = 1066192077;
((void (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_moreBtn->setScale_0)(a1->m_moreBtn);
HIDWORD(a1->m_moreBtn->m_pDisabledImage) = 1060320051;
}
v64 = cocos2d::CCSprite::create("slidergroove.png");
a1->m_sliderGroove = v64;
a1->addChild_0(a1, v64, 3);
v65 = cocos2d::CCSprite::create("sliderBar.png");
a1->m_sliderBar = v65;
v139.minFilter = 9729;
v139.magFilter = 9729;
v139.wrapS = 10497;
v139.wrapT = 10497;
v66 = v65->getTexture(&v65->cocos2d::CCTextureProtocol);
cocos2d::CCTexture2D::setTexParameters(v66, &v139);
a1->m_sliderGroove->addChild_0(a1->m_sliderGroove, a1->m_sliderBar, -1);
v67 = a1->m_sliderBar->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.0);
v67->setAnchorPoint(a1->m_sliderBar, v68);
v69 = a1->m_sliderBar->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 2.0, 4.0);
v69->setPosition_0(a1->m_sliderBar, v70);
v71 = a1->m_songLabel->__vftable;
if ( a1->m_isMusicLibrary )
{
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v71->setAnchorPoint(a1->m_songLabel, v88);
v89 = a1->m_songLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 10.0 - v56, v55 - 16.0);
v89->setPosition_0(a1->m_songLabel, v90);
v91 = a1->m_songIDLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 11.0 - v56, v55 - 34.0);
v91->setPosition_0(a1->m_songIDLabel, v92);
v93 = a1->m_songIDLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v93->setAnchorPoint(a1->m_songIDLabel, v94);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songIDLabel->setScale_0)(a1->m_songIDLabel);
a1->m_songIDLabel->setColor(&a1->m_songIDLabel->cocos2d::CCRGBAProtocol, &stru_140529A2C);
LOBYTE(v95) = -56;
a1->m_songIDLabel->setOpacity(&a1->m_songIDLabel->cocos2d::CCRGBAProtocol, v95);
v96 = a1->m_errorLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v96->setAnchorPoint(a1->m_errorLabel, v97);
v98 = a1->m_downloadBtn->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, v56 - 23.0, (float)(23.0 - v55) + 2.0);
v99 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v137);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v98->setPosition_0)(a1->m_downloadBtn, v99);
cocos2d::CCPoint::CCPoint(&v138.origin, -40.0, 0.0);
v100 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
cocos2d::CCPoint::operator+(v100, &v137);
a1->m_selectSongBtn->setPosition_0(a1->m_selectSongBtn, (const cocos2d::CCPoint *)&v137);
v101 = a1->m_playbackBtn->__vftable;
v102 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
v101->setPosition_0(a1->m_playbackBtn, v102);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_sliderGroove->setScaleY)(a1->m_sliderGroove);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_sliderGroove->setScaleX)(a1->m_sliderGroove);
v103 = a1->m_errorLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.5, 0.5);
v103->setAnchorPoint(a1->m_errorLabel, v104);
v105 = a1->m_errorLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 3.0 - v55);
v105->setPosition_0(a1->m_errorLabel, v106);
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, -0.5);
v107 = a1->m_errorLabel->getPosition_0(a1->m_errorLabel);
cocos2d::CCPoint::operator+(v107, &v137);
a1->m_sliderGroove->setPosition_0(a1->m_sliderGroove, (const cocos2d::CCPoint *)&v137);
cocos2d::CCRect::CCRect(&v138, 0.0, 0.0, 86.0, 86.0);
v109 = cocos2d::extension::CCScale9Sprite::create("GJ_squareB_01.png", v108);
a1->m_bgSpr = v109;
LOBYTE(v110) = -1;
v109->setOpacity(&v109->cocos2d::CCRGBAProtocol, v110);
v111 = a1->m_bgSpr->__vftable;
v112 = a1->m_sliderGroove->getPosition_0(a1->m_sliderGroove);
v111->setPosition_0(a1->m_bgSpr, v112);
a1->addChild_0(a1, a1->m_bgSpr, 1);
a1->m_bgSpr->setVisible(a1->m_bgSpr, 0);
v113 = cocos2d::CCSprite::create("sliderBar.png");
a1->m_sliderGroove->addChild_0(a1->m_sliderGroove, v113, -2);
v114 = v113->getTexture(&v113->cocos2d::CCTextureProtocol);
cocos2d::CCTexture2D::setTexParameters(v114, &v139);
v115 = v113->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.0);
v115->setAnchorPoint(v113, v116);
v117 = v113->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 2.0, 4.0);
v117->setPosition_0(v113, v118);
memset(&v137, 50, 3);
v113->setColor(&v113->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v137);
v119 = v113->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCRect::CCRect(&v138, 0.0, 0.0, a1->m_sliderGroove->m_obRect.size.width - 4.0, 8.0);
v119->setTextureRect_0(v113, v120);
}
else
{
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v71->setAnchorPoint(a1->m_songLabel, v72);
v73 = a1->m_artistLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v73->setAnchorPoint(a1->m_artistLabel, v74);
v75 = a1->m_errorLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v75->setAnchorPoint(a1->m_errorLabel, v76);
v77 = a1->m_songIDLabel->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v77->setAnchorPoint(a1->m_songIDLabel, v78);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_songIDLabel->setScale_0)(a1->m_songIDLabel);
v79 = a1->m_downloadBtn->__vftable;
v80 = v56 - 23.0;
cocos2d::CCPoint::CCPoint(&v138.origin, v80, (float)(23.0 - v55) + 2.0);
v81 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v137);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v79->setPosition_0)(a1->m_downloadBtn, v81);
v82 = a1->m_playbackBtn->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, v80, (float)(v55 - 23.0) - 1.0);
v83 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)&v137);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v82->setPosition_0)(a1->m_playbackBtn, v83);
v84 = a1->m_selectSongBtn->__vftable;
v85 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
v84->setPosition_0(a1->m_selectSongBtn, v85);
v86 = a1->m_getSongInfoBtn->__vftable;
v87 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
v86->setPosition_0(a1->m_getSongInfoBtn, v87);
}
v121 = "ncs_med_001.png";
if ( a9 )
v121 = "ncs_small_001.png";
v122 = cocos2d::CCSprite::createWithSpriteFrameName(v121);
a1->m_ncsLogo = v122;
a1->addChild_1(a1, v122);
if ( a9 )
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_ncsLogo->setScale_0)(a1->m_ncsLogo);
v123 = a1->m_ncsLogo->__vftable;
cocos2d::CCPoint::CCPoint(&v138.origin, 0.0, 0.5);
v123->setAnchorPoint(a1->m_ncsLogo, v124);
a1->m_ncsLogo->setVisible(a1->m_ncsLogo, 0);
CustomSongWidget::positionInfoObjects(a1);
v125 = a1->m_cancelDownloadBtn->__vftable;
v126 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
v125->setPosition_0(a1->m_cancelDownloadBtn, v126);
cocos2d::CCPoint::CCPoint(&v138.origin, 1.0, -2.0);
v127 = a1->m_downloadBtn->getPosition_0(a1->m_downloadBtn);
cocos2d::CCPoint::operator+(v127, &v137);
a1->m_deleteBtn->setPosition_0(a1->m_deleteBtn, (const cocos2d::CCPoint *)&v137);
m_sliderBar = a1->m_sliderBar;
v129 = m_sliderBar->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCRect::CCRect(
&v138,
0.0,
0.0,
fminf(
a1->m_sliderGroove->m_obRect.size.width - 4.0,
(float)((float)0 / 100.0) * (float)(a1->m_sliderGroove->m_obRect.size.width - 4.0)),
8.0);
v129->setTextureRect_0(m_sliderBar, v130);
a1->m_sliderGroove->setVisible(a1->m_sliderGroove, 0);
if ( a2 )
{
a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);
m_bgSpr = a1->m_bgSpr;
if ( m_bgSpr )
m_bgSpr->setVisible(m_bgSpr, 0);
v132 = a1->m_songInfoObject;
if ( v132 == a2 )
{
a2 = a1->m_songInfoObject;
if ( !v132 )
{
LABEL_47:
a1->m_customSongID = m_songID;
goto LABEL_48;
}
}
else
{
cocos2d::CCObject::retain(a2);
v133 = a1->m_songInfoObject;
if ( v133 )
cocos2d::CCObject::release(v133);
a1->m_songInfoObject = a2;
}
m_songID = a2->m_songID;
goto LABEL_47;
}
LABEL_48:
CustomSongWidget::updateSongInfo(a1);
v134 = MusicDownloadManager::sharedState();
MusicDownloadManager::addMusicDownloadDelegate(v134, &a1->MusicDownloadDelegate);
m_customSongID = a1->m_customSongID;
if ( m_customSongID )
{
v136 = MusicDownloadManager::sharedState();
if ( MusicDownloadManager::isRunningActionForSongID(v136, m_customSongID) )
CustomSongWidget::startDownload(a1);
}
CustomSongWidget::updatePlaybackBtn(a1);
return 1;
}