mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +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:
parent
80ae625585
commit
250be2dbb7
1 changed files with 23 additions and 23 deletions
|
@ -206,7 +206,7 @@ void menuactionpress()
|
||||||
}else{
|
}else{
|
||||||
game.levelpage++;
|
game.levelpage++;
|
||||||
}
|
}
|
||||||
game.createmenu(Menu::levellist);
|
game.createmenu(Menu::levellist, true);
|
||||||
game.currentmenuoption=game.menuoptions.size()-2;
|
game.currentmenuoption=game.menuoptions.size()-2;
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
}else{
|
}else{
|
||||||
|
@ -569,7 +569,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[9] = true;
|
game.unlocknotify[9] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 0;
|
game.currentmenuoption = 0;
|
||||||
break;
|
break;
|
||||||
case 1: //unlock 2
|
case 1: //unlock 2
|
||||||
|
@ -577,7 +577,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[10] = true;
|
game.unlocknotify[10] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 1;
|
game.currentmenuoption = 1;
|
||||||
break;
|
break;
|
||||||
case 2: //unlock 3
|
case 2: //unlock 3
|
||||||
|
@ -585,7 +585,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[11] = true;
|
game.unlocknotify[11] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 2;
|
game.currentmenuoption = 2;
|
||||||
break;
|
break;
|
||||||
case 3: //unlock 4
|
case 3: //unlock 4
|
||||||
|
@ -593,7 +593,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[12] = true;
|
game.unlocknotify[12] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 3;
|
game.currentmenuoption = 3;
|
||||||
break;
|
break;
|
||||||
case 4: //unlock 5
|
case 4: //unlock 5
|
||||||
|
@ -601,7 +601,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[13] = true;
|
game.unlocknotify[13] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 4;
|
game.currentmenuoption = 4;
|
||||||
break;
|
break;
|
||||||
case 5: //unlock 6
|
case 5: //unlock 6
|
||||||
|
@ -609,7 +609,7 @@ void menuactionpress()
|
||||||
game.unlocknotify[14] = true;
|
game.unlocknotify[14] = true;
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenutrials);
|
game.createmenu(Menu::unlockmenutrials, true);
|
||||||
game.currentmenuoption = 5;
|
game.currentmenuoption = 5;
|
||||||
break;
|
break;
|
||||||
case 6: //back
|
case 6: //back
|
||||||
|
@ -637,7 +637,7 @@ void menuactionpress()
|
||||||
game.unlock[6] = true;
|
game.unlock[6] = true;
|
||||||
game.unlock[7] = true;
|
game.unlock[7] = true;
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenu);
|
game.createmenu(Menu::unlockmenu, true);
|
||||||
game.currentmenuoption = 1;
|
game.currentmenuoption = 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -646,7 +646,7 @@ void menuactionpress()
|
||||||
game.unlock[17] = true;
|
game.unlock[17] = true;
|
||||||
game.unlocknotify[17] = true;
|
game.unlocknotify[17] = true;
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenu);
|
game.createmenu(Menu::unlockmenu, true);
|
||||||
game.currentmenuoption = 2;
|
game.currentmenuoption = 2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -655,7 +655,7 @@ void menuactionpress()
|
||||||
game.unlock[18] = true;
|
game.unlock[18] = true;
|
||||||
game.unlocknotify[18] = true;
|
game.unlocknotify[18] = true;
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenu);
|
game.createmenu(Menu::unlockmenu, true);
|
||||||
game.currentmenuoption = 3;
|
game.currentmenuoption = 3;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -663,7 +663,7 @@ void menuactionpress()
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.stat_trinkets = 20;
|
game.stat_trinkets = 20;
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenu);
|
game.createmenu(Menu::unlockmenu, true);
|
||||||
game.currentmenuoption = 4;
|
game.currentmenuoption = 4;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
@ -672,7 +672,7 @@ void menuactionpress()
|
||||||
game.unlock[8] = true;
|
game.unlock[8] = true;
|
||||||
game.unlocknotify[8] = true;
|
game.unlocknotify[8] = true;
|
||||||
game.savestats();
|
game.savestats();
|
||||||
game.createmenu(Menu::unlockmenu);
|
game.createmenu(Menu::unlockmenu, true);
|
||||||
game.currentmenuoption = 5;
|
game.currentmenuoption = 5;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -689,7 +689,7 @@ void menuactionpress()
|
||||||
case 0:
|
case 0:
|
||||||
//next page
|
//next page
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::credits2);
|
game.createmenu(Menu::credits2, true);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -706,7 +706,7 @@ void menuactionpress()
|
||||||
case 0:
|
case 0:
|
||||||
//next page
|
//next page
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::credits25);
|
game.createmenu(Menu::credits25, true);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -723,7 +723,7 @@ void menuactionpress()
|
||||||
case 0:
|
case 0:
|
||||||
//next page
|
//next page
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::credits3);
|
game.createmenu(Menu::credits3, true);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -746,12 +746,12 @@ void menuactionpress()
|
||||||
{
|
{
|
||||||
// No more super patrons. Move to the next credits section
|
// No more super patrons. Move to the next credits section
|
||||||
game.current_credits_list_index = 0;
|
game.current_credits_list_index = 0;
|
||||||
game.createmenu(Menu::credits4);
|
game.createmenu(Menu::credits4, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// There are more super patrons. Refresh the menu with the next ones
|
// There are more super patrons. Refresh the menu with the next ones
|
||||||
game.createmenu(Menu::credits3);
|
game.createmenu(Menu::credits3, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
|
@ -777,12 +777,12 @@ void menuactionpress()
|
||||||
{
|
{
|
||||||
// No more patrons. Move to the next credits section
|
// No more patrons. Move to the next credits section
|
||||||
game.current_credits_list_index = 0;
|
game.current_credits_list_index = 0;
|
||||||
game.createmenu(Menu::credits5);
|
game.createmenu(Menu::credits5, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// There are more patrons. Refresh the menu with the next ones
|
// There are more patrons. Refresh the menu with the next ones
|
||||||
game.createmenu(Menu::credits4);
|
game.createmenu(Menu::credits4, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
|
@ -808,12 +808,12 @@ void menuactionpress()
|
||||||
{
|
{
|
||||||
// No more GitHub contributors. Move to the next credits section
|
// No more GitHub contributors. Move to the next credits section
|
||||||
game.current_credits_list_index = 0;
|
game.current_credits_list_index = 0;
|
||||||
game.createmenu(Menu::credits6);
|
game.createmenu(Menu::credits6, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// There are more GitHub contributors. Refresh the menu with the next ones
|
// There are more GitHub contributors. Refresh the menu with the next ones
|
||||||
game.createmenu(Menu::credits5);
|
game.createmenu(Menu::credits5, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
|
@ -833,7 +833,7 @@ void menuactionpress()
|
||||||
case 0:
|
case 0:
|
||||||
//first page
|
//first page
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::credits);
|
game.createmenu(Menu::credits, true);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1136,7 +1136,7 @@ void menuactionpress()
|
||||||
case Menu::unlockflipmode:
|
case Menu::unlockflipmode:
|
||||||
//back
|
//back
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::play);
|
game.createmenu(Menu::play, true);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case Menu::timetrials:
|
case Menu::timetrials:
|
||||||
|
|
Loading…
Reference in a new issue