//
// CustomListView::loadCell from 0x1002422f0 to 0x1002428e2 (1522 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008ea2f8
//
// 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 CustomListView::loadCell(CustomListView *a1, TableViewCell *a2, int a3)
{
GJGameLevel *v4; // rax
GJComment *v5; // rax
cocos2d::CCLayerColor *v6; // rdi
GJLevelList *v7; // rax
SFXInfoObject *v8; // r15
CustomSFXWidget *v9; // r15
GJUserScore *v10; // r15
cocos2d::CCLayerColor *m_backgroundLayer; // rdi
GJUserScore *v12; // r15
cocos2d::CCLayerColor *v13; // rdi
GJUserScore *v14; // r15
cocos2d::CCLayerColor *v15; // rdi
SongInfoObject *v16; // rax
cocos2d::CCLayerColor *v17; // rdi
GJLocalScore *v18; // rax
TableViewCell_vtbl *v19; // rax
StatsObject *v20; // rax
SongObject *v21; // rax
SongInfoObject *v22; // rax
CCURLObject *v23; // rax
OptionsObject *v24; // rax
cocos2d::CCDictionary *v25; // rax
GJMapPack *v26; // rax
SongInfoObject *v27; // rax
GJUserMessage *v28; // rax
GJUserScore *v29; // r15
cocos2d::CCLayerColor *v30; // rdi
GJSmartTemplate *v31; // rax
_WORD v32[20]; // [rsp+8h] [rbp-28h] BYREF
switch ( a1->m_type )
{
case User:
case User2:
v10 = (GJUserScore *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
m_backgroundLayer = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))m_backgroundLayer->setColor)(m_backgroundLayer, v32);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))a2->m_backgroundLayer->setOpacity)(
a2->m_backgroundLayer,
255);
GJUserCell::loadFromScore((GJUserCell *)a2, v10);
return;
case Stats:
v20 = (StatsObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
StatsCell::loadFromObject((StatsCell *)a2, v20);
goto LABEL_28;
case Achievement:
v25 = (cocos2d::CCDictionary *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
AchievementCell::loadFromDict((AchievementCell *)a2, v25);
LABEL_28:
v6 = a2->m_backgroundLayer;
goto LABEL_29;
case Level:
case Level2:
case Level3:
case Level4:
v4 = (GJGameLevel *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
LevelCell::loadFromLevel((LevelCell *)a2, v4);
goto LABEL_43;
case Comment:
case Comment2:
case Comment3:
case Comment4:
v5 = (GJComment *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
CommentCell::loadFromComment((CommentCell *)a2, v5);
v6 = a2->m_backgroundLayer;
if ( BYTE2(a2[1].cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::m_unknown2) == 1 )
{
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 39;
v32[0] = 20368;
}
else
{
LOBYTE(v32[1]) = 42;
v32[0] = 21916;
}
}
else
{
LABEL_29:
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
}
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))v6->setColor)(v6, v32);
return;
case Song:
v21 = (SongObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
SongCell::loadFromObject((SongCell *)a2, v21);
goto LABEL_43;
case Score:
v14 = (GJUserScore *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
v15 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))v15->setColor)(v15, v32);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))a2->m_backgroundLayer->setOpacity)(
a2->m_backgroundLayer,
255);
GJScoreCell::loadFromScore((GJScoreCell *)a2, v14);
return;
case MapPack:
v26 = (GJMapPack *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
MapPackCell::loadFromMapPack((MapPackCell *)a2, v26);
goto LABEL_43;
case CustomSong:
v27 = (SongInfoObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
CustomSongCell::loadFromObject((CustomSongCell *)a2, v27);
v17 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
goto LABEL_36;
goto LABEL_15;
case Request:
v29 = (GJUserScore *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
v30 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))v30->setColor)(v30, v32);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))a2->m_backgroundLayer->setOpacity)(
a2->m_backgroundLayer,
255);
GJRequestCell::loadFromScore((GJRequestCell *)a2, v29);
return;
case Message:
v28 = (GJUserMessage *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
GJMessageCell::loadFromMessage((GJMessageCell *)a2, v28);
goto LABEL_43;
case Comment4|Achievement:
v12 = (GJUserScore *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
v13 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))v13->setColor)(v13, v32);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))a2->m_backgroundLayer->setOpacity)(
a2->m_backgroundLayer,
255);
GJLevelScoreCell::loadFromScore((GJLevelScoreCell *)a2, v12);
return;
case Artist:
v22 = (SongInfoObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
ArtistCell::loadFromObject((ArtistCell *)a2, v22);
goto LABEL_43;
case SmartTemplate:
v31 = (GJSmartTemplate *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
SmartTemplateCell::loadFromObject((SmartTemplateCell *)a2, v31);
if ( GameLevelManager::sharedState()->m_smartTemplate
&& GameLevelManager::sharedState()->m_smartTemplate->m_nameIndex == LODWORD(a2[1].getPosition) )
{
goto LABEL_42;
}
goto LABEL_43;
case SFX:
case SFX2:
v8 = (SFXInfoObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
((void (__fastcall *)(cocos2d::CCLayer *, __int64))a2->m_mainLayer->removeAllChildrenWithCleanup)(
a2->m_mainLayer,
1);
*(_QWORD *)&a2[1].m_uID = v8;
v9 = CustomSFXWidget::create(v8, (CustomSFXDelegate *)&a2[1], 1, 1, 1, 0, BYTE1(a2[1].m_nTag));
((void (__fastcall *)(cocos2d::CCLayer *, CustomSFXWidget *, __int64))a2->m_mainLayer->addChild_0)(
a2->m_mainLayer,
v9,
2);
sub_10028CBE0(v32, a2->m_width * 0.5, 0.5 * a2->m_height);
((void (__fastcall *)(CustomSFXWidget *, _WORD *))v9->setPosition)(v9, v32);
LODWORD(v9) = *(_DWORD *)(*(_QWORD *)&a2[1].m_uID + 56LL);
LOBYTE(a2[1].m_nTag) = (_DWORD)v9 == ((unsigned int (__fastcall *)(TableViewCell *))a2->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable[1].~TableViewCell)(a2);
CustomSFXCell::updateBGColor((CustomSFXCell *)a2, a3);
return;
case CustomMusic:
v16 = (SongInfoObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
CustomMusicCell::loadFromObject((CustomMusicCell *)a2, v16);
v17 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
LABEL_36:
memset(v32, 50, 3);
else
LABEL_15:
memset(v32, 75, 3);
goto LABEL_46;
case Options:
v24 = (OptionsObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
OptionsCell::loadFromObject((OptionsCell *)a2, v24);
goto LABEL_43;
case LevelList:
case LevelList2:
case LevelList3:
v7 = (GJLevelList *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
LevelListCell::loadFromList((LevelListCell *)a2, v7);
goto LABEL_43;
case LocalLevelScore:
v18 = (GJLocalScore *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
GJLocalLevelScoreCell::loadFromScore((GJLocalLevelScoreCell *)a2, v18);
v19 = a2[1].cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( !v19 || LOBYTE(v19->getTag) != 1 )
goto LABEL_43;
LABEL_42:
v17 = a2->m_backgroundLayer;
LOBYTE(v32[1]) = 10;
v32[0] = -26906;
goto LABEL_46;
case URL:
v23 = (CCURLObject *)sub_1007200C0(a1->m_entries, (unsigned int)a3);
URLCell::loadFromObject((URLCell *)a2, v23);
LABEL_43:
v17 = a2->m_backgroundLayer;
if ( (a3 & 1) != 0 )
{
LOBYTE(v32[1]) = 62;
v32[0] = 29378;
}
else
{
LOBYTE(v32[1]) = 44;
v32[0] = 22689;
}
LABEL_46:
((void (__fastcall *)(cocos2d::CCLayerColor *, _WORD *))v17->setColor)(v17, v32);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))a2->m_backgroundLayer->setOpacity)(
a2->m_backgroundLayer,
255);
break;
default:
BoomListView::loadCell(a1, a2, a3);
break;
}
}