1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02:00

Consolidate common case 32/33 code

If most of the code in the cases is the same, then just consolidate and
de-duplicate them. It's less error-prone this way.
This commit is contained in:
Misa 2020-06-22 16:52:40 -07:00 committed by Ethan Lee
parent 6d7bff61b2
commit a46dd32f12

View File

@ -2106,23 +2106,19 @@ void mapmenuactionpress()
game.menupage = 10;
break;
case 32:
// Graphic options
music.playef(11);
game.gamestate = TITLEMODE;
game.ingame_titlemode = true;
game.createmenu(Menu::graphicoptions);
map.nexttowercolour();
// Fix delta rendering glitch
graphics.updatetowerbackground();
titleupdatetextcol();
break;
case 33:
// Game options
// Graphic options and game options
music.playef(11);
game.gamestate = TITLEMODE;
game.ingame_titlemode = true;
game.createmenu(Menu::options);
if (game.menupage == 32)
{
game.createmenu(Menu::graphicoptions);
}
else
{
game.createmenu(Menu::options);
}
map.nexttowercolour();
// Fix delta rendering glitch