//
// LevelLeaderboard::deleteLocalScores from 0x100250884 to 0x1002509a4 (288 bytes)
//
// 2 xrefs:
// > LevelLeaderboard::FLAlert_Clicked @ 0x100250a20
// > sub_100250A24 @ 0x100250a6c
//
// 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 LevelLeaderboard::deleteLocalScores(LevelLeaderboard *a1)
{
GJGameLevel *m_level; // x8
GJGameLevel *v3; // x8
__int64 v4; // x19
__int64 v5; // x0
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
char v7; // [xsp+17h] [xbp-29h]
void *v8[2]; // [xsp+18h] [xbp-28h] BYREF
char v9; // [xsp+2Fh] [xbp-11h]
m_level = a1->m_level;
if ( m_level->m_localBestTimes.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
*(_BYTE *)m_level->m_localBestTimes.m_data.m_long.capacitym1 = 0;
m_level->m_localBestTimes.m_data.m_long.size = 0;
}
else
{
m_level->m_localBestTimes.m_data.m_short.sizex2 = 0;
m_level->m_localBestTimes.m_data.m_short.shortStorage.__elems_[22] = 0;
}
v3 = a1->m_level;
if ( v3->m_localBestPoints.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
*(_BYTE *)v3->m_localBestPoints.m_data.m_long.capacitym1 = 0;
v3->m_localBestPoints.m_data.m_long.size = 0;
}
else
{
v3->m_localBestPoints.m_data.m_short.sizex2 = 0;
v3->m_localBestPoints.m_data.m_short.shortStorage.__elems_[22] = 0;
}
v4 = ((__int64 (__fastcall *)(LevelLeaderboard *))a1->getParent)(a1);
((void (__fastcall *)(LevelLeaderboard *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(LevelLeaderboard *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
if ( v4 )
{
sub_100009900(v8, "Local scores reset.");
sub_100009900(__p, "");
v5 = TextAlertPopup::create(v8, 150, __p, 1.0, 0.6);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v4 + 448LL))(v4, v5, 100);
if ( v7 < 0 )
operator delete(__p[0]);
if ( v9 < 0 )
operator delete(v8[0]);
}
}