//
// CustomMusicCell::loadFromObject from 0x335500 to 0x3355f4 (244 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x33bb76
//
// 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 CustomMusicCell::loadFromObject(CustomMusicCell *a1, SongInfoObject *a2)
{
TableView *m_tableView; // r3
TableViewCellDelegate *m_cellDelegate; // r0
_BOOL4 v6; // r0
CustomSongWidget *v7; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
SongInfoObject *m_songInfoObject; // r3
int m_songID; // r5
cocos2d::CCPoint v11; // [sp+1Ch] [bp-10h] BYREF
a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1);
m_tableView = a1->m_tableView;
a1->m_songInfoObject = a2;
m_cellDelegate = m_tableView->m_cellDelegate;
if ( m_cellDelegate )
v6 = m_cellDelegate->getCellDelegateType(m_cellDelegate) == 1;
else
v6 = 1;
v7 = CustomSongWidget::create(
a1->m_songInfoObject,
&a1->CustomSongDelegate,
(bool)&dword_0 + 1,
(bool)&dword_0 + 1,
(bool)&dword_0 + 1,
0,
0,
(bool)&dword_0 + 1,
v6);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v7, 2);
setPosition = v7->setPosition;
cocos2d::CCPoint::CCPoint(&v11, a1->m_width * 0.5, a1->m_height * 0.5);
setPosition(v7, &v11);
m_songInfoObject = a1->m_songInfoObject;
v7->m_isInCell = (unsigned __int8)&dword_0 + 1;
CustomSongWidget::addExtraVisuals(v7, m_songInfoObject->m_isNew, m_songInfoObject->m_libraryOrder > 0);
m_songID = a1->m_songInfoObject->m_songID;
a1->m_selected = m_songID == a1->getActiveSongID(a1);
}