mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add and use Game::save_exists()
This is simply a shorthand for telesummary != "" || quicksummary != "", to make it easier and less error-prone to negate. This improves readability.
This commit is contained in:
@@ -1357,7 +1357,7 @@ void Game::updatestate()
|
||||
{
|
||||
returntomenu(Menu::levellist);
|
||||
}
|
||||
else if (telesummary != "" || quicksummary != "" || anything_unlocked())
|
||||
else if (save_exists() || anything_unlocked())
|
||||
{
|
||||
returntomenu(Menu::play);
|
||||
}
|
||||
@@ -7031,7 +7031,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
}
|
||||
else
|
||||
{
|
||||
if (telesummary != "" || quicksummary != "")
|
||||
if (save_exists())
|
||||
{
|
||||
option("continue");
|
||||
}
|
||||
@@ -7045,7 +7045,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
option("secret lab", !map.invincibility && slowdown == 30);
|
||||
}
|
||||
option("play modes");
|
||||
if (telesummary != "" || quicksummary != "")
|
||||
if (save_exists())
|
||||
{
|
||||
option("new game");
|
||||
}
|
||||
@@ -7346,3 +7346,8 @@ bool Game::anything_unlocked()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Game::save_exists()
|
||||
{
|
||||
return telesummary != "" || quicksummary != "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user