1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01: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; game.menupage = 10;
break; break;
case 32: 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: case 33:
// Game options // Graphic options and game options
music.playef(11); music.playef(11);
game.gamestate = TITLEMODE; game.gamestate = TITLEMODE;
game.ingame_titlemode = true; game.ingame_titlemode = true;
game.createmenu(Menu::options); if (game.menupage == 32)
{
game.createmenu(Menu::graphicoptions);
}
else
{
game.createmenu(Menu::options);
}
map.nexttowercolour(); map.nexttowercolour();
// Fix delta rendering glitch // Fix delta rendering glitch