foxygit / doom Log in
commit 4755980aed7173227e876602ce78cf31bbb97118
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Mon Mar 7 00:01:40 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Mon Mar 7 00:01:40 2011 +0000

    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
---
 src/setup/compatibility.c |  2 +-
 src/setup/display.c       |  6 ++++--
 src/setup/joystick.c      |  2 +-
 src/setup/keyboard.c      |  2 +-
 src/setup/mainmenu.c      |  7 +++++--
 src/setup/mode.c          | 12 ++++++++++--
 src/setup/sound.c         | 13 ++++++++++---
 7 files changed, 32 insertions(+), 12 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 9ed0ae5f..df264749 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -689,7 +689,8 @@ void ConfigDisplay(void)
                       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 @@ 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 0fc00ea1..9c6b5851 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -428,7 +428,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 46ef05c2..3f9f6d89 100644
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -358,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 3852db25..53a74314 100644
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -113,11 +113,11 @@ 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);
@@ -133,7 +133,15 @@ static void BindMiscVariables(void)
     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);
     }
+
 }

 //
diff --git a/src/setup/sound.c b/src/setup/sound.c
index d8dc129e..4564aeb4 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -75,6 +75,7 @@ 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
@@ -196,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);
@@ -219,8 +218,15 @@ void ConfigSound(void)
                        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 @@ void BindSoundVariables(void)

     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