1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 15:38:30 +02:00

Clean up of options menus for v2.3 (fixes #696)

This commit is contained in:
TerryCavanagh 2021-04-09 20:39:12 +10:30
parent d9d5cbbab2
commit eee98b0e07
5 changed files with 523 additions and 463 deletions

View File

@ -5818,17 +5818,16 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
{ {
case Menu::mainmenu: case Menu::mainmenu:
#if !defined(MAKEANDPLAY) #if !defined(MAKEANDPLAY)
option("start game"); option("play");
#endif #endif
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS)
option("player levels"); option("levels");
#endif #endif
option("graphic options"); option("options");
option("game options");
#if !defined(MAKEANDPLAY) #if !defined(MAKEANDPLAY)
option("view credits"); option("credits");
#endif #endif
option("quit game"); option("quit");
menuyoff = -10; menuyoff = -10;
maxspacing = 15; maxspacing = 15;
break; break;
@ -5948,16 +5947,31 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("ok"); option("ok");
menuyoff = -20; menuyoff = -20;
break; break;
case Menu::gameplayoptions:
#if !defined(MAKEANDPLAY)
if (ingame_titlemode && unlock[18])
#endif
{
option("flip mode");
}
option("toggle fps");
option("speedrun options");
option("advanced options");
option("clear data");
option("return");
menuyoff = -10;
maxspacing = 15;
break;
case Menu::graphicoptions: case Menu::graphicoptions:
option("toggle fullscreen"); option("toggle fullscreen");
option("scaling mode"); option("scaling mode");
option("resize to nearest", graphics.screenbuffer->isWindowed); option("resize to nearest", graphics.screenbuffer->isWindowed);
option("toggle filter"); option("toggle filter");
option("toggle analogue"); option("toggle analogue");
option("toggle fps");
option("toggle vsync"); option("toggle vsync");
option("return"); option("return");
menuyoff = -10; menuyoff = -10;
maxspacing = 15;
break; break;
case Menu::ed_settings: case Menu::ed_settings:
option("change description"); option("change description");
@ -5966,8 +5980,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("editor ghosts"); option("editor ghosts");
option("load level"); option("load level");
option("save level"); option("save level");
option("graphic options"); option("options");
option("game options");
option("quit to main menu"); option("quit to main menu");
menuyoff = -20; menuyoff = -20;
@ -5998,19 +6011,10 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
maxspacing = 15; maxspacing = 15;
break; break;
case Menu::options: case Menu::options:
option("accessibility options"); option("gameplay");
option("advanced options"); option("graphics");
#if !defined(MAKEANDPLAY) option("game pad");
if (ingame_titlemode && unlock[18]) option("accessibility");
#endif
{
option("flip mode");
}
#if !defined(MAKEANDPLAY)
option("unlock play modes");
#endif
option("game pad options");
option("clear data");
//Add extra menu for mmmmmm mod //Add extra menu for mmmmmm mod
if(music.mmmmmm){ if(music.mmmmmm){
option("soundtrack"); option("soundtrack");
@ -6018,25 +6022,36 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("return"); option("return");
menuyoff = 0; menuyoff = 0;
maxspacing = 15;
break; break;
case Menu::speedrunneroptions:
option("glitchrunner mode");
option("input delay");
option("fake load screen");
option("return");
menuyoff = 0;
maxspacing = 15;
break;
case Menu::advancedoptions: case Menu::advancedoptions:
option("toggle mouse"); option("toggle mouse");
option("unfocus pause"); option("unfocus pause");
option("fake load screen");
option("room name background"); option("room name background");
option("glitchrunner mode");
option("input delay");
option("return"); option("return");
menuyoff = 0; menuyoff = 0;
maxspacing = 15;
break; break;
case Menu::accessibility: case Menu::accessibility:
option("animated backgrounds"); #if !defined(MAKEANDPLAY)
option("unlock play modes");
#endif
option("invincibility", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
option("slowdown", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
option("animated backgrounds");
option("screen effects"); option("screen effects");
option("text outline"); option("text outline");
option("invincibility", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
option("slowdown", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
option("return"); option("return");
menuyoff = 0; menuyoff = 0;
maxspacing = 15;
break; break;
case Menu::controller: case Menu::controller:
option("analog stick sensitivity"); option("analog stick sensitivity");
@ -6045,7 +6060,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("bind menu"); option("bind menu");
option("bind restart"); option("bind restart");
option("return"); option("return");
menuyoff = 10; menuyoff = 0;
maxspacing = 10;
break; break;
case Menu::cleardatamenu: case Menu::cleardatamenu:
option("no! don't delete"); option("no! don't delete");

View File

@ -41,6 +41,8 @@ namespace Menu
ed_music, ed_music,
ed_quit, ed_quit,
options, options,
gameplayoptions,
speedrunneroptions,
advancedoptions, advancedoptions,
accessibility, accessibility,
controller, controller,

View File

@ -248,29 +248,23 @@ static void menuactionpress(void)
break; break;
#endif #endif
case OFFSET+2: case OFFSET+2:
//Options
music.playef(11);
game.createmenu(Menu::graphicoptions);
map.nexttowercolour();
break;
case OFFSET+3:
//Options //Options
music.playef(11); music.playef(11);
game.createmenu(Menu::options); game.createmenu(Menu::options);
map.nexttowercolour(); map.nexttowercolour();
break; break;
#if !defined(MAKEANDPLAY) #if !defined(MAKEANDPLAY)
case OFFSET+4: case OFFSET+3:
//Credits //Credits
music.playef(11); music.playef(11);
game.createmenu(Menu::credits); game.createmenu(Menu::credits);
map.nexttowercolour(); map.nexttowercolour();
break; break;
#else #else
#undef MPOFFSET #undef MPOFFSET
#define MPOFFSET -2 #define MPOFFSET -2
#endif #endif
case OFFSET+5: case OFFSET+4:
music.playef(11); music.playef(11);
game.createmenu(Menu::youwannaquit); game.createmenu(Menu::youwannaquit);
map.nexttowercolour(); map.nexttowercolour();
@ -442,12 +436,6 @@ static void menuactionpress(void)
game.savestatsandsettings_menu(); game.savestatsandsettings_menu();
break; break;
case 5: case 5:
//toggle 30+ fps
music.playef(11);
game.over30mode = !game.over30mode;
game.savestatsandsettings_menu();
break;
case 6:
//toggle vsync //toggle vsync
music.playef(11); music.playef(11);
#ifndef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit #ifndef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit
@ -537,6 +525,35 @@ static void menuactionpress(void)
break; break;
} }
break; break;
case Menu::speedrunneroptions:
switch (game.currentmenuoption)
{
case 0:
// Glitchrunner mode
music.playef(11);
game.glitchrunnermode = !game.glitchrunnermode;
game.savestatsandsettings_menu();
break;
case 1:
/* Input delay */
music.playef(11);
game.inputdelay = !game.inputdelay;
game.savestatsandsettings_menu();
break;
case 2:
// toggle fake load screen
game.skipfakeload = !game.skipfakeload;
game.savestatsandsettings_menu();
music.playef(11);
break;
default:
//back
music.playef(11);
game.returnmenu();
map.nexttowercolour();
break;
}
break;
case Menu::advancedoptions: case Menu::advancedoptions:
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
@ -560,29 +577,11 @@ static void menuactionpress(void)
music.playef(11); music.playef(11);
break; break;
case 2: case 2:
// toggle fake load screen
game.skipfakeload = !game.skipfakeload;
game.savestatsandsettings_menu();
music.playef(11);
break;
case 3:
// toggle translucent roomname BG // toggle translucent roomname BG
graphics.translucentroomname = !graphics.translucentroomname; graphics.translucentroomname = !graphics.translucentroomname;
game.savestatsandsettings_menu(); game.savestatsandsettings_menu();
music.playef(11); music.playef(11);
break; break;
case 4:
// Glitchrunner mode
music.playef(11);
game.glitchrunnermode = !game.glitchrunnermode;
game.savestatsandsettings_menu();
break;
case 5:
/* Input delay */
music.playef(11);
game.inputdelay = !game.inputdelay;
game.savestatsandsettings_menu();
break;
default: default:
//back //back
music.playef(11); music.playef(11);
@ -592,83 +591,163 @@ static void menuactionpress(void)
} }
break; break;
case Menu::accessibility: case Menu::accessibility:
switch (game.currentmenuoption) {
{ int accessibilityoffset = 0;
case 0: #if !defined(MAKEANDPLAY)
//disable animated backgrounds accessibilityoffset = 1;
game.colourblindmode = !game.colourblindmode; if (game.currentmenuoption == 0) {
game.savestatsandsettings_menu(); //unlock play options
graphics.towerbg.tdrawback = true; music.playef(11);
graphics.titlebg.tdrawback = true; game.createmenu(Menu::unlockmenu);
music.playef(11); map.nexttowercolour();
break; }
case 1: #endif
//disable screeneffects if (game.currentmenuoption == accessibilityoffset + 0) {
game.noflashingmode = !game.noflashingmode; //invincibility
game.savestatsandsettings_menu(); if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode))
if (!game.noflashingmode) {
{ if (!map.invincibility)
music.playef(18); {
game.screenshake = 10; game.createmenu(Menu::setinvincibility);
game.flashlight = 5; map.nexttowercolour();
}else{ }
music.playef(11); else
} {
break; map.invincibility = !map.invincibility;
case 2: game.savestatsandsettings_menu();
//disable text outline }
graphics.notextoutline = !graphics.notextoutline; music.playef(11);
game.savestatsandsettings_menu(); }
music.playef(11); else
break; {
case 3: music.playef(2);
//invincibility map.invincibility = false;
if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode)) }
{ }
if (!map.invincibility) else if (game.currentmenuoption == accessibilityoffset + 1) {
{ //change game speed
game.createmenu(Menu::setinvincibility); if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode))
map.nexttowercolour(); {
} game.createmenu(Menu::setslowdown);
else map.nexttowercolour();
{ music.playef(11);
map.invincibility = !map.invincibility; }
game.savestatsandsettings_menu(); else
} {
music.playef(11); music.playef(2);
} game.slowdown = 30;
else }
{ }
music.playef(2); else if (game.currentmenuoption == accessibilityoffset + 2) {
map.invincibility = false; //disable animated backgrounds
} game.colourblindmode = !game.colourblindmode;
break; game.savestatsandsettings_menu();
case 4: graphics.towerbg.tdrawback = true;
//change game speed graphics.titlebg.tdrawback = true;
if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode)) music.playef(11);
{ }
game.createmenu(Menu::setslowdown); else if (game.currentmenuoption == accessibilityoffset + 3) {
map.nexttowercolour(); //disable screeneffects
music.playef(11); game.noflashingmode = !game.noflashingmode;
} game.savestatsandsettings_menu();
else if (!game.noflashingmode)
{ {
music.playef(2); music.playef(18);
game.slowdown = 30; game.screenshake = 10;
} game.flashlight = 5;
break; }
case 5: else {
//back music.playef(11);
music.playef(11); }
game.returnmenu(); }
map.nexttowercolour(); else if (game.currentmenuoption == accessibilityoffset + 4) {
break; //disable text outline
default: graphics.notextoutline = !graphics.notextoutline;
//Can't do yet! play sad sound game.savestatsandsettings_menu();
music.playef(2); music.playef(11);
break; }
} else if (game.currentmenuoption == accessibilityoffset + 5) {
break; //back
music.playef(11);
game.returnmenu();
map.nexttowercolour();
}
break;
}
case Menu::gameplayoptions:
{
int gameplayoptionsoffset = 0;
#if !defined(MAKEANDPLAY)
if (game.ingame_titlemode && game.unlock[18])
#endif
{
gameplayoptionsoffset = 1;
if (game.currentmenuoption == 0) {
toggleflipmode();
// Fix wrong area music in Tower (Positive Force vs. ecroF evitisoP)
if (map.custommode)
{
break;
}
int area = map.area(game.roomx, game.roomy);
if (area == 3 || area == 11)
{
if (graphics.setflipmode)
{
music.play(9); // ecroF evitisoP
}
else
{
music.play(2); // Positive Force
}
}
}
}
if (game.currentmenuoption == gameplayoptionsoffset + 0)
{
//Toggle 30+ FPS
music.playef(11);
game.over30mode = !game.over30mode;
game.savestatsandsettings_menu();
}
else if (game.currentmenuoption == gameplayoptionsoffset + 1)
{
//Speedrunner options
music.playef(11);
game.createmenu(Menu::speedrunneroptions);
map.nexttowercolour();
}
else if (game.currentmenuoption == gameplayoptionsoffset + 2)
{
//Advanced options
music.playef(11);
game.createmenu(Menu::advancedoptions);
map.nexttowercolour();
}
else if (game.currentmenuoption == gameplayoptionsoffset + 3)
{
//Clear Data
music.playef(11);
game.createmenu(Menu::cleardatamenu);
map.nexttowercolour();
}
else if (game.currentmenuoption == gameplayoptionsoffset + 4) {
//return to previous menu
music.playef(11);
if (game.ingame_titlemode)
{
game.returntoingame();
}
else
{
game.returnmenu();
map.nexttowercolour();
}
}
break;
}
case Menu::options: case Menu::options:
{ {
#if defined(MAKEANDPLAY) #if defined(MAKEANDPLAY)
@ -687,104 +766,61 @@ static void menuactionpress(void)
int offset = 0; int offset = 0;
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
case 0: case 0:
//accessibility options //gameplay options
music.playef(11); music.playef(11);
game.createmenu(Menu::accessibility); game.createmenu(Menu::gameplayoptions);
map.nexttowercolour(); map.nexttowercolour();
break; break;
case 1: case 1:
//advanced options //graphic options
music.playef(11); music.playef(11);
game.createmenu(Menu::advancedoptions); game.createmenu(Menu::graphicoptions);
map.nexttowercolour(); map.nexttowercolour();
break; break;
case 2: case 2:
#if !defined(MAKEANDPLAY) //gamepad options
if (game.ingame_titlemode && game.unlock[18]) music.playef(11);
#endif game.createmenu(Menu::controller);
{ map.nexttowercolour();
toggleflipmode(); break;
// Fix wrong area music in Tower (Positive Force vs. ecroF evitisoP) case 3:
if (map.custommode) //accessibility options
{ music.playef(11);
break; game.createmenu(Menu::accessibility);
} map.nexttowercolour();
int area = map.area(game.roomx, game.roomy); break;
if (area == 3 || area == 11) }
{
if (graphics.setflipmode)
{
music.play(9); // ecroF evitisoP
}
else
{
music.play(2); // Positive Force
}
}
}
break;
}
offset += flipmode_offset; if (game.currentmenuoption == 4 && music.mmmmmm)
{
//**** TOGGLE MMMMMM
music.usingmmmmmm = !music.usingmmmmmm;
music.playef(11);
if (music.currentsong > -1)
{
music.play(music.currentsong);
}
game.savestatsandsettings_menu();
}
#if !defined(MAKEANDPLAY) if (game.currentmenuoption == 4 + (music.mmmmmm?1:0))
if (game.currentmenuoption == 3+offset) {
{ //Last option here is "return"
//unlock play options music.playef(11);
music.playef(11); if (game.ingame_titlemode)
game.createmenu(Menu::unlockmenu); {
map.nexttowercolour(); game.returntoingame();
} }
#endif else
{
game.returnmenu();
map.nexttowercolour();
}
}
offset += unlockmode_offset;
if (game.currentmenuoption == 4+offset)
{
//clear data menu
music.playef(11);
game.createmenu(Menu::controller);
map.nexttowercolour();
break;
}
else if (game.currentmenuoption == 5+offset)
{
//clear data menu
music.playef(11);
game.createmenu(Menu::cleardatamenu);
map.nexttowercolour();
}
else if (game.currentmenuoption == 6+offset && music.mmmmmm)
{
//**** TOGGLE MMMMMM
music.usingmmmmmm = !music.usingmmmmmm;
music.playef(11);
if (music.currentsong > -1)
{
music.play(music.currentsong);
}
game.savestatsandsettings_menu();
}
offset += mmmmmm_offset;
if (game.currentmenuoption == 7+offset)
{
//back
music.playef(11);
if (game.ingame_titlemode)
{
game.returntoingame();
}
else
{
game.returnmenu();
map.nexttowercolour();
}
}
break; break;
} }
case Menu::unlockmenutrials: case Menu::unlockmenutrials:
@ -2213,8 +2249,8 @@ void mapinput(void)
if (game.menupage == 19) game.menupage = 21; if (game.menupage == 19) game.menupage = 21;
if (game.menupage == 22) game.menupage = 20; if (game.menupage == 22) game.menupage = 20;
if (game.menupage == 29) game.menupage = 33; if (game.menupage == 29) game.menupage = 32;
if (game.menupage == 34) game.menupage = 30; if (game.menupage == 33) game.menupage = 30;
} }
} }
@ -2317,34 +2353,24 @@ static void mapmenuactionpress(void)
graphics.resumegamemode = true; graphics.resumegamemode = true;
break; break;
case 31: case 31:
// Go to quit prompt // Graphic options and game options
music.playef(11); music.playef(11);
game.menupage = 10; game.gamestate = TITLEMODE;
break; graphics.flipmode = false;
game.ingame_titlemode = true;
graphics.ingame_fademode = graphics.fademode;
graphics.fademode = 0;
// Set this before we create the menu
game.kludge_ingametemp = game.currentmenuname;
game.createmenu(Menu::options);
map.nexttowercolour();
break;
case 32: case 32:
case 33: // Go to quit prompt
// Graphic options and game options music.playef(11);
music.playef(11); game.menupage = 10;
game.gamestate = TITLEMODE; break;
graphics.flipmode = false;
game.ingame_titlemode = true;
graphics.ingame_fademode = graphics.fademode;
graphics.fademode = 0;
// Set this before we create the menu
game.kludge_ingametemp = game.currentmenuname;
if (game.menupage == 32)
{
game.createmenu(Menu::graphicoptions);
}
else
{
game.createmenu(Menu::options);
}
map.nexttowercolour();
break;
} }
} }

View File

@ -98,95 +98,122 @@ static void menurender(void)
} }
#endif #endif
case Menu::errornostart: case Menu::errornostart:
graphics.Print( -1, 65, "ERROR: This level has", tr, tg, tb, true); graphics.Print( -1, 65, "ERROR: This level has", tr, tg, tb, true);
graphics.Print( -1, 75, "no start point!", tr, tg, tb, true); graphics.Print( -1, 75, "no start point!", tr, tg, tb, true);
break; break;
case Menu::gameplayoptions:
{
int gameplayoptionsoffset = 0;
#if !defined(MAKEANDPLAY)
if (game.ingame_titlemode && game.unlock[18])
#endif
{
gameplayoptionsoffset = 1;
if (game.currentmenuoption == 0) {
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);
}
}
}
if (game.currentmenuoption == gameplayoptionsoffset + 0)
{
//Toggle FPS
graphics.bigprint(-1, 30, "Toggle 30+ FPS", tr, tg, tb, true);
graphics.Print(-1, 65, "Change whether the game", tr, tg, tb, true);
graphics.Print(-1, 75, "runs at 30 or over 30 FPS.", tr, tg, tb, true);
if (!game.over30mode)
{
graphics.Print(-1, 95, "Current mode: 30 FPS", tr / 2, tg / 2, tb / 2, true);
}
else
{
graphics.Print(-1, 95, "Current mode: Over 30 FPS", tr, tg, tb, true);
}
break;
}
else if (game.currentmenuoption == gameplayoptionsoffset + 1)
{
//Speedrunner options
graphics.bigprint(-1, 30, "Speedrunner Options", tr, tg, tb, true);
graphics.Print(-1, 65, "Access some advanced settings that", tr, tg, tb, true);
graphics.Print(-1, 75, "might be of interest to speedrunners", tr, tg, tb, true);
}
else if (game.currentmenuoption == gameplayoptionsoffset + 2)
{
//Advanced options
graphics.bigprint(-1, 30, "Advanced Options", tr, tg, tb, true);
graphics.Print(-1, 65, "All other settings", tr, tg, tb, true);
}
else if (game.currentmenuoption == gameplayoptionsoffset + 3)
{
//Clear Data
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 Menu::options: case Menu::options:
{ {
#if defined(MAKEANDPLAY) #if defined(MAKEANDPLAY)
int flipmode_offset = 0; int flipmode_offset = 0;
#else #else
int flipmode_offset = game.ingame_titlemode && game.unlock[18] ? 0 : -1; int flipmode_offset = game.ingame_titlemode && game.unlock[18] ? 0 : -1;
#endif #endif
#if defined(MAKEANDPLAY) #if defined(MAKEANDPLAY)
int unlockmode_offset = -1; int unlockmode_offset = -1;
#else #else
int unlockmode_offset = 0; int unlockmode_offset = 0;
#endif #endif
int offset = 0; int offset = 0;
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
case 0: case 0:
graphics.bigprint( -1, 30, "Accessibility", tr, tg, tb, true); graphics.bigprint(-1, 30, "Gameplay Options", tr, tg, tb, true);
graphics.Print( -1, 65, "Disable screen effects, enable", tr, tg, tb, true); graphics.Print(-1, 65, "Adjust various gameplay options", tr, tg, tb, true);
graphics.Print( -1, 75, "slowdown modes or invincibility", tr, tg, tb, true); break;
break; case 1:
case 1: graphics.bigprint(-1, 30, "Graphics Options", tr, tg, tb, true);
graphics.bigprint( -1, 30, "Advanced Options", tr, tg, tb, true); graphics.Print(-1, 65, "Adjust screen settings", tr, tg, tb, true);
graphics.Print( -1, 65, "Hide the mouse cursor, remove", tr, tg, tb, true); break;
graphics.Print( -1, 75, "the loading screen, turn on", tr, tg, tb, true); case 2:
graphics.Print( -1, 85, "glitchrunner mode and more", tr, tg, tb, true); graphics.bigprint(-1, 30, "Game Pad Options", tr, tg, tb, true);
break; graphics.Print(-1, 65, "Rebind your controller's buttons", tr, tg, tb, true);
case 2: graphics.Print(-1, 75, "and adjust sensitivity", tr, tg, tb, true);
#if !defined(MAKEANDPLAY) break;
if (game.ingame_titlemode && game.unlock[18]) case 3:
#endif graphics.bigprint(-1, 30, "Accessibility", tr, tg, tb, true);
{ graphics.Print(-1, 65, "Disable screen effects, enable", tr, tg, tb, true);
graphics.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true); graphics.Print(-1, 75, "slowdown modes or invincibility", tr, tg, tb, true);
graphics.Print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true); break;
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 (game.currentmenuoption == 4 && music.mmmmmm)
{
#if !defined(MAKEANDPLAY) graphics.bigprint(-1, 30, "Soundtrack", tr, tg, tb, true);
if (game.currentmenuoption == 3+offset) graphics.Print(-1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true);
{ if (music.usingmmmmmm) {
graphics.bigprint( -1, 30, "Unlock Play Modes", tr, tg, tb, true); graphics.Print(-1, 85, "Current soundtrack: MMMMMM", 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); else {
} graphics.Print(-1, 85, "Current soundtrack: PPPPPP", tr, tg, tb, true);
#endif }
}
offset += unlockmode_offset; break;
}
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);
}
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);
}
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;
}
break;
}
case Menu::graphicoptions: case Menu::graphicoptions:
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
@ -252,20 +279,6 @@ static void menurender(void)
graphics.Print( -1, 85, "adjust the picture.", tr, tg, tb, true); graphics.Print( -1, 85, "adjust the picture.", tr, tg, tb, true);
break; break;
case 5: case 5:
graphics.bigprint(-1, 30, "Toggle 30+ FPS", tr, tg, tb, true);
graphics.Print(-1, 65, "Change whether the game", tr, tg, tb, true);
graphics.Print(-1, 75, "runs at 30 or over 30 FPS.", tr, tg, tb, true);
if (!game.over30mode)
{
graphics.Print(-1, 95, "Current mode: 30 FPS", tr/2, tg/2, tb/2, true);
}
else
{
graphics.Print(-1, 95, "Current mode: Over 30 FPS", tr, tg, tb, true);
}
break;
case 6:
graphics.bigprint(-1, 30, "Toggle VSync", tr, tg, tb, true); graphics.bigprint(-1, 30, "Toggle VSync", tr, tg, tb, true);
#ifdef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit #ifdef __HAIKU__ // FIXME: Remove after SDL VSync bug is fixed! -flibit
graphics.Print(-1, 65, "Edit the config file on Haiku!", tr, tg, tb, true); graphics.Print(-1, 65, "Edit the config file on Haiku!", tr, tg, tb, true);
@ -462,6 +475,44 @@ static void menurender(void)
break; break;
case Menu::speedrunneroptions:
switch (game.currentmenuoption)
{
case 0:
graphics.bigprint(-1, 30, "Glitchrunner Mode", tr, tg, tb, true);
graphics.Print(-1, 65, "Re-enable glitches that existed", tr, tg, tb, true);
graphics.Print(-1, 75, "in previous versions of the game.", tr, tg, tb, true);
if (game.glitchrunnermode)
{
graphics.Print(-1, 95, "Glitchrunner mode is ON", tr, tg, tb, true);
}
else
{
graphics.Print(-1, 95, "Glitchrunner mode is OFF", tr / 2, tg / 2, tb / 2, true);
}
break;
case 1:
graphics.bigprint(-1, 30, "Input Delay", tr, tg, tb, true);
graphics.Print(-1, 65, "Re-enable the 1-frame input delay", tr, tg, tb, true);
graphics.Print(-1, 75, "from previous versions of the game.", tr, tg, tb, true);
if (game.inputdelay)
{
graphics.Print(-1, 95, "Input delay is ON", tr, tg, tb, true);
}
else
{
graphics.Print(-1, 95, "Input delay is OFF", tr / 2, tg / 2, tb / 2, true);
}
break;
case 2:
graphics.bigprint(-1, 30, "Fake Load Screen", tr, tg, tb, true);
if (game.skipfakeload)
graphics.Print(-1, 65, "Fake loading screen is OFF", tr / 2, tg / 2, tb / 2, true);
else
graphics.Print(-1, 65, "Fake loading screen is ON", tr, tg, tb, true);
break;
}
break;
case Menu::advancedoptions: case Menu::advancedoptions:
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
@ -490,13 +541,6 @@ static void menurender(void)
} }
break; break;
case 2: case 2:
graphics.bigprint(-1, 30, "Fake Load Screen", tr, tg, tb, true);
if (game.skipfakeload)
graphics.Print(-1, 65, "Fake loading screen is OFF", tr/2, tg/2, tb/2, true);
else
graphics.Print(-1, 65, "Fake loading screen is ON", tr, tg, tb, true);
break;
case 3:
graphics.bigprint(-1, 30, "Room Name BG", tr, tg, tb, true); graphics.bigprint(-1, 30, "Room Name BG", tr, tg, tb, true);
graphics.Print( -1, 65, "Lets you see through what is behind", tr, tg, tb, true); graphics.Print( -1, 65, "Lets you see through what is behind", tr, tg, tb, true);
graphics.Print( -1, 75, "the name at the bottom of the screen.", tr, tg, tb, true); graphics.Print( -1, 75, "the name at the bottom of the screen.", tr, tg, tb, true);
@ -505,92 +549,74 @@ static void menurender(void)
else else
graphics.Print(-1, 95, "Room name background is OPAQUE", tr, tg, tb, true); graphics.Print(-1, 95, "Room name background is OPAQUE", tr, tg, tb, true);
break; break;
case 4:
graphics.bigprint( -1, 30, "Glitchrunner Mode", tr, tg, tb, true);
graphics.Print( -1, 65, "Re-enable glitches that existed", tr, tg, tb, true);
graphics.Print( -1, 75, "in previous versions of the game.", tr, tg, tb, true);
if (game.glitchrunnermode)
{
graphics.Print( -1, 95, "Glitchrunner mode is ON", tr, tg, tb, true);
}
else
{
graphics.Print( -1, 95, "Glitchrunner mode is OFF", tr/2, tg/2, tb/2, true);
}
break;
case 5:
graphics.bigprint(-1, 30, "Input Delay", tr, tg, tb, true);
graphics.Print(-1, 65, "Re-enable the 1-frame input delay", tr, tg, tb, true);
graphics.Print(-1, 75, "from previous versions of the game.", tr, tg, tb, true);
if (game.inputdelay)
{
graphics.Print(-1, 95, "Input delay is ON", tr, tg, tb, true);
}
else
{
graphics.Print(-1, 95, "Input delay is OFF", tr/2, tg/2, tb/2, true);
}
break;
} }
break; break;
case Menu::accessibility: case Menu::accessibility:
switch (game.currentmenuoption) {
{ int accessibilityoffset = 0;
case 0: #if !defined(MAKEANDPLAY)
graphics.bigprint( -1, 40, "Backgrounds", tr, tg, tb, true); accessibilityoffset = 1;
if (!game.colourblindmode) if (game.currentmenuoption == 0) {
{ graphics.bigprint(-1, 30, "Unlock Play Modes", tr, tg, tb, true);
graphics.Print( -1, 75, "Backgrounds are ON.", 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);
else }
{ #endif
graphics.Print( -1, 75, "Backgrounds are OFF.", tr/2, tg/2, tb/2, true); if (game.currentmenuoption == accessibilityoffset + 0) {
} graphics.bigprint(-1, 40, "Invincibility", tr, tg, tb, true);
break; graphics.Print(-1, 75, "Explore the game freely without", tr, tg, tb, true);
case 1: graphics.Print(-1, 85, "dying. (Can cause glitches.)", tr, tg, tb, true);
graphics.bigprint( -1, 40, "Screen Effects", tr, tg, tb, true); if (map.invincibility)
graphics.Print( -1, 75, "Disables screen shakes and flashes.", tr, tg, tb, true); {
if (!game.noflashingmode) graphics.Print(-1, 105, "Invincibility is ON.", tr, tg, tb, true);
{ }
graphics.Print( -1, 85, "Screen Effects are ON.", tr, tg, tb, true); else
} {
else graphics.Print(-1, 105, "Invincibility is OFF.", tr / 2, tg / 2, tb / 2, true);
{ }
graphics.Print( -1, 85, "Screen Effects are OFF.", tr/2, tg/2, tb/2, true); }else if (game.currentmenuoption == accessibilityoffset + 1) {
} graphics.bigprint(-1, 40, "Slowdown", tr, tg, tb, true);
break; graphics.Print(-1, 75, "Reduce the game speed.", tr, tg, tb, true);
case 2: drawslowdowntext();
graphics.bigprint( -1, 40, "Text Outline", tr, tg, tb, true); }
graphics.Print( -1, 75, "Disables outline on game text.", tr, tg, tb, true); else if (game.currentmenuoption == accessibilityoffset + 2) {
// FIXME: Maybe do an outlined print instead? -flibit graphics.bigprint(-1, 40, "Backgrounds", tr, tg, tb, true);
if (!graphics.notextoutline) if (!game.colourblindmode)
{ {
graphics.Print( -1, 85, "Text outlines are ON.", tr, tg, tb, true); graphics.Print(-1, 75, "Backgrounds are ON.", tr, tg, tb, true);
} }
else else
{ {
graphics.Print( -1, 85, "Text outlines are OFF.", tr/2, tg/2, tb/2, true); graphics.Print(-1, 75, "Backgrounds are OFF.", tr / 2, tg / 2, tb / 2, true);
} }
break; }
case 3: else if (game.currentmenuoption == accessibilityoffset + 3) {
graphics.bigprint( -1, 40, "Invincibility", tr, tg, tb, true); graphics.bigprint(-1, 40, "Screen Effects", tr, tg, tb, true);
graphics.Print( -1, 75, "Explore the game freely without", tr, tg, tb, true); graphics.Print(-1, 75, "Disables screen shakes and flashes.", tr, tg, tb, true);
graphics.Print( -1, 85, "dying. (Can cause glitches.)", tr, tg, tb, true); if (!game.noflashingmode)
if (map.invincibility) {
{ graphics.Print(-1, 85, "Screen Effects are ON.", tr, tg, tb, true);
graphics.Print( -1, 105, "Invincibility is ON.", tr, tg, tb, true); }
} else
else {
{ graphics.Print(-1, 85, "Screen Effects are OFF.", tr / 2, tg / 2, tb / 2, true);
graphics.Print( -1, 105, "Invincibility is OFF.", tr/2, tg/2, tb/2, true); }
} }
break; else if (game.currentmenuoption == accessibilityoffset + 4) {
case 4: graphics.bigprint(-1, 40, "Text Outline", tr, tg, tb, true);
graphics.bigprint( -1, 40, "Game Speed", tr, tg, tb, true); graphics.Print(-1, 75, "Disables outline on game text.", tr, tg, tb, true);
graphics.Print( -1, 75, "Reduce the game speed.", tr, tg, tb, true); // FIXME: Maybe do an outlined print instead? -flibit
drawslowdowntext(); if (!graphics.notextoutline)
} {
break; graphics.Print(-1, 85, "Text outlines are ON.", tr, tg, tb, true);
}
else
{
graphics.Print(-1, 85, "Text outlines are OFF.", tr / 2, tg / 2, tb / 2, true);
}
}
break;
}
case Menu::playint1: case Menu::playint1:
case Menu::playint2: case Menu::playint2:
graphics.Print( -1, 65, "Who do you want to play", tr, tg, tb, true); graphics.Print( -1, 65, "Who do you want to play", tr, tg, tb, true);
@ -1804,9 +1830,8 @@ void maprender(void)
{ {
#define OPTION(opt, text) graphics.map_option(opt, 4, text, game.menupage - 30 == opt) #define OPTION(opt, text) graphics.map_option(opt, 4, text, game.menupage - 30 == opt)
OPTION(0, "return to game"); OPTION(0, "return to game");
OPTION(1, "quit to menu"); OPTION(1, "options");
OPTION(2, "graphic options"); OPTION(2, "quit to menu");
OPTION(3, "game options");
#undef OPTION #undef OPTION
} }

View File

@ -3885,22 +3885,13 @@ static void editormenuactionpress(void)
graphics.backgrounddrawn=false; graphics.backgrounddrawn=false;
break; break;
case 6: case 6:
case 7: /* 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.ingame_editormode = true; game.ingame_editormode = true;
if (game.currentmenuoption == 6) DEFER_CALLBACK(creategameoptions);
{
DEFER_CALLBACK(creategraphicoptions);
}
else
{
DEFER_CALLBACK(creategameoptions);
}
DEFER_CALLBACK(nextbgcolor); DEFER_CALLBACK(nextbgcolor);
break; break;
default: default: