//
// CustomMusicCell::loadFromObject from 0x100244010 to 0x100244142 (306 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x100242534
//
// 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 CustomMusicCell::loadFromObject(CustomMusicCell *a1, SongInfoObject *a2)
{
__int64 v2; // rax
TableViewCellDelegate *m_cellDelegate; // rdi
int v5; // eax
int v6; // r10d
CustomSongWidget *v7; // r14
_QWORD v8[4]; // [rsp+0h] [rbp-20h] BYREF
v8[0] = v2;
((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1);
a1->m_songInfoObject = a2;
m_cellDelegate = a1->m_tableView->m_cellDelegate;
if ( !m_cellDelegate
|| (v5 = ((__int64 (__fastcall *)(TableViewCellDelegate *))m_cellDelegate->getCellDelegateType)(m_cellDelegate),
v6 = 0,
v5 == 1) )
{
v6 = 1;
}
v7 = CustomSongWidget::create(a1->m_songInfoObject, &a1->CustomSongDelegate, 1, 1, 1, 0, 0, 1, v6);
((void (__fastcall *)(cocos2d::CCLayer *, CustomSongWidget *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v7,
2);
sub_10028CBE0(v8, a1->m_width * 0.5, 0.5 * a1->m_height);
((void (__fastcall *)(CustomSongWidget *, _QWORD *))v7->setPosition)(v7, v8);
v7->m_isInCell = 1;
CustomSongWidget::addExtraVisuals(v7, a1->m_songInfoObject->m_isNew, a1->m_songInfoObject->m_libraryOrder > 0);
LODWORD(v7) = a1->m_songInfoObject->m_songID;
a1->m_selected = (_DWORD)v7 == ((unsigned int (__fastcall *)(CustomMusicCell *))a1->getActiveSongID)(a1);
}