//
// LevelBrowserLayer::onToggleAllObjects from 0x100416138 to 0x1004161c0 (136 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::init @ 0x100414f5c
//
// 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 LevelBrowserLayer::onToggleAllObjects(LevelBrowserLayer *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_levels; // x0
cocos2d::CCArray *v4; // x8
cocos2d::ccArray *data; // x8
__int64 num; // x9
unsigned __int64 arr; // x8
unsigned __int64 v8; // x9
a1->m_allSelected ^= 1u;
m_levels = a1->m_levels;
if ( m_levels && (unsigned int)sub_10024A36C((__int64)m_levels) )
{
v4 = a1->m_levels;
if ( v4 )
{
data = v4->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (unsigned __int64)data->arr;
v8 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)arr )
break;
*(_BYTE *)(*(_QWORD *)arr + 655LL) = a1->m_allSelected;
arr += 8LL;
}
while ( arr <= v8 );
}
}
CustomListView::reloadAll((CustomListView *)a1->m_list->m_listView);
}
}