//
// LevelBrowserLayer::onRemoveAllFavorites from 0x10041642c to 0x100416520 (244 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::init @ 0x1004158e8
//
// 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; // x8
const std::string::value_type *v4; // x1
FLAlertLayer *v5; // x19
std::string __p; // [xsp+0h] [xbp-40h] BYREF
std::string v7; // [xsp+18h] [xbp-28h] BYREF
memset(&v7, 0, sizeof(v7));
m_searchObject = a1->m_searchObject;
v4 = "Remove all levels from favorites?\n"
"Search and folder filters apply.\n"
"Levels will not be deleted.";
if ( m_searchObject && m_searchObject->m_searchType == FavouriteLists )
v4 = "Remove all lists from favorites?\nSearch and folder filters apply.";
std::string::assign(&v7, v4);
if ( SHIBYTE(v7.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v7.__r_.__value_.__l.__data_, v7.__r_.__value_.__l.__size_);
else
__p = v7;
v5 = FLAlertLayer::create_1(
(__int64)&a1->FLAlertLayerProtocol,
(__int64)"Remove Favorites",
(__int64)&__p,
(__int64)"Cancel",
(__int64)"Remove",
360.0);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
((void (__fastcall *)(FLAlertLayer *, __int64))v5->setTag)(v5, 2);
((void (__fastcall *)(FLAlertLayer *))v5->show)(v5);
if ( SHIBYTE(v7.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v7.__r_.__value_.__l.__data_);
}