Überarbeite das Sound-Menü

This commit is contained in:
Yamagi Burmeister 2010-10-28 06:28:11 +00:00
parent f0fa091fde
commit 66ac4643cb

View file

@ -968,7 +968,6 @@ static menulist_s s_options_cdvolume_box;
static menulist_s s_options_cdshuffle_box; static menulist_s s_options_cdshuffle_box;
static menulist_s s_options_oggvolume_box; static menulist_s s_options_oggvolume_box;
static menulist_s s_options_quality_list; static menulist_s s_options_quality_list;
static menulist_s s_options_compatibility_list;
static menulist_s s_options_console_action; static menulist_s s_options_console_action;
static void CrosshairFunc( void *unused ) { static void CrosshairFunc( void *unused ) {
@ -1144,15 +1143,16 @@ static void ConsoleFunc( void *unused ) {
} }
static void UpdateSoundQualityFunc( void *unused ) { static void UpdateSoundQualityFunc( void *unused ) {
if ( s_options_quality_list.curvalue ) { if ( s_options_quality_list.curvalue == 0) {
Cvar_SetValue( "s_khz", 22 ); Cvar_SetValue( "s_khz", 22 );
Cvar_SetValue( "s_loadas8bit", false ); Cvar_SetValue( "s_loadas8bit", false );
} else {
Cvar_SetValue( "s_khz", 11 );
Cvar_SetValue( "s_loadas8bit", true );
} }
else
{
Cvar_SetValue( "s_khz", 44 );
Cvar_SetValue( "s_loadas8bit", false );
}
M_DrawTextBox( 8, 120 - 48, 36, 3 ); M_DrawTextBox( 8, 120 - 48, 36, 3 );
M_Print( 16 + 16, 120 - 48 + 8, "Restarting the sound system. This" ); M_Print( 16 + 16, 120 - 48 + 8, "Restarting the sound system. This" );
M_Print( 16 + 16, 120 - 48 + 16, "could take up to a minute, so" ); M_Print( 16 + 16, 120 - 48 + 16, "could take up to a minute, so" );
@ -1184,11 +1184,7 @@ static void Options_MenuInit( void ) {
}; };
static const char *quality_items[] = { static const char *quality_items[] = {
"low", "high", 0 "normal", "high", 0
};
static const char *compatibility_items[] = {
"max compatibility", "max performance", 0
}; };
static const char *yesno_names[] = { static const char *yesno_names[] = {
@ -1251,16 +1247,9 @@ static void Options_MenuInit( void ) {
s_options_quality_list.itemnames = quality_items; s_options_quality_list.itemnames = quality_items;
s_options_quality_list.curvalue = !Cvar_VariableValue( "s_loadas8bit" ); s_options_quality_list.curvalue = !Cvar_VariableValue( "s_loadas8bit" );
s_options_compatibility_list.generic.type = MTYPE_SPINCONTROL;
s_options_compatibility_list.generic.x = 0;
s_options_compatibility_list.generic.y = 50;
s_options_compatibility_list.generic.name = "sound compatibility";
s_options_compatibility_list.generic.callback = UpdateSoundQualityFunc;
s_options_compatibility_list.itemnames = compatibility_items;
s_options_sensitivity_slider.generic.type = MTYPE_SLIDER; s_options_sensitivity_slider.generic.type = MTYPE_SLIDER;
s_options_sensitivity_slider.generic.x = 0; s_options_sensitivity_slider.generic.x = 0;
s_options_sensitivity_slider.generic.y = 70; s_options_sensitivity_slider.generic.y = 60;
s_options_sensitivity_slider.generic.name = "mouse speed"; s_options_sensitivity_slider.generic.name = "mouse speed";
s_options_sensitivity_slider.generic.callback = MouseSpeedFunc; s_options_sensitivity_slider.generic.callback = MouseSpeedFunc;
s_options_sensitivity_slider.minvalue = 2; s_options_sensitivity_slider.minvalue = 2;
@ -1268,61 +1257,61 @@ static void Options_MenuInit( void ) {
s_options_alwaysrun_box.generic.type = MTYPE_SPINCONTROL; s_options_alwaysrun_box.generic.type = MTYPE_SPINCONTROL;
s_options_alwaysrun_box.generic.x = 0; s_options_alwaysrun_box.generic.x = 0;
s_options_alwaysrun_box.generic.y = 80; s_options_alwaysrun_box.generic.y = 70;
s_options_alwaysrun_box.generic.name = "always run"; s_options_alwaysrun_box.generic.name = "always run";
s_options_alwaysrun_box.generic.callback = AlwaysRunFunc; s_options_alwaysrun_box.generic.callback = AlwaysRunFunc;
s_options_alwaysrun_box.itemnames = yesno_names; s_options_alwaysrun_box.itemnames = yesno_names;
s_options_invertmouse_box.generic.type = MTYPE_SPINCONTROL; s_options_invertmouse_box.generic.type = MTYPE_SPINCONTROL;
s_options_invertmouse_box.generic.x = 0; s_options_invertmouse_box.generic.x = 0;
s_options_invertmouse_box.generic.y = 90; s_options_invertmouse_box.generic.y = 80;
s_options_invertmouse_box.generic.name = "invert mouse"; s_options_invertmouse_box.generic.name = "invert mouse";
s_options_invertmouse_box.generic.callback = InvertMouseFunc; s_options_invertmouse_box.generic.callback = InvertMouseFunc;
s_options_invertmouse_box.itemnames = yesno_names; s_options_invertmouse_box.itemnames = yesno_names;
s_options_lookspring_box.generic.type = MTYPE_SPINCONTROL; s_options_lookspring_box.generic.type = MTYPE_SPINCONTROL;
s_options_lookspring_box.generic.x = 0; s_options_lookspring_box.generic.x = 0;
s_options_lookspring_box.generic.y = 100; s_options_lookspring_box.generic.y = 90;
s_options_lookspring_box.generic.name = "lookspring"; s_options_lookspring_box.generic.name = "lookspring";
s_options_lookspring_box.generic.callback = LookspringFunc; s_options_lookspring_box.generic.callback = LookspringFunc;
s_options_lookspring_box.itemnames = yesno_names; s_options_lookspring_box.itemnames = yesno_names;
s_options_lookstrafe_box.generic.type = MTYPE_SPINCONTROL; s_options_lookstrafe_box.generic.type = MTYPE_SPINCONTROL;
s_options_lookstrafe_box.generic.x = 0; s_options_lookstrafe_box.generic.x = 0;
s_options_lookstrafe_box.generic.y = 110; s_options_lookstrafe_box.generic.y = 100;
s_options_lookstrafe_box.generic.name = "lookstrafe"; s_options_lookstrafe_box.generic.name = "lookstrafe";
s_options_lookstrafe_box.generic.callback = LookstrafeFunc; s_options_lookstrafe_box.generic.callback = LookstrafeFunc;
s_options_lookstrafe_box.itemnames = yesno_names; s_options_lookstrafe_box.itemnames = yesno_names;
s_options_freelook_box.generic.type = MTYPE_SPINCONTROL; s_options_freelook_box.generic.type = MTYPE_SPINCONTROL;
s_options_freelook_box.generic.x = 0; s_options_freelook_box.generic.x = 0;
s_options_freelook_box.generic.y = 120; s_options_freelook_box.generic.y = 110;
s_options_freelook_box.generic.name = "free look"; s_options_freelook_box.generic.name = "free look";
s_options_freelook_box.generic.callback = FreeLookFunc; s_options_freelook_box.generic.callback = FreeLookFunc;
s_options_freelook_box.itemnames = yesno_names; s_options_freelook_box.itemnames = yesno_names;
s_options_crosshair_box.generic.type = MTYPE_SPINCONTROL; s_options_crosshair_box.generic.type = MTYPE_SPINCONTROL;
s_options_crosshair_box.generic.x = 0; s_options_crosshair_box.generic.x = 0;
s_options_crosshair_box.generic.y = 130; s_options_crosshair_box.generic.y = 120;
s_options_crosshair_box.generic.name = "crosshair"; s_options_crosshair_box.generic.name = "crosshair";
s_options_crosshair_box.generic.callback = CrosshairFunc; s_options_crosshair_box.generic.callback = CrosshairFunc;
s_options_crosshair_box.itemnames = crosshair_names; s_options_crosshair_box.itemnames = crosshair_names;
s_options_customize_options_action.generic.type = MTYPE_ACTION; s_options_customize_options_action.generic.type = MTYPE_ACTION;
s_options_customize_options_action.generic.x = 0; s_options_customize_options_action.generic.x = 0;
s_options_customize_options_action.generic.y = 150; s_options_customize_options_action.generic.y = 140;
s_options_customize_options_action.generic.name = "customize controls"; s_options_customize_options_action.generic.name = "customize controls";
s_options_customize_options_action.generic.callback = CustomizeControlsFunc; s_options_customize_options_action.generic.callback = CustomizeControlsFunc;
s_options_defaults_action.generic.type = MTYPE_ACTION; s_options_defaults_action.generic.type = MTYPE_ACTION;
s_options_defaults_action.generic.x = 0; s_options_defaults_action.generic.x = 0;
s_options_defaults_action.generic.y = 160; s_options_defaults_action.generic.y = 150;
s_options_defaults_action.generic.name = "reset defaults"; s_options_defaults_action.generic.name = "reset defaults";
s_options_defaults_action.generic.callback = ControlsResetDefaultsFunc; s_options_defaults_action.generic.callback = ControlsResetDefaultsFunc;
s_options_console_action.generic.type = MTYPE_ACTION; s_options_console_action.generic.type = MTYPE_ACTION;
s_options_console_action.generic.x = 0; s_options_console_action.generic.x = 0;
s_options_console_action.generic.y = 170; s_options_console_action.generic.y = 160;
s_options_console_action.generic.name = "go to console"; s_options_console_action.generic.name = "go to console";
s_options_console_action.generic.callback = ConsoleFunc; s_options_console_action.generic.callback = ConsoleFunc;
@ -1333,7 +1322,6 @@ static void Options_MenuInit( void ) {
Menu_AddItem( &s_options_menu, ( void * ) &s_options_oggvolume_box ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_oggvolume_box );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_cdshuffle_box ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_cdshuffle_box );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_quality_list ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_quality_list );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_compatibility_list );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_sensitivity_slider ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_sensitivity_slider );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_alwaysrun_box ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_alwaysrun_box );
Menu_AddItem( &s_options_menu, ( void * ) &s_options_invertmouse_box ); Menu_AddItem( &s_options_menu, ( void * ) &s_options_invertmouse_box );