Add Flip Mode to game options if in M&P or in-game menu and unlocked

Flip Mode will now be in the game options menu if either:
 (1) You're playing the M&P version.
 (2) You have it unlocked and you came here from the in-game pause
     screen.

This is because if you're playing M&P, you'd have to close the game,
edit unlock.vvv, and re-launch the game to toggle Flip Mode, since
there's no other way to do so. And if you're playing the full version,
you'd have to save and exit your session in order to toggle Flip Mode.
This commit is contained in:
Misa
2020-06-29 20:45:57 -07:00
committed by Ethan Lee
parent 7ce4f1173d
commit 2c18d28880
3 changed files with 113 additions and 30 deletions

View File

@@ -75,12 +75,21 @@ void menurender()
graphics.Print( -1, 75, "no start point!", tr, tg, tb, true);
break;
case Menu::options:
{
#if defined(MAKEANDPLAY)
#define OFFSET -1
int flipmode_offset = 0;
#else
#define OFFSET 0
int flipmode_offset = game.ingame_titlemode && game.unlock[18] ? 0 : -1;
#endif
#if defined(MAKEANDPLAY)
int unlockmode_offset = -1;
#else
int unlockmode_offset = 0;
#endif
int offset = 0;
switch (game.currentmenuoption)
{
case 0:
@@ -101,37 +110,63 @@ void menurender()
graphics.Print( -1, 95, "Glitchrunner mode is OFF", tr/2, tg/2, tb/2, true);
}
break;
#if !defined(MAKEANDPLAY)
case 2:
#if !defined(MAKEANDPLAY)
if (game.ingame_titlemode && game.unlock[18])
#endif
{
graphics.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true);
graphics.Print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true);
if (graphics.setflipmode)
{
graphics.Print( -1, 85, "Currently ENABLED!", tr, tg, tb, true);
}
else
{
graphics.Print( -1, 85, "Currently Disabled.", tr/2, tg/2, tb/2, true);
}
}
break;
}
offset += flipmode_offset;
#if !defined(MAKEANDPLAY)
if (game.currentmenuoption == 3+offset)
{
graphics.bigprint( -1, 30, "Unlock Play Modes", tr, tg, tb, true);
graphics.Print( -1, 65, "Unlock parts of the game normally", tr, tg, tb, true);
graphics.Print( -1, 75, "unlocked as you progress", tr, tg, tb, true);
break;
}
#endif
case OFFSET+3:
offset += unlockmode_offset;
if (game.currentmenuoption == 4+offset)
{
graphics.bigprint( -1, 30, "Game Pad Options", tr, tg, tb, true);
graphics.Print( -1, 65, "Rebind your controller's buttons", tr, tg, tb, true);
graphics.Print( -1, 75, "and adjust sensitivity", tr, tg, tb, true);
break;
case OFFSET+4:
}
else if (game.currentmenuoption == 5+offset)
{
graphics.bigprint( -1, 30, "Clear Data", tr, tg, tb, true);
graphics.Print( -1, 65, "Delete your save data", tr, tg, tb, true);
graphics.Print( -1, 75, "and unlocked play modes", tr, tg, tb, true);
break;
case OFFSET+5:
if(music.mmmmmm){
graphics.bigprint( -1, 30, "Soundtrack", tr, tg, tb, true);
graphics.Print( -1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true);
if(music.usingmmmmmm){
graphics.Print( -1, 85, "Current soundtrack: MMMMMM", tr, tg, tb, true);
}else{
graphics.Print( -1, 85, "Current soundtrack: PPPPPP", tr, tg, tb, true);
}
}
else if (game.currentmenuoption == 6+offset && music.mmmmmm)
{
graphics.bigprint( -1, 30, "Soundtrack", tr, tg, tb, true);
graphics.Print( -1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true);
if(music.usingmmmmmm){
graphics.Print( -1, 85, "Current soundtrack: MMMMMM", tr, tg, tb, true);
}else{
graphics.Print( -1, 85, "Current soundtrack: PPPPPP", tr, tg, tb, true);
}
break;
}
#undef OFFSET
break;
}
case Menu::graphicoptions:
switch (game.currentmenuoption)
{
@@ -552,6 +587,7 @@ void menurender()
}
break;
case 3:
// WARNING: Partially duplicated in Menu::options
graphics.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true);
graphics.Print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true);
graphics.Print( -1, 75, "Compatible with other game modes.", tr, tg, tb, true);