// // CustomListView::setupList from 0x10024d7d0 to 0x10024de82 (1714 bytes) // // 1 xrefs: // > @ 0x1008ea2a8 // // 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::setupList(CustomListView *a1, float a2) { unsigned __int32 v3; // eax float v4; // xmm0_4 __m128 v5; // xmm0 cocos2d::CCArray *m_entries; // rdi __m128 v7; // xmm0 cocos2d::CCArray *v8; // rdi __m128 v9; // xmm0 TableView *m_tableView; // rdi int v11; // eax TableView *v12; // rdi int m_currentLevelID; // r12d int v14; // r13d int v15; // r14d _DWORD *v16; // rax char v17; // r15 bool v18; // cf unsigned int v19; // r14d GJUserScore *v20; // rax bool isCurrentUser; // r15 int v22; // r14d TableViewCellDelegate *m_cellDelegate; // rdi int v24; // r15d int v25; // eax unsigned int v26; // r14d int v27; // eax bool v28; // cc float MaxY; // xmm0_4 TableView *v30; // rbx cocos2d::CCPoint v31; // xmm0_8 float v32; // xmm1_4 CCScrollLayerExt *v33; // rdi int v34; // eax TableView *v35; // rdi float v36; // xmm2_4 float v37; // xmm0_4 float v38; // xmm1_4 int v39; // eax TableView *v40; // rdi float m_itemSeparation; // xmm2_4 float v42; // xmm0_4 int v43; // eax TableView *v44; // rdi TableView *v45; // r14 __int64 v46; // rax _BYTE v47[8]; // [rsp+8h] [rbp-48h] BYREF __m128 v48; // [rsp+10h] [rbp-40h] float v49; // [rsp+24h] [rbp-2Ch] v49 = a2; v3 = a1->m_type - 2; if ( v3 > 0x20 ) v4 = 90.0; else v4 = flt_10081820C[v3]; a1->m_itemSeparation = v4; if ( a1->m_height > (float)((float)(int)sub_100720070(a1->m_entries) * a1->m_itemSeparation) ) BoomListView::lockList(a1, 1); v5 = (__m128)0x4000000000000000uLL; switch ( a1->m_type ) { case User: case Level: case Level2: case Score: case User2: case Request: case Message: case Comment4|Achievement: case SFX: case SFX2: case CustomMusic: case Options: case LevelList: case Level3: case LevelList2: case LevelList3: case Level4: case LocalLevelScore: m_entries = a1->m_entries; if ( m_entries ) { v7 = 0; v7.f32[0] = (float)(int)sub_100720070(m_entries) * 0.5; v5 = _mm_blend_ps(v7, (__m128)xmmword_100818000, 14); } break; case Achievement: case MapPack: case CustomSong: v5 = (__m128)xmmword_1008179D0; break; case Comment: case Comment2: case Comment3: case Comment4: case Artist: case URL: v8 = a1->m_entries; if ( v8 ) { v9 = 0; v9.f32[0] = (float)((float)(int)sub_100720070(v8) * 0.5) + -1.0; v5 = _mm_blend_ps(v9, (__m128)xmmword_100818000, 14); } else { v5 = (__m128)0x400000003F800000uLL; } break; case List|0x1: v5 = (__m128)0x41200000C0C00000uLL; break; default: break; } v48 = v5; TableView::reloadData(a1->m_tableView); m_tableView = a1->m_tableView; _mm_storel_ps((double *)&m_tableView->m_scrollLimitTop, v5); switch ( a1->m_type ) { case User: case Stats: case Achievement: case Comment: case Comment2: case Comment3: case List|0x1: case Song: case MapPack: case CustomSong: case Comment4: case User2: case Request: case Message: case Artist: case SmartTemplate: case CustomMusic: case Options: case LevelList: case LevelList2: case LevelList3: case LocalLevelScore: case URL: goto LABEL_15; case Level: case Level2: case Level3: case Level4: if ( v49 != 0.0 && !a1->m_locked ) { v28 = v49 <= CCScrollLayerExt::getMaxY(m_tableView); MaxY = v49; if ( !v28 ) MaxY = CCScrollLayerExt::getMaxY(a1->m_tableView); v49 = MaxY; v30 = a1->m_tableView; v31 = (cocos2d::CCPoint)*(unsigned int *)((__int64 (__fastcall *)(CCContentLayer *))v30->m_contentLayer->getPosition)(v30->m_contentLayer); v32 = v49; goto LABEL_41; } if ( GameManager::sharedState()->m_currentLevelID ) { m_currentLevelID = GameManager::sharedState()->m_currentLevelID; if ( (unsigned int)sub_100720070(a1->m_entries) ) { v14 = -1; while ( 1 ) { v15 = v14 + 1; v16 = (_DWORD *)sub_1007200C0(a1->m_entries, (unsigned int)(v14 + 1)); v17 = 1; if ( v16[82] - v16[83] == m_currentLevelID || v16[258] == m_currentLevelID ) break; v18 = v14 + 2 < (unsigned int)sub_100720070(a1->m_entries); ++v14; if ( !v18 ) goto LABEL_53; } v15 = v14; } else { v15 = -1; LABEL_53: v17 = 0; } v39 = sub_100720070(a1->m_entries); v40 = a1->m_tableView; if ( v39 == 1 ) CCScrollLayerExt::moveToTopWithOffset(v40, a1->m_itemSeparation); else CCScrollLayerExt::moveToTop(v40); if ( v17 ) { if ( (unsigned int)sub_100720070(a1->m_entries) != 1 ) { m_itemSeparation = a1->m_itemSeparation; v42 = a1->m_height * 0.5; if ( (float)((float)v15 * m_itemSeparation) > v42 ) { v48.f32[0] = (float)((float)(m_itemSeparation * -0.5) + (float)((float)((float)(v15 + 2) * m_itemSeparation) - v42)) + *(float *)(((__int64 (__fastcall *)(CCContentLayer *))a1->m_tableView->m_contentLayer->getPosition)(a1->m_tableView->m_contentLayer) + 4); v32 = v48.f32[0]; if ( v48.f32[0] > CCScrollLayerExt::getMaxY(a1->m_tableView) ) v32 = CCScrollLayerExt::getMaxY(a1->m_tableView); v48.f32[0] = v32; v30 = a1->m_tableView; v31 = (cocos2d::CCPoint)*(unsigned int *)((__int64 (__fastcall *)(CCContentLayer *))v30->m_contentLayer->getPosition)(v30->m_contentLayer); LABEL_41: sub_10028CBE0(v47, v31.x, v32); v33 = v30; goto LABEL_74; } } } } else { LABEL_15: v11 = sub_100720070(a1->m_entries); v12 = a1->m_tableView; if ( v11 == 1 ) CCScrollLayerExt::moveToTopWithOffset(v12, a1->m_itemSeparation); else CCScrollLayerExt::moveToTop(v12); } return; case Score: case Comment4|Achievement: v19 = 0; if ( (unsigned int)sub_100720070(a1->m_entries) ) { do { v20 = (GJUserScore *)sub_1007200C0(a1->m_entries, v19); isCurrentUser = GJUserScore::isCurrentUser(v20); if ( isCurrentUser ) break; ++v19; } while ( v19 < (unsigned int)sub_100720070(a1->m_entries) ); v22 = v19 - 1; } else { v22 = -1; isCurrentUser = 0; } v34 = sub_100720070(a1->m_entries); v35 = a1->m_tableView; if ( v34 == 1 ) CCScrollLayerExt::moveToTopWithOffset(v35, a1->m_itemSeparation); else CCScrollLayerExt::moveToTop(v35); if ( !isCurrentUser ) return; if ( (unsigned int)sub_100720070(a1->m_entries) == 1 ) return; v36 = a1->m_itemSeparation; v37 = a1->m_height * 0.5; if ( (float)((float)v22 * v36) <= v37 ) return; v38 = (float)(v22 + 2); goto LABEL_73; case SFX: case SFX2: m_cellDelegate = m_tableView->m_cellDelegate; v49 = 0.0; v48.i32[0] = -1082130432; if ( !m_cellDelegate || !((unsigned __int8 (__fastcall *)(TableViewCellDelegate *))m_cellDelegate->shouldSnapToSelected)(m_cellDelegate) ) { LOBYTE(v26) = 0; goto LABEL_66; } v24 = ((__int64 (__fastcall *)(TableViewCellDelegate *))a1->m_tableView->m_cellDelegate->getSelectedCellIdx)(a1->m_tableView->m_cellDelegate); v25 = sub_100720070(a1->m_entries); v49 = 0.0; v26 = 0; if ( v25 ) { while ( *(_DWORD *)(sub_1007200C0(a1->m_entries, v26) + 56) != v24 ) { if ( ++v26 >= (unsigned int)sub_100720070(a1->m_entries) ) { v27 = v26 - 1; LOBYTE(v26) = 0; goto LABEL_65; } } v49 = (float)(int)(v26 + 1); v27 = v26 - 1; LOBYTE(v26) = 1; } else { v27 = -1; } LABEL_65: v48.f32[0] = (float)v27; LABEL_66: v43 = sub_100720070(a1->m_entries); v44 = a1->m_tableView; if ( v43 == 1 ) CCScrollLayerExt::moveToTopWithOffset(v44, a1->m_itemSeparation); else CCScrollLayerExt::moveToTop(v44); if ( (_BYTE)v26 ) { if ( (unsigned int)sub_100720070(a1->m_entries) != 1 ) { v36 = a1->m_itemSeparation; v37 = a1->m_height * 0.5; if ( (float)(v48.f32[0] * v36) > v37 ) { v38 = v49; LABEL_73: v49 = (float)(v36 * -0.5) + (float)((float)(v38 * v36) - v37); v45 = a1->m_tableView; v48.i32[0] = *(_DWORD *)((__int64 (__fastcall *)(CCContentLayer *))v45->m_contentLayer->getPosition)(v45->m_contentLayer); v46 = ((__int64 (__fastcall *)(CCContentLayer *))a1->m_tableView->m_contentLayer->getPosition)(a1->m_tableView->m_contentLayer); v31 = (cocos2d::CCPoint)v48.u32[0]; sub_10028CBE0(v47, v48.f32[0], v49 + *(float *)(v46 + 4)); v33 = v45; LABEL_74: CCScrollLayerExt::setContentOffset(v33, v31, (bool)v47); } } } return; default: BoomListView::setupList(a1, v49); return; } }