mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-31 22:19:44 +01:00
Add audio category to options menu
The audio category contains the MMMMMM soundtrack option, as well as stubs for the soon-to-be-implemented volume slider options.
This commit is contained in:
parent
5133d58777
commit
2a3f17f1f7
4 changed files with 102 additions and 36 deletions
|
@ -6031,13 +6031,9 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
case Menu::options:
|
||||
option("gameplay");
|
||||
option("graphics");
|
||||
option("audio");
|
||||
option("game pad");
|
||||
option("accessibility");
|
||||
//Add extra menu for mmmmmm mod
|
||||
if(music.mmmmmm){
|
||||
option("soundtrack");
|
||||
}
|
||||
|
||||
option("return");
|
||||
menuyoff = 0;
|
||||
maxspacing = 15;
|
||||
|
@ -6058,6 +6054,17 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
menuyoff = 0;
|
||||
maxspacing = 15;
|
||||
break;
|
||||
case Menu::audiooptions:
|
||||
option("music volume");
|
||||
option("sound volume");
|
||||
if (music.mmmmmm)
|
||||
{
|
||||
option("soundtrack");
|
||||
}
|
||||
option("return");
|
||||
menuyoff = 0;
|
||||
maxspacing = 15;
|
||||
break;
|
||||
case Menu::accessibility:
|
||||
#if !defined(MAKEANDPLAY)
|
||||
option("unlock play modes");
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace Menu
|
|||
gameplayoptions,
|
||||
speedrunneroptions,
|
||||
advancedoptions,
|
||||
audiooptions,
|
||||
accessibility,
|
||||
controller,
|
||||
cleardatamenu,
|
||||
|
|
|
@ -750,34 +750,25 @@ static void menuactionpress(void)
|
|||
map.nexttowercolour();
|
||||
break;
|
||||
case 2:
|
||||
/* Audio options */
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::audiooptions);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 3:
|
||||
//gamepad options
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::controller);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
//accessibility options
|
||||
music.playef(11);
|
||||
game.createmenu(Menu::accessibility);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
}
|
||||
|
||||
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 (game.currentmenuoption == 4 + (music.mmmmmm?1:0))
|
||||
{
|
||||
//Last option here is "return"
|
||||
default:
|
||||
/* Return */
|
||||
music.playef(11);
|
||||
if (game.ingame_titlemode)
|
||||
{
|
||||
|
@ -788,8 +779,41 @@ static void menuactionpress(void)
|
|||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Menu::audiooptions:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
/* Not implemented */
|
||||
break;
|
||||
case 1:
|
||||
/* Not implemented */
|
||||
break;
|
||||
case 2:
|
||||
if (!music.mmmmmm)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* Toggle MMMMMM */
|
||||
music.usingmmmmmm = !music.usingmmmmmm;
|
||||
music.playef(11);
|
||||
if (music.currentsong > -1)
|
||||
{
|
||||
music.play(music.currentsong);
|
||||
}
|
||||
game.savestatsandsettings_menu();
|
||||
break;
|
||||
}
|
||||
|
||||
if (game.currentmenuoption == 2 + (int) music.mmmmmm)
|
||||
{
|
||||
/* Return */
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
}
|
||||
break;
|
||||
case Menu::unlockmenutrials:
|
||||
switch (game.currentmenuoption)
|
||||
|
|
|
@ -175,28 +175,24 @@ static void menurender(void)
|
|||
graphics.Print(-1, 65, "Adjust screen settings", tr, tg, tb, true);
|
||||
break;
|
||||
case 2:
|
||||
graphics.bigprint(-1, 30, "Audio Options", tr, tg, tb, true);
|
||||
graphics.Print(-1, 65, "Adjust volume settings", tr, tg, tb, true);
|
||||
if (music.mmmmmm)
|
||||
{
|
||||
graphics.Print(-1, 75, "and soundtrack", tr, tg, tb, true);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
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 3:
|
||||
case 4:
|
||||
graphics.bigprint(-1, 30, "Accessibility", tr, tg, tb, true);
|
||||
graphics.Print(-1, 65, "Disable screen effects, enable", tr, tg, tb, true);
|
||||
graphics.Print(-1, 75, "slowdown modes or invincibility", tr, tg, tb, true);
|
||||
break;
|
||||
}
|
||||
|
||||
if (game.currentmenuoption == 4 && 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;
|
||||
case Menu::graphicoptions:
|
||||
switch (game.currentmenuoption)
|
||||
|
@ -281,6 +277,44 @@ static void menurender(void)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case Menu::audiooptions:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
/* Not implemented */
|
||||
break;
|
||||
case 1:
|
||||
/* Not implemented */
|
||||
break;
|
||||
case 2:
|
||||
if (!music.mmmmmm)
|
||||
{
|
||||
break;
|
||||
}
|
||||
{
|
||||
/* Screen width 40 chars, 4 per char */
|
||||
char buffer[160 + 1];
|
||||
char soundtrack[6 + 1];
|
||||
char letter;
|
||||
if (music.usingmmmmmm)
|
||||
{
|
||||
letter = 'M';
|
||||
}
|
||||
else
|
||||
{
|
||||
letter = 'P';
|
||||
}
|
||||
VVV_fillstring(soundtrack, sizeof(soundtrack), letter);
|
||||
SDL_snprintf(buffer, sizeof(buffer), "Current soundtrack: %s", soundtrack);
|
||||
|
||||
graphics.bigprint(-1, 30, "Soundtrack", tr, tg, tb, true);
|
||||
graphics.Print(-1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true);
|
||||
graphics.Print(-1, 85, buffer, tr, tg, tb, true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case Menu::credits:
|
||||
graphics.Print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true);
|
||||
graphics.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2);
|
||||
|
|
Loading…
Reference in a new issue