//
// ArtistCell::loadFromObject from 0x1400b5610 to 0x1400b593e (814 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x1400ab857
// > ??> @ 0x1406c7bcc
//
// 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=2
void ArtistCell::loadFromObject(ArtistCell *a1, SongInfoObject *a2)
{
SongInfoObject *v2; // rbx
const char *v4; // rcx
cocos2d::CCLabelBMFont *v5; // rdi
cocos2d::CCLabelBMFont_vtbl *v6; // rbx
const cocos2d::CCPoint *v7; // rax
struct cocos2d::CCMenu *v8; // r14
ButtonSprite *v9; // rbx
CCMenuItemSpriteExtra *v10; // rsi
CCMenuItemSpriteExtra_vtbl *v11; // rbx
struct cocos2d::CCPoint v12; // rax
struct cocos2d::CCSprite *v13; // rbx
CCMenuItemSpriteExtra *v14; // rdi
__int64 v15; // rax
ButtonSprite *v16; // [rsp+50h] [rbp-58h] BYREF
cocos2d::CCPoint v17; // [rsp+58h] [rbp-50h] BYREF
_QWORD v18[4]; // [rsp+60h] [rbp-48h] BYREF
v2 = a2;
LOBYTE(a2) = 1;
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, (bool)a2);
a1->m_songInfo = v2;
sub_14003BDB0((__int64)v18, (__int64)&v2->m_artistName);
v4 = (const char *)v18;
if ( v18[3] > 0xFu )
v4 = (const char *)v18[0];
v5 = cocos2d::CCLabelBMFont::create(v4, (const char *)&qword_14052A4D8);
sub_14003A830((__int64)v18);
cocos2d::CCLabelBMFont::limitLabelWidth(v5, 200.0, 0.80000001, 0.0);
a1->m_mainLayer->addChild_1(a1->m_mainLayer, v5);
v6 = v5->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, 0.0, 0.5);
v6->setAnchorPoint(v5, v7);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))v5->setPosition)(v5);
v8 = cocos2d::CCMenu::create(nullptr);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 3);
v16 = (ButtonSprite *)operator new(0x2C0u);
v9 = ButtonSprite::ButtonSprite(v16);
if ( v9 )
{
if ( ButtonSprite::init_1(
v9,
"View",
100,
0,
0.60000002,
0,
(const char *)&qword_14052A4D8,
"GJ_button_01.png",
30.0) )
{
cocos2d::CCObject::autorelease(v9);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v9->~ButtonSprite)(v9, 1);
v9 = nullptr;
}
}
((void (__fastcall *)(ButtonSprite *))v9->setScale_0)(v9);
v10 = CCMenuItemSpriteExtra::create(v9, nullptr, a1, (cocos2d::SEL_MenuHandler *)ArtistCell::onNewgrounds);
HIDWORD(v10->m_pfnSelector.adj) = 1067030938;
v8->addChild_1(v8, v10);
v11 = v10->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, a1->m_width - 38.0, a1->m_height * 0.5);
v12 = cocos2d::CCNode::convertToNodeSpace(v8, &v17);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v11->setPosition_0)(v10, v12);
sub_14003BDB0((__int64)v18, (__int64)&a1->m_songInfo->m_youtubeChannel);
LOBYTE(v11) = v18[2] == 0;
sub_14003A830((__int64)v18);
if ( !(_BYTE)v11 )
{
v13 = cocos2d::CCSprite::createWithSpriteFrameName("gj_ytIcon_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v13->setScale_0)(v13);
v14 = CCMenuItemSpriteExtra::create(v13, nullptr, a1, (cocos2d::SEL_MenuHandler *)ArtistCell::onYouTube);
HIDWORD(v14->m_pfnSelector.adj) = 1067030938;
v8->addChild_1(v8, v14);
cocos2d::CCPoint::CCPoint(&v17, -52.0, 0.0);
v15 = (__int64)v10->getPosition_0(v10);
cocos2d::CCPoint::operator+(v15, &v16);
v14->setPosition_0(v14, (const cocos2d::CCPoint *)&v16);
}
}