Follower Horn cvar on Sounds Options

- Visible if any Followers unlocked OR Online mode is unlocked
- Also, re-organise the menu to put the user preferences into another dropdownable box
This commit is contained in:
toaster 2024-03-27 19:50:40 +00:00
parent 21156768d9
commit 5971b4af04
3 changed files with 33 additions and 2 deletions

View file

@ -385,8 +385,10 @@ typedef enum
sopt_sfxvolume, sopt_sfxvolume,
sopt_musicvolume, sopt_musicvolume,
sopt_spacer1, sopt_spacer1,
sopt_preferences,
sopt_chatnotifs, sopt_chatnotifs,
sopt_charvoices, sopt_charvoices,
sopt_followhorns,
sopt_attackmusic, sopt_attackmusic,
sopt_spacer2, sopt_spacer2,
sopt_advanced, sopt_advanced,

View file

@ -5,6 +5,7 @@
#include "../k_menu.h" #include "../k_menu.h"
#include "../k_grandprix.h" // K_CanChangeRules #include "../k_grandprix.h" // K_CanChangeRules
#include "../m_cond.h" // Condition Sets #include "../m_cond.h" // Condition Sets
#include "../k_follower.h"
#include "../s_sound.h" #include "../s_sound.h"
// options menu -- see mopt_e // options menu -- see mopt_e
@ -96,6 +97,7 @@ void M_InitOptions(INT32 choice)
(M_SecretUnlocked(SECRET_ENCORE, false) ? (IT_STRING | IT_CVAR) : IT_DISABLED); (M_SecretUnlocked(SECRET_ENCORE, false) ? (IT_STRING | IT_CVAR) : IT_DISABLED);
} }
// Data Options
OPTIONS_DataAdvancedDef.menuitems[daopt_addon].status = (M_SecretUnlocked(SECRET_ADDONS, true) OPTIONS_DataAdvancedDef.menuitems[daopt_addon].status = (M_SecretUnlocked(SECRET_ADDONS, true)
? (IT_STRING | IT_SUBMENU) ? (IT_STRING | IT_SUBMENU)
: (IT_NOTHING | IT_SPACE)); : (IT_NOTHING | IT_SPACE));

View file

@ -210,8 +210,29 @@ void tick_routine(void)
void init_routine(void) void init_routine(void)
{ {
OPTIONS_Sound[sopt_followhorns].status = IT_SECRET;
OPTIONS_Sound[sopt_attackmusic].status = IT_SECRET; OPTIONS_Sound[sopt_attackmusic].status = IT_SECRET;
// We show a kindness. If you have online available,
// even if you haven't found a single Follower, you
// should be able to turn off other people's horns.
bool allow = M_SecretUnlocked(SECRET_ONLINE, true);
if (!allow)
{
UINT16 j;
for (j = 0; j < numfollowers; j++)
{
if (!K_FollowerUsable(j))
continue;
allow = true;
break;
}
}
if (allow)
OPTIONS_Sound[sopt_followhorns].status = IT_STRING | IT_CVAR;
if (M_SecretUnlocked(SECRET_TIMEATTACK, true) || if (M_SecretUnlocked(SECRET_TIMEATTACK, true) ||
M_SecretUnlocked(SECRET_PRISONBREAK, true) || M_SecretUnlocked(SECRET_PRISONBREAK, true) ||
M_SecretUnlocked(SECRET_SPECIALATTACK, true)) M_SecretUnlocked(SECRET_SPECIALATTACK, true))
@ -252,16 +273,22 @@ menuitem_t OPTIONS_Sound[] =
{IT_SPACE | IT_NOTHING, NULL, NULL, {IT_SPACE | IT_NOTHING, NULL, NULL,
NULL, {NULL}, 0, 0}, NULL, {NULL}, 0, 0},
{IT_HEADER, "Preferences...", NULL,
NULL, {NULL}, 0, 0},
{IT_STRING | IT_CVAR, "Chat Notifications", "Play a sound effect when chat messages appear.", {IT_STRING | IT_CVAR, "Chat Notifications", "Play a sound effect when chat messages appear.",
NULL, {.cvar = &cv_chatnotifications}, 0, 0}, NULL, {.cvar = &cv_chatnotifications}, 0, 0},
{IT_STRING | IT_CVAR, "Character Voices", "How often to play character voices in a race.", {IT_STRING | IT_CVAR, "Character Voices", "How often to play character voices in a round.",
NULL, {.cvar = &cv_kartvoices}, 0, 0}, NULL, {.cvar = &cv_kartvoices}, 0, 0},
{IT_STRING | IT_CVAR, "Follower Horns", "How often to play follower horns in a round.",
NULL, {.cvar = &cv_karthorns}, 0, 0},
{IT_STRING | IT_CVAR, "Continuous Attack Music", "Keep music playing seamlessly when retrying in Attack modes.", {IT_STRING | IT_CVAR, "Continuous Attack Music", "Keep music playing seamlessly when retrying in Attack modes.",
NULL, {.cvar = &cv_continuousmusic}, 0, 0}, NULL, {.cvar = &cv_continuousmusic}, 0, 0},
{IT_SPACE | IT_NOTHING, NULL, NULL, {IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
NULL, {NULL}, 0, 0}, NULL, {NULL}, 0, 0},
{IT_HEADER, "Advanced...", NULL, {IT_HEADER, "Advanced...", NULL,