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:
Misa
2021-04-11 15:18:35 -07:00
committed by Ethan Lee
parent 5133d58777
commit 2a3f17f1f7
4 changed files with 102 additions and 36 deletions

View File

@@ -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);