mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
Add option to delete all custom level save data
To match the option to nuke all main game save data, there is also now an option to nuke all custom level save data separately (which is just all custom level quicksaves, along with stars for level completion). It has its own confirmation menu too. It does not delete any levels from the levels folder.
This commit is contained in:
@@ -457,6 +457,16 @@ void Game::updatecustomlevelstats(std::string clevel, int cscore)
|
||||
savecustomlevelstats();
|
||||
}
|
||||
|
||||
void Game::deletecustomlevelstats(void)
|
||||
{
|
||||
customlevelstats.clear();
|
||||
|
||||
if (!FILESYSTEM_delete("saves/levelstats.vvv"))
|
||||
{
|
||||
puts("Error deleting levelstats.vvv");
|
||||
}
|
||||
}
|
||||
|
||||
#define LOAD_ARRAY_RENAME(ARRAY_NAME, DEST) \
|
||||
if (SDL_strcmp(pKey, #ARRAY_NAME) == 0 && pText[0] != '\0') \
|
||||
{ \
|
||||
@@ -6061,7 +6071,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
option("toggle fps");
|
||||
option("speedrun options");
|
||||
option("advanced options");
|
||||
option("clear data");
|
||||
option("clear main game data");
|
||||
option("clear custom level data");
|
||||
option("return");
|
||||
menuyoff = -10;
|
||||
maxspacing = 15;
|
||||
@@ -6190,6 +6201,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
maxspacing = 10;
|
||||
break;
|
||||
case Menu::cleardatamenu:
|
||||
case Menu::clearcustomdatamenu:
|
||||
option("no! don't delete");
|
||||
option("yes, delete everything");
|
||||
menuyoff = 64;
|
||||
|
||||
Reference in New Issue
Block a user