1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Mark same menus in levels list, credits, and unlock menus

This marks pressing ACTION on "next page" in the levels list, credits,
pressing ACTION on "continue" in "You have unlocked" menus, and pressing
ACTION on an unlock option in the unlock menu and time trial unlock menu
as being the same menu.

This is to prevent creating unnecessary stack frames when using said
menu options in those menus.
This commit is contained in:
Misa 2020-04-16 19:26:49 -07:00 committed by Ethan Lee
parent 80ae625585
commit 250be2dbb7

View file

@ -206,7 +206,7 @@ void menuactionpress()
}else{
game.levelpage++;
}
game.createmenu(Menu::levellist);
game.createmenu(Menu::levellist, true);
game.currentmenuoption=game.menuoptions.size()-2;
map.nexttowercolour();
}else{
@ -569,7 +569,7 @@ void menuactionpress()
game.unlocknotify[9] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 0;
break;
case 1: //unlock 2
@ -577,7 +577,7 @@ void menuactionpress()
game.unlocknotify[10] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 1;
break;
case 2: //unlock 3
@ -585,7 +585,7 @@ void menuactionpress()
game.unlocknotify[11] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 2;
break;
case 3: //unlock 4
@ -593,7 +593,7 @@ void menuactionpress()
game.unlocknotify[12] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 3;
break;
case 4: //unlock 5
@ -601,7 +601,7 @@ void menuactionpress()
game.unlocknotify[13] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 4;
break;
case 5: //unlock 6
@ -609,7 +609,7 @@ void menuactionpress()
game.unlocknotify[14] = true;
music.playef(11);
game.savestats();
game.createmenu(Menu::unlockmenutrials);
game.createmenu(Menu::unlockmenutrials, true);
game.currentmenuoption = 5;
break;
case 6: //back
@ -637,7 +637,7 @@ void menuactionpress()
game.unlock[6] = true;
game.unlock[7] = true;
game.savestats();
game.createmenu(Menu::unlockmenu);
game.createmenu(Menu::unlockmenu, true);
game.currentmenuoption = 1;
break;
case 2:
@ -646,7 +646,7 @@ void menuactionpress()
game.unlock[17] = true;
game.unlocknotify[17] = true;
game.savestats();
game.createmenu(Menu::unlockmenu);
game.createmenu(Menu::unlockmenu, true);
game.currentmenuoption = 2;
break;
case 3:
@ -655,7 +655,7 @@ void menuactionpress()
game.unlock[18] = true;
game.unlocknotify[18] = true;
game.savestats();
game.createmenu(Menu::unlockmenu);
game.createmenu(Menu::unlockmenu, true);
game.currentmenuoption = 3;
break;
case 4:
@ -663,7 +663,7 @@ void menuactionpress()
music.playef(11);
game.stat_trinkets = 20;
game.savestats();
game.createmenu(Menu::unlockmenu);
game.createmenu(Menu::unlockmenu, true);
game.currentmenuoption = 4;
break;
case 5:
@ -672,7 +672,7 @@ void menuactionpress()
game.unlock[8] = true;
game.unlocknotify[8] = true;
game.savestats();
game.createmenu(Menu::unlockmenu);
game.createmenu(Menu::unlockmenu, true);
game.currentmenuoption = 5;
break;
default:
@ -689,7 +689,7 @@ void menuactionpress()
case 0:
//next page
music.playef(11);
game.createmenu(Menu::credits2);
game.createmenu(Menu::credits2, true);
map.nexttowercolour();
break;
default:
@ -706,7 +706,7 @@ void menuactionpress()
case 0:
//next page
music.playef(11);
game.createmenu(Menu::credits25);
game.createmenu(Menu::credits25, true);
map.nexttowercolour();
break;
case 1:
@ -723,7 +723,7 @@ void menuactionpress()
case 0:
//next page
music.playef(11);
game.createmenu(Menu::credits3);
game.createmenu(Menu::credits3, true);
map.nexttowercolour();
break;
default:
@ -746,12 +746,12 @@ void menuactionpress()
{
// No more super patrons. Move to the next credits section
game.current_credits_list_index = 0;
game.createmenu(Menu::credits4);
game.createmenu(Menu::credits4, true);
}
else
{
// There are more super patrons. Refresh the menu with the next ones
game.createmenu(Menu::credits3);
game.createmenu(Menu::credits3, true);
}
map.nexttowercolour();
@ -777,12 +777,12 @@ void menuactionpress()
{
// No more patrons. Move to the next credits section
game.current_credits_list_index = 0;
game.createmenu(Menu::credits5);
game.createmenu(Menu::credits5, true);
}
else
{
// There are more patrons. Refresh the menu with the next ones
game.createmenu(Menu::credits4);
game.createmenu(Menu::credits4, true);
}
map.nexttowercolour();
@ -808,12 +808,12 @@ void menuactionpress()
{
// No more GitHub contributors. Move to the next credits section
game.current_credits_list_index = 0;
game.createmenu(Menu::credits6);
game.createmenu(Menu::credits6, true);
}
else
{
// There are more GitHub contributors. Refresh the menu with the next ones
game.createmenu(Menu::credits5);
game.createmenu(Menu::credits5, true);
}
map.nexttowercolour();
@ -833,7 +833,7 @@ void menuactionpress()
case 0:
//first page
music.playef(11);
game.createmenu(Menu::credits);
game.createmenu(Menu::credits, true);
map.nexttowercolour();
break;
default:
@ -1136,7 +1136,7 @@ void menuactionpress()
case Menu::unlockflipmode:
//back
music.playef(11);
game.createmenu(Menu::play);
game.createmenu(Menu::play, true);
map.nexttowercolour();
break;
case Menu::timetrials: