mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-03 15:39:46 +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:
|
case Menu::options:
|
||||||
option("gameplay");
|
option("gameplay");
|
||||||
option("graphics");
|
option("graphics");
|
||||||
|
option("audio");
|
||||||
option("game pad");
|
option("game pad");
|
||||||
option("accessibility");
|
option("accessibility");
|
||||||
//Add extra menu for mmmmmm mod
|
|
||||||
if(music.mmmmmm){
|
|
||||||
option("soundtrack");
|
|
||||||
}
|
|
||||||
|
|
||||||
option("return");
|
option("return");
|
||||||
menuyoff = 0;
|
menuyoff = 0;
|
||||||
maxspacing = 15;
|
maxspacing = 15;
|
||||||
|
@ -6058,6 +6054,17 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||||
menuyoff = 0;
|
menuyoff = 0;
|
||||||
maxspacing = 15;
|
maxspacing = 15;
|
||||||
break;
|
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:
|
case Menu::accessibility:
|
||||||
#if !defined(MAKEANDPLAY)
|
#if !defined(MAKEANDPLAY)
|
||||||
option("unlock play modes");
|
option("unlock play modes");
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace Menu
|
||||||
gameplayoptions,
|
gameplayoptions,
|
||||||
speedrunneroptions,
|
speedrunneroptions,
|
||||||
advancedoptions,
|
advancedoptions,
|
||||||
|
audiooptions,
|
||||||
accessibility,
|
accessibility,
|
||||||
controller,
|
controller,
|
||||||
cleardatamenu,
|
cleardatamenu,
|
||||||
|
|
|
@ -750,34 +750,25 @@ static void menuactionpress(void)
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
/* Audio options */
|
||||||
|
music.playef(11);
|
||||||
|
game.createmenu(Menu::audiooptions);
|
||||||
|
map.nexttowercolour();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
//gamepad options
|
//gamepad options
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::controller);
|
game.createmenu(Menu::controller);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
//accessibility options
|
//accessibility options
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
game.createmenu(Menu::accessibility);
|
game.createmenu(Menu::accessibility);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
|
/* Return */
|
||||||
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"
|
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
if (game.ingame_titlemode)
|
if (game.ingame_titlemode)
|
||||||
{
|
{
|
||||||
|
@ -788,8 +779,41 @@ static void menuactionpress(void)
|
||||||
game.returnmenu();
|
game.returnmenu();
|
||||||
map.nexttowercolour();
|
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;
|
break;
|
||||||
case Menu::unlockmenutrials:
|
case Menu::unlockmenutrials:
|
||||||
switch (game.currentmenuoption)
|
switch (game.currentmenuoption)
|
||||||
|
|
|
@ -175,28 +175,24 @@ static void menurender(void)
|
||||||
graphics.Print(-1, 65, "Adjust screen settings", tr, tg, tb, true);
|
graphics.Print(-1, 65, "Adjust screen settings", tr, tg, tb, true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
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.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, 65, "Rebind your controller's buttons", tr, tg, tb, true);
|
||||||
graphics.Print(-1, 75, "and adjust sensitivity", tr, tg, tb, true);
|
graphics.Print(-1, 75, "and adjust sensitivity", tr, tg, tb, true);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 4:
|
||||||
graphics.bigprint(-1, 30, "Accessibility", tr, tg, tb, true);
|
graphics.bigprint(-1, 30, "Accessibility", tr, tg, tb, true);
|
||||||
graphics.Print(-1, 65, "Disable screen effects, enable", 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);
|
graphics.Print(-1, 75, "slowdown modes or invincibility", tr, tg, tb, true);
|
||||||
break;
|
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;
|
break;
|
||||||
case Menu::graphicoptions:
|
case Menu::graphicoptions:
|
||||||
switch (game.currentmenuoption)
|
switch (game.currentmenuoption)
|
||||||
|
@ -281,6 +277,44 @@ static void menurender(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
case Menu::credits:
|
||||||
graphics.Print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true);
|
graphics.Print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true);
|
||||||
graphics.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2);
|
graphics.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2);
|
||||||
|
|
Loading…
Reference in a new issue