summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2010-09-07 18:15:06 +0000
committerSimon Howard2010-09-07 18:15:06 +0000
commit07c997d600f3242503b3ae3e7505ed3318aa41ea (patch)
treeebb5db2a3f0b37b7aa080892cde574fbada91004
parent5ac790ac6430c6b353909caf43194888f2d4adb3 (diff)
downloadchocolate-doom-07c997d600f3242503b3ae3e7505ed3318aa41ea.tar.gz
chocolate-doom-07c997d600f3242503b3ae3e7505ed3318aa41ea.tar.bz2
chocolate-doom-07c997d600f3242503b3ae3e7505ed3318aa41ea.zip
Bind appropriate configuration values for Strife in setup tool, and add
corresponding options to menus. Subversion-branch: /branches/strife-branch Subversion-revision: 2036
-rw-r--r--src/setup/keyboard.c30
-rw-r--r--src/setup/mode.c11
-rw-r--r--src/setup/sound.c20
3 files changed, 53 insertions, 8 deletions
diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c
index 6e746ee9..ce3865b3 100644
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -39,11 +39,13 @@ static int always_run = 0;
static int *controls[] = { &key_left, &key_right, &key_up, &key_down,
&key_strafeleft, &key_straferight, &key_fire,
- &key_use, &key_strafe, &key_speed, &key_jump,
+ &key_use, &key_strafe, &key_speed, &key_jump,
&key_flyup, &key_flydown, &key_flycenter,
&key_lookup, &key_lookdown, &key_lookcenter,
- &key_invleft, &key_invright, &key_useartifact,
- &key_pause,
+ &key_invleft, &key_invright, &key_invquery,
+ &key_invuse, &key_invpop, &key_invkey,
+ &key_invhome, &key_invend, &key_invdrop,
+ &key_useartifact, &key_pause, &key_usehealth,
&key_weapon1, &key_weapon2, &key_weapon3,
&key_weapon4, &key_weapon5, &key_weapon6,
&key_weapon7, &key_weapon8,
@@ -172,7 +174,9 @@ static void ConfigExtraKeys(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
txt_window_t *window;
txt_scrollpane_t *scrollpane;
txt_table_t *table;
- boolean extra_keys = gamemission == heretic || gamemission == hexen;
+ boolean extra_keys = gamemission == heretic
+ || gamemission == hexen
+ || gamemission == strife;
window = TXT_NewWindow("Extra keyboard controls");
@@ -203,7 +207,23 @@ static void ConfigExtraKeys(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
AddKeyControl(table, "Inventory left", &key_invleft);
AddKeyControl(table, "Inventory right", &key_invright);
- AddKeyControl(table, "Use artifact", &key_useartifact);
+
+ if (gamemission == strife)
+ {
+ AddKeyControl(table, "Home", &key_invhome);
+ AddKeyControl(table, "End", &key_invend);
+ AddKeyControl(table, "Query", &key_invquery);
+ AddKeyControl(table, "Drop", &key_invdrop);
+ AddKeyControl(table, "PopWeap", &key_invpop);
+ AddKeyControl(table, "PopMiss", &key_mission);
+ AddKeyControl(table, "PopKey", &key_invkey);
+ AddKeyControl(table, "Use", &key_invuse);
+ AddKeyControl(table, "Use health", &key_usehealth);
+ }
+ else
+ {
+ AddKeyControl(table, "Use artifact", &key_useartifact);
+ }
}
else
{
diff --git a/src/setup/mode.c b/src/setup/mode.c
index 978ac86f..3852db25 100644
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -112,6 +112,7 @@ static int screenblocks = 9;
static int detailLevel = 0;
static char *savedir = NULL;
static char *executable = NULL;
+static char *back_flat = "F_PAVE01";
static void BindMiscVariables(void)
{
@@ -128,6 +129,11 @@ static void BindMiscVariables(void)
M_BindVariable("savedir", &savedir);
M_BindVariable("messageson", &showMessages);
}
+
+ if (gamemission == strife)
+ {
+ M_BindVariable("back_flat", &back_flat);
+ }
}
//
@@ -155,6 +161,11 @@ void InitBindings(void)
M_BindHexenControls();
}
+ if (gamemission == strife)
+ {
+ M_BindStrifeControls();
+ }
+
// All other variables
BindCompatibilityVariables();
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 97037ee9..45787eba 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -71,6 +71,7 @@ int snd_samplerate = 22050;
static int numChannels = 8;
static int sfxVolume = 15;
static int musicVolume = 15;
+static int voiceVolume = 15;
static int use_libsamplerate = 0;
// DOS specific variables: these are unused but should be maintained
@@ -200,6 +201,14 @@ void ConfigSound(void)
TXT_NewSpinControl(&sfxVolume, 0, 15),
NULL);
+ if (gamemission == strife)
+ {
+ TXT_AddWidgets(sfx_table,
+ TXT_NewLabel("Voice volume"),
+ TXT_NewSpinControl(&voiceVolume, 0, 15),
+ NULL);
+ }
+
TXT_SetColumnWidths(music_table, 20, 5);
TXT_AddWidgets(music_table,
@@ -227,9 +236,14 @@ void BindSoundVariables(void)
M_BindVariable("use_libsamplerate", &use_libsamplerate);
M_BindVariable("snd_sbport", &snd_sbport);
- M_BindVariable("snd_sbirq", &snd_sbirq);
- M_BindVariable("snd_sbdma", &snd_sbdma);
- M_BindVariable("snd_mport", &snd_mport);
+ M_BindVariable("snd_sbirq", &snd_sbirq);
+ M_BindVariable("snd_sbdma", &snd_sbdma);
+ M_BindVariable("snd_mport", &snd_mport);
+
+ if (gamemission == strife)
+ {
+ M_BindVariable("voice_volume", &voiceVolume);
+ }
// Before SDL_mixer version 1.2.11, MIDI music caused the game
// to crash when it looped. If this is an old SDL_mixer version,