Rename the "cdvolume" functions to "cdenable"

Historicaly this functions were used to adjust the cd music volume. In
YQ2 they were converted to enable or disable the cd music. Change their
name to match their current purpose.
This commit is contained in:
Yamagi Burmeister 2014-10-25 09:31:44 +02:00
parent b546fda341
commit 4d5cb5686d
1 changed files with 12 additions and 12 deletions

View File

@ -986,7 +986,7 @@ static menulist_s s_options_lookstrafe_box;
static menulist_s s_options_crosshair_box; static menulist_s s_options_crosshair_box;
static menuslider_s s_options_sfxvolume_slider; static menuslider_s s_options_sfxvolume_slider;
#ifdef CDA #ifdef CDA
static menulist_s s_options_cdvolume_box; static menulist_s s_options_enablecd_box;
#endif #endif
#if defined(OGG) || defined(CDA) #if defined(OGG) || defined(CDA)
static menulist_s s_options_cdshuffle_box; static menulist_s s_options_cdshuffle_box;
@ -1049,7 +1049,7 @@ ControlsSetMenuItemValues(void)
s_options_sfxvolume_slider.curvalue = Cvar_VariableValue("s_volume") * 10; s_options_sfxvolume_slider.curvalue = Cvar_VariableValue("s_volume") * 10;
#ifdef CDA #ifdef CDA
s_options_cdvolume_box.curvalue = (Cvar_VariableValue("cd_nocd") == 0); s_options_enablecd_box.curvalue = (Cvar_VariableValue("cd_nocd") == 0);
#endif #endif
#if defined(OGG) || defined(CDA) #if defined(OGG) || defined(CDA)
@ -1169,14 +1169,14 @@ CDShuffleFunc(void *unused)
#ifdef CDA #ifdef CDA
static void static void
UpdateCDVolumeFunc(void *unused) EnableCDMusic(void *unused)
{ {
Cvar_SetValue("cd_nocd", (float)!s_options_cdvolume_box.curvalue); Cvar_SetValue("cd_nocd", (float)!s_options_enablecd_box.curvalue);
#ifdef OGG #ifdef OGG
Cvar_SetValue("ogg_enable", 0); Cvar_SetValue("ogg_enable", 0);
#endif #endif
if (s_options_cdvolume_box.curvalue) if (s_options_enablecd_box.curvalue)
{ {
#ifdef OGG #ifdef OGG
OGG_Shutdown(); OGG_Shutdown();
@ -1355,12 +1355,12 @@ Options_MenuInit(void)
s_options_sfxvolume_slider.maxvalue = 10; s_options_sfxvolume_slider.maxvalue = 10;
#ifdef CDA #ifdef CDA
s_options_cdvolume_box.generic.type = MTYPE_SPINCONTROL; s_options_enablecd_box.generic.type = MTYPE_SPINCONTROL;
s_options_cdvolume_box.generic.x = 0; s_options_enablecd_box.generic.x = 0;
s_options_cdvolume_box.generic.y = 10; s_options_enablecd_box.generic.y = 10;
s_options_cdvolume_box.generic.name = "CD music"; s_options_enablecd_box.generic.name = "CD music";
s_options_cdvolume_box.generic.callback = UpdateCDVolumeFunc; s_options_enablecd_box.generic.callback = EnableCDMusic;
s_options_cdvolume_box.itemnames = cd_music_items; s_options_enablecd_box.itemnames = cd_music_items;
#endif #endif
#ifdef OGG #ifdef OGG
@ -1460,7 +1460,7 @@ Options_MenuInit(void)
Menu_AddItem(&s_options_menu, (void *)&s_options_sfxvolume_slider); Menu_AddItem(&s_options_menu, (void *)&s_options_sfxvolume_slider);
#ifdef CDA #ifdef CDA
Menu_AddItem(&s_options_menu, (void *)&s_options_cdvolume_box); Menu_AddItem(&s_options_menu, (void *)&s_options_enablecd_box);
#endif #endif
#ifdef OGG #ifdef OGG
Menu_AddItem(&s_options_menu, (void *)&s_options_oggvolume_box); Menu_AddItem(&s_options_menu, (void *)&s_options_oggvolume_box);