shithub: choc

Download patch

ref: 4755980aed7173227e876602ce78cf31bbb97118
parent: 43e82bdf93c0c3971767a63072db5b0080c2f6c6
author: Simon Howard <fraggle@gmail.com>
date: Sun Mar 6 19:01:40 EST 2011

Update config variable binding in setup tool so that the correct
variables are bound for Strife. Add option for show_talk to sound
configuration screen.

Subversion-branch: /branches/strife-branch
Subversion-revision: 2296

--- a/src/setup/compatibility.c
+++ b/src/setup/compatibility.c
@@ -48,7 +48,7 @@
 
 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);
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -689,7 +689,8 @@
                       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", &show_endoom));
@@ -723,7 +724,8 @@
     M_BindVariable("usegamma",                  &usegamma);
 
 
-    if (gamemission == doom || gamemission == heretic)
+    if (gamemission == doom || gamemission == heretic
+     || gamemission == strife)
     {
         M_BindVariable("show_endoom",               &show_endoom);
     }
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -428,7 +428,7 @@
     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);
     }
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -358,7 +358,7 @@
     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);
     }
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -177,6 +177,9 @@
         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 @@
                          (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;
 
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -113,11 +113,11 @@
 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);
@@ -133,7 +133,15 @@
     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);
+    }
+
 }
 
 //
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -75,6 +75,7 @@
 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
@@ -196,8 +197,6 @@
     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);
@@ -219,8 +218,15 @@
                        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,
@@ -253,7 +259,8 @@
 
     if (gamemission == strife)
     {
-        M_BindVariable("voice_volume",   &voiceVolume);
+        M_BindVariable("voice_volume",    &voiceVolume);
+        M_BindVariable("show_talk",       &show_talk);
     }
 
     // Before SDL_mixer version 1.2.11, MIDI music caused the game