mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Make "start game" goto play menu if any unlocks, even if saves deleted
This commit fixes a slightly frustrating thing where if you start a new game, and then exit before saving, "start game" will always take you to a new game, even though you have unlocked things like the Secret Lab or Time Trials. Now, if you select "new game" (only possible if you have something unlocked), then quit before saving, "start game" will still take you to the play menu, but "continue" is replaced with "start" and "new game" is gone.
This commit is contained in:
parent
833bbdbbef
commit
85f851bc17
2 changed files with 27 additions and 9 deletions
|
@ -1357,7 +1357,7 @@ void Game::updatestate()
|
|||
{
|
||||
returntomenu(Menu::levellist);
|
||||
}
|
||||
else if (game.telesummary != "" || game.quicksummary != "")
|
||||
else if (game.telesummary != "" || game.quicksummary != "" || anything_unlocked())
|
||||
{
|
||||
returntomenu(Menu::play);
|
||||
}
|
||||
|
@ -7025,14 +7025,24 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
}
|
||||
else
|
||||
{
|
||||
option("continue");
|
||||
if (telesummary != "" || quicksummary != "")
|
||||
{
|
||||
option("continue");
|
||||
}
|
||||
else
|
||||
{
|
||||
option("start");
|
||||
}
|
||||
//ok, secret lab! no notification, but test:
|
||||
if (unlock[8])
|
||||
{
|
||||
option("secret lab", !map.invincibility && game.slowdown == 30);
|
||||
}
|
||||
option("play modes");
|
||||
option("new game");
|
||||
if (telesummary != "" || quicksummary != "")
|
||||
{
|
||||
option("new game");
|
||||
}
|
||||
option("return");
|
||||
if (unlock[8])
|
||||
{
|
||||
|
|
|
@ -134,7 +134,7 @@ void menuactionpress()
|
|||
#if !defined(MAKEANDPLAY)
|
||||
case 0:
|
||||
//Play
|
||||
if (game.telesummary == "" && game.quicksummary == "")
|
||||
if (game.telesummary == "" && game.quicksummary == "" && !game.anything_unlocked())
|
||||
{
|
||||
//No saves exist, just start a new game
|
||||
game.mainmenu = 0;
|
||||
|
@ -948,12 +948,20 @@ void menuactionpress()
|
|||
case Menu::play:
|
||||
{
|
||||
//Do we have the Secret Lab option?
|
||||
int offset = game.unlock[8] ? 0 : -1;
|
||||
int sloffset = game.unlock[8] ? 0 : -1;
|
||||
//Do we have a telesave or quicksave?
|
||||
int ngoffset = game.telesummary != "" || game.quicksummary != "" ? 0 : -1;
|
||||
if (game.currentmenuoption == 0)
|
||||
{
|
||||
//continue
|
||||
//right, this depends on what saves you've got
|
||||
if (game.telesummary == "")
|
||||
if (game.telesummary == "" && game.quicksummary == "")
|
||||
{
|
||||
//You have no saves but have something unlocked, or you couldn't have gotten here
|
||||
game.mainmenu = 0;
|
||||
graphics.fademode = 2;
|
||||
}
|
||||
else if (game.telesummary == "")
|
||||
{
|
||||
//You at least have a quicksave, or you couldn't have gotten here
|
||||
game.mainmenu = 2;
|
||||
|
@ -983,21 +991,21 @@ void menuactionpress()
|
|||
music.playef(2);
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuoption == offset+2)
|
||||
else if (game.currentmenuoption == sloffset+2)
|
||||
{
|
||||
//play modes
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::playmodes);
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else if (game.currentmenuoption == offset+3)
|
||||
else if (game.currentmenuoption == sloffset+3 && (game.telesummary != "" || game.quicksummary != ""))
|
||||
{
|
||||
//newgame
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::newgamewarning);
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else if (game.currentmenuoption == offset+4)
|
||||
else if (game.currentmenuoption == sloffset+ngoffset+4)
|
||||
{
|
||||
//back
|
||||
music.playef(11);
|
||||
|
|
Loading…
Reference in a new issue