//
// CustomSongCell::loadFromObject from 0x100243e10 to 0x100243fad (413 bytes)
//
// 2 xrefs:
// > CustomListView::loadCell @ 0x10024270f
// > CustomListView::reloadAll @ 0x10024e279
//
// 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 CustomSongCell::loadFromObject(CustomSongCell *a1, SongInfoObject *a2)
{
__int64 v2; // rax
CustomSongWidget *v4; // r14
cocos2d::CCSprite *v5; // r14
CCMenuItemSpriteExtra *v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
__int64 v11; // r14
_QWORD v12[4]; // [rsp+0h] [rbp-20h] BYREF
v12[0] = v2;
((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1);
a1->m_songInfoObject = a2;
v4 = CustomSongWidget::create(a2, &a1->CustomSongDelegate, 1, 1, 0, 0, 0, 0, 0);
((void (__fastcall *)(cocos2d::CCLayer *, CustomSongWidget *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v4,
2);
sub_10028CBE0(v12, a1->m_width * 0.5, a1->m_height * 0.5);
((void (__fastcall *)(CustomSongWidget *, _QWORD *))v4->setPosition)(v4, v12);
v4->m_isInCell = 1;
v5 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
((void (__fastcall *)(cocos2d::CCSprite *, float))v5->setScale)(v5, 0.60000002);
v6 = CCMenuItemSpriteExtra::create(
v5,
nullptr,
a1,
(cocos2d::SEL_MenuHandler)(unsigned __int64)CustomSongCell::onDelete);
LODWORD(v5) = (_DWORD)v6;
CCMenuItemSpriteExtra::setSizeMult(v6, 1.5);
v11 = sub_100792C50((_DWORD)v5, 0, v7, v8, v9, v10);
((void (__fastcall *)(cocos2d::CCLayer *, __int64, __int64))a1->m_mainLayer->addChild_0)(a1->m_mainLayer, v11, 3);
sub_10028CBE0(v12, (float)(a1->m_width * 0.5) + 90.0, (float)(0.5 * a1->m_height) + -24.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v11 + 184LL))(v11, v12);
LODWORD(v11) = a1->m_songInfoObject->m_songID;
a1->m_selected = (_DWORD)v11 == ((unsigned int (__fastcall *)(CustomSongCell *))a1->getActiveSongID)(a1);
}