diff options
author | James Haley | 2010-08-29 18:13:19 +0000 |
---|---|---|
committer | James Haley | 2010-08-29 18:13:19 +0000 |
commit | 9563371e9ad296eded19008a26382ad311182dbc (patch) | |
tree | 53935f5a2ce5bfbd23e53001d22ea8f5c72aa4ed /src | |
parent | 0044cf8336b5a623b5a56a2827a938276363770e (diff) | |
download | chocolate-doom-9563371e9ad296eded19008a26382ad311182dbc.tar.gz chocolate-doom-9563371e9ad296eded19008a26382ad311182dbc.tar.bz2 chocolate-doom-9563371e9ad296eded19008a26382ad311182dbc.zip |
Added voice volume and back flat configuration variables. Made status
bar redraw when menus are active as in Strife. Finished up the Strife
"settings" menu which was only for sound volumes in vanilla Doom.
Subversion-branch: /branches/strife-branch
Subversion-revision: 1973
Diffstat (limited to 'src')
-rw-r--r-- | src/m_config.c | 12 | ||||
-rw-r--r-- | src/strife/d_main.c | 24 | ||||
-rw-r--r-- | src/strife/doomstat.h | 1 | ||||
-rw-r--r-- | src/strife/m_menu.c | 55 | ||||
-rw-r--r-- | src/strife/r_draw.c | 17 | ||||
-rw-r--r-- | src/strife/r_draw.h | 1 | ||||
-rw-r--r-- | src/strife/s_sound.c | 5 |
7 files changed, 98 insertions, 17 deletions
diff --git a/src/m_config.c b/src/m_config.c index 056861cc..46ae4150 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -136,6 +136,12 @@ static default_t doom_defaults_list[] = CONFIG_VARIABLE_INT(music_volume), //! + // Volume of voice sound effects, range 0-15. Strife only. + // + + CONFIG_VARIABLE_INT(voice_volume), + + //! // If non-zero, messages are displayed on the heads-up display // in the game ("picked up a clip", etc). If zero, these messages // are not displayed. @@ -479,6 +485,12 @@ static default_t doom_defaults_list[] = // CONFIG_VARIABLE_STRING(chatmacro9), + + //! + // Name of background flat used by view border. Strife only. + // + + CONFIG_VARIABLE_STRING(back_flat), }; static default_collection_t doom_defaults = diff --git a/src/strife/d_main.c b/src/strife/d_main.c index 1bfaad65..519b3bca 100644 --- a/src/strife/d_main.c +++ b/src/strife/d_main.c @@ -128,8 +128,8 @@ FILE* debugfile; boolean advancedemo; // Store demo, do not accept any inputs - -boolean storedemo; +// haleyjd [STRIFE] Unused. +//boolean storedemo; char wadfile[1024]; // primary wad file @@ -235,7 +235,8 @@ void D_Display (void) AM_Drawer (); if (wipe || (viewheight != 200 && fullscreen) ) redrawsbar = true; - if (inhelpscreensstate && !inhelpscreens) + // haleyjd 08/29/10: [STRIFE] Always redraw sbar if menu is/was active + if (menuactivestate || (inhelpscreensstate && !inhelpscreens)) redrawsbar = true; // just put away the help screen ST_Drawer (viewheight == 200, redrawsbar ); fullscreen = viewheight == 200; @@ -264,7 +265,19 @@ void D_Display (void) R_RenderPlayerView (&players[displayplayer]); if (gamestate == GS_LEVEL && gametic) + { HU_Drawer (); + // STRIFE-TODO: ST_DrawMore, unknown variable dword_861C8 + /* + if(ST_DrawMore()) + dword_861C8 = 1; + else if(dword_861C8) + { + dword_861C8 = 0; + menuactivestate = 1; + } + */ + } // clean up border stuff if (gamestate != oldgamestate && gamestate != GS_LEVEL) @@ -377,9 +390,13 @@ void D_BindVariables(void) NET_BindVariables(); #endif + // haleyjd 08/29/10: [STRIFE] + // * Added voice volume + // * Added back flat M_BindVariable("mouse_sensitivity", &mouseSensitivity); M_BindVariable("sfx_volume", &sfxVolume); M_BindVariable("music_volume", &musicVolume); + M_BindVariable("voice_volume", &voiceVolume); M_BindVariable("show_messages", &showMessages); M_BindVariable("screenblocks", &screenblocks); M_BindVariable("detaillevel", &detailLevel); @@ -387,6 +404,7 @@ void D_BindVariables(void) M_BindVariable("vanilla_savegame_limit", &vanilla_savegame_limit); M_BindVariable("vanilla_demo_limit", &vanilla_demo_limit); M_BindVariable("show_endoom", &show_endoom); + M_BindVariable("back_flat", &back_flat); // Multiplayer chat macros diff --git a/src/strife/doomstat.h b/src/strife/doomstat.h index 43d90458..36579118 100644 --- a/src/strife/doomstat.h +++ b/src/strife/doomstat.h @@ -116,6 +116,7 @@ extern boolean deathmatch; // These are multiplied by 8. extern int sfxVolume; extern int musicVolume; +extern int voiceVolume; // haleyjd 08/29/10: [STRIFE] // Current music/sfx card - index useless // w/o a reference LUT in a sound module. diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c index 62db0095..281556e4 100644 --- a/src/strife/m_menu.c +++ b/src/strife/m_menu.c @@ -199,6 +199,7 @@ void M_QuitDOOM(int choice); void M_ChangeMessages(int choice); void M_ChangeSensitivity(int choice); void M_SfxVol(int choice); +void M_VoiceVol(int choice); // [STRIFE] void M_MusicVol(int choice); void M_ChangeDetail(int choice); void M_SizeDisplay(int choice); @@ -448,14 +449,26 @@ enum sfx_empty1, music_vol, sfx_empty2, + voice_vol, + sfx_empty3, + sfx_mouse, + sfx_empty4, sound_end } sound_e; +// haleyjd 08/29/10: +// [STRIFE] +// * Added voice volume +// * Moved mouse sensitivity here (who knows why...) menuitem_t SoundMenu[]= { {2,"M_SFXVOL",M_SfxVol,'s'}, {-1,"",0,'\0'}, {2,"M_MUSVOL",M_MusicVol,'m'}, + {-1,"",0,'\0'}, + {2,"M_VOIVOL",M_VoiceVol,'v'}, + {-1,"",0,'\0'}, + {2,"M_MSENS",M_ChangeSensitivity,'m'}, {-1,"",0,'\0'} }; @@ -465,7 +478,7 @@ menu_t SoundDef = &OptionsDef, SoundMenu, M_DrawSound, - 80,64, + 80,35, // [STRIFE] changed y coord 64 -> 35 0 }; @@ -808,15 +821,25 @@ void M_DrawReadThis3(void) // // Change Sfx & Music volumes // +// haleyjd 08/29/10: [STRIFE] +// * Changed title graphic coordinates +// * Added voice volume and sensitivity sliders +// void M_DrawSound(void) { - V_DrawPatchDirect (60, 38, W_CacheLumpName(DEH_String("M_SVOL"), PU_CACHE)); + V_DrawPatchDirect (100, 10, W_CacheLumpName(DEH_String("M_SVOL"), PU_CACHE)); M_DrawThermo(SoundDef.x,SoundDef.y+LINEHEIGHT*(sfx_vol+1), - 16,sfxVolume); + 16,sfxVolume); M_DrawThermo(SoundDef.x,SoundDef.y+LINEHEIGHT*(music_vol+1), - 16,musicVolume); + 16,musicVolume); + + M_DrawThermo(SoundDef.x,SoundDef.y+LINEHEIGHT*(voice_vol+1), + 16,voiceVolume); + + M_DrawThermo(SoundDef.x,SoundDef.y+LINEHEIGHT*(sfx_mouse+1), + 16,mouseSensitivity); } void M_Sound(int choice) @@ -841,6 +864,30 @@ void M_SfxVol(int choice) S_SetSfxVolume(sfxVolume * 8); } +// +// M_VoiceVol +// +// haleyjd 08/29/10: [STRIFE] New function +// Sets voice volume level. +// +void M_VoiceVol(int choice) +{ + switch(choice) + { + case 0: + if (voiceVolume) + voiceVolume--; + break; + case 1: + if (voiceVolume < 15) + voiceVolume++; + break; + } + + // STRIFE-TODO: Voice volume setting + //S_SetVoiceVolume(voiceVolume * 8); +} + void M_MusicVol(int choice) { switch(choice) diff --git a/src/strife/r_draw.c b/src/strife/r_draw.c index c491f6b3..43433e38 100644 --- a/src/strife/r_draw.c +++ b/src/strife/r_draw.c @@ -82,6 +82,9 @@ byte translations[3][256]; static byte *background_buffer = NULL; +// haleyjd 08/29/10: [STRIFE] Rogue added the ability to customize the view +// border flat by storing it in the configuration file. +char *back_flat = "F_PAVE01"; // // R_DrawColumn @@ -827,6 +830,8 @@ R_InitBuffer // for variable screen sizes // Also draws a beveled edge. // +// haleyjd 08/29/10: [STRIFE] Added support for configurable back_flat. +// void R_FillBackScreen (void) { byte* src; @@ -835,12 +840,6 @@ void R_FillBackScreen (void) int y; patch_t* patch; - // DOOM border patch. - char *name1 = DEH_String("FLOOR7_2"); - - // DOOM II border patch. - char *name2 = DEH_String("GRNROCK"); - char *name; // If we are running full screen, there is no need to do any of this, @@ -865,10 +864,8 @@ void R_FillBackScreen (void) PU_STATIC, NULL); } - if (gamemode == commercial) - name = name2; - else - name = name1; + // haleyjd 08/29/10: [STRIFE] Use configurable back_flat + name = back_flat; src = W_CacheLumpName(name, PU_CACHE); dest = background_buffer; diff --git a/src/strife/r_draw.h b/src/strife/r_draw.h index 7070da2e..16533acf 100644 --- a/src/strife/r_draw.h +++ b/src/strife/r_draw.h @@ -81,6 +81,7 @@ extern byte* translationtables; extern byte* dc_translation; extern byte* xlatab; // haleyjd 08/26/10: [STRIFE] +extern char *back_flat; // haleyjd 08/29/10: [STRIFE] // Span blitting for rows, floor/ceiling. // No Sepctre effect needed. diff --git a/src/strife/s_sound.c b/src/strife/s_sound.c index f829956c..36b9ec76 100644 --- a/src/strife/s_sound.c +++ b/src/strife/s_sound.c @@ -96,6 +96,11 @@ int sfxVolume = 8; int musicVolume = 8; +// haleyjd 08/29/10: [STRIFE] New global variable +// Maximum volume of voice channel. + +int voiceVolume = 15; + // Internal volume level, ranging from 0-127 static int snd_SfxVolume; |