summaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/compatibility.c2
-rw-r--r--src/setup/display.c5
-rw-r--r--src/setup/joystick.c2
-rw-r--r--src/setup/keyboard.c32
-rw-r--r--src/setup/mainmenu.c7
-rw-r--r--src/setup/mode.c32
-rw-r--r--src/setup/sound.c31
7 files changed, 92 insertions, 19 deletions
diff --git a/src/setup/compatibility.c b/src/setup/compatibility.c
index 722088e8..35b09580 100644
--- a/src/setup/compatibility.c
+++ b/src/setup/compatibility.c
@@ -48,7 +48,7 @@ void CompatibilitySettings(void)
void BindCompatibilityVariables(void)
{
- if (gamemission == doom)
+ if (gamemission == doom || gamemission == strife)
{
M_BindVariable("vanilla_savegame_limit", &vanilla_savegame_limit);
M_BindVariable("vanilla_demo_limit", &vanilla_demo_limit);
diff --git a/src/setup/display.c b/src/setup/display.c
index 72f3c057..d9b34ccc 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -612,7 +612,7 @@ static void AdvancedDisplayConfig(TXT_UNCAST_ARG(widget),
TXT_NewCheckBox("Graphical startup", &graphical_startup));
}
- if (gamemission == doom || gamemission == heretic)
+ if (gamemission == doom || gamemission == heretic || gamemission == strife)
{
TXT_AddWidget(window,
TXT_NewCheckBox("Show ENDOOM screen on exit",
@@ -792,7 +792,8 @@ void BindDisplayVariables(void)
M_BindVariable("usegamma", &usegamma);
- if (gamemission == doom || gamemission == heretic)
+ if (gamemission == doom || gamemission == heretic
+ || gamemission == strife)
{
M_BindVariable("show_endoom", &show_endoom);
}
diff --git a/src/setup/joystick.c b/src/setup/joystick.c
index 2a7b1f79..48074121 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -429,7 +429,7 @@ void ConfigJoystick(void)
AddJoystickControl(button_table, "Previous weapon", &joybprevweapon);
AddJoystickControl(button_table, "Next weapon", &joybnextweapon);
- if (gamemission == hexen)
+ if (gamemission == hexen || gamemission == strife)
{
AddJoystickControl(button_table, "Jump", &joybjump);
}
diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c
index a128b3ab..3f9f6d89 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,
@@ -174,7 +176,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");
@@ -205,7 +209,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
{
@@ -338,7 +358,7 @@ void ConfigKeyboard(void)
AddKeyControl(movement_table, "Turn Right", &key_right);
AddKeyControl(movement_table, " Strafe On", &key_strafe);
- if (gamemission == hexen)
+ if (gamemission == hexen || gamemission == strife)
{
AddKeyControl(movement_table, "Jump", &key_jump);
}
diff --git a/src/setup/mainmenu.c b/src/setup/mainmenu.c
index 55496010..3180e58e 100644
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -177,6 +177,9 @@ static txt_button_t *GetLaunchButton(void)
case hexen:
label = "Save parameters and launch Hexen";
break;
+ case strife:
+ label = "Save parameters and launch STRIFE!";
+ break;
default:
label = "Save parameters and launch game";
break;
@@ -206,9 +209,9 @@ void MainMenu(void)
(TxtWidgetSignalFunc) ConfigJoystick, NULL),
NULL);
- // The compatibility window is only appropriate for Doom.
+ // The compatibility window is only appropriate for Doom/Strife.
- if (gamemission == doom)
+ if (gamemission == doom || gamemission == strife)
{
txt_button_t *button;
diff --git a/src/setup/mode.c b/src/setup/mode.c
index 702db67d..53a74314 100644
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -91,6 +91,15 @@ static mission_config_t mission_configs[] =
"hexen.cfg",
PROGRAM_PREFIX "hexen.cfg",
PROGRAM_PREFIX "hexen"
+ },
+ {
+ "Strife",
+ strife,
+ IWAD_MASK_STRIFE,
+ "strife",
+ "strife.cfg",
+ PROGRAM_PREFIX "strife.cfg",
+ PROGRAM_PREFIX "strife"
}
};
@@ -103,11 +112,12 @@ static int screenblocks = 9;
static int detailLevel = 0;
static char *savedir = NULL;
static char *executable = NULL;
+static char *back_flat = "F_PAVE01";
+static int comport = 0;
+static char *nickname = NULL;
static void BindMiscVariables(void)
{
- M_BindVariable("screenblocks", &screenblocks);
-
if (gamemission == doom)
{
M_BindVariable("detaillevel", &detailLevel);
@@ -119,6 +129,19 @@ static void BindMiscVariables(void)
M_BindVariable("savedir", &savedir);
M_BindVariable("messageson", &showMessages);
}
+
+ if (gamemission == strife)
+ {
+ M_BindVariable("back_flat", &back_flat);
+ M_BindVariable("screensize" , &screenblocks);
+ M_BindVariable("comport", &comport);
+ M_BindVariable("nickname", &nickname);
+ }
+ else
+ {
+ M_BindVariable("screenblocks", &screenblocks);
+ }
+
}
//
@@ -146,6 +169,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 9e13edd9..522c4f9f 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -74,6 +74,8 @@ int opl_io_port = 0x388;
static int numChannels = 8;
static int sfxVolume = 15;
static int musicVolume = 15;
+static int voiceVolume = 15;
+static int show_talk = 0;
static int use_libsamplerate = 0;
// DOS specific variables: these are unused but should be maintained
@@ -195,8 +197,6 @@ void ConfigSound(void)
TXT_AddWidgets(window,
TXT_NewSeparator("Sound effects"),
sfx_table = TXT_NewTable(2),
- TXT_NewSeparator("Music"),
- music_table = TXT_NewTable(2),
NULL);
TXT_SetColumnWidths(sfx_table, 20, 14);
@@ -212,6 +212,21 @@ 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_AddWidget(window,
+ TXT_NewCheckBox("Show text with voices", &show_talk));
+ }
+
+ TXT_AddWidgets(window,
+ TXT_NewSeparator("Music"),
+ music_table = TXT_NewTable(2),
+ NULL);
+
TXT_SetColumnWidths(music_table, 20, 14);
TXT_AddWidgets(music_table,
@@ -238,9 +253,15 @@ 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);
+ M_BindVariable("show_talk", &show_talk);
+ }
// 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,