//
// LevelBrowserLayer::onRemoveAllFavorites from 0x10048d5b0 to 0x10048d69d (237 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::init @ 0x10048c6cb
//
// 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::onRemoveAllFavorites(LevelBrowserLayer *a1, cocos2d::CCObject *a2)
{
GJSearchObject *m_searchObject; // rax
const std::string::value_type *v3; // rsi
__int64 v4; // rbx
__int128 v5; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
std::string v7; // [rsp+20h] [rbp-20h] BYREF
memset(&v7, 0, sizeof(v7));
m_searchObject = a1->m_searchObject;
if ( m_searchObject )
{
v3 = "Remove all levels from favorites?\n"
"Search and folder filters apply.\n"
"Levels will not be deleted.";
if ( m_searchObject->m_searchType == FavouriteLists )
v3 = "Remove all lists from favorites?\nSearch and folder filters apply.";
}
else
{
v3 = "Remove all levels from favorites?\n"
"Search and folder filters apply.\n"
"Levels will not be deleted.";
}
std::string::assign(&v7, v3);
if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 )
{
sub_100006B70(&v5, v7.__r_.__value_.__l.__data_, v7.__r_.__value_.__l.__size_, 0.0);
}
else
{
__p = v7.__r_.__value_.__l.__data_;
v5 = *(_OWORD *)&v7.__r_.__value_.__l.0;
}
v4 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Remove Favorites", &v5, "Cancel", "Remove", 360.0);
if ( (v5 & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 72LL))(v4, 2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1288LL))(v4);
if ( (*(_BYTE *)&v7.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v7.__r_.__value_.__l.__data_);
}