foxygit / doom Log in
commit 1dfe19b3066aa4419d236a48a4765ad2eb393141
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Sun Feb 20 18:36:20 2011 +0000
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Sun Feb 20 18:36:20 2011 +0000

    Removed ability to disable messages, and replaced with configuration
    variable to control dialogue text messages, as in vanilla. Also, absence
    of voices.wad, or use of the -novoices parameter, will now properly both
    disable voices AND enable dialogue text.

    Subversion-branch: /branches/strife-branch
    Subversion-revision: 2268
---
 src/m_config.c        |  9 ++++++++-
 src/strife/d_englsh.h | 21 +++++++++++----------
 src/strife/d_main.c   | 17 +++++++++++++++--
 src/strife/hu_stuff.c |  9 +++++----
 src/strife/m_menu.c   |  8 ++++++--
 src/strife/p_dialog.c |  2 +-
 src/strife/p_dialog.h |  2 +-
 7 files changed, 47 insertions(+), 21 deletions(-)

diff --git a/src/m_config.c b/src/m_config.c
index bda9828c..bdc72a0a 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -142,7 +142,7 @@ static default_t	doom_defaults_list[] =
     CONFIG_VARIABLE_INT(music_volume),

     //!
-    // Volume of voice sound effects, range 0-15. Strife only.
+    // Volume of voice sound effects, range 0-15. (Strife only)
     //

     CONFIG_VARIABLE_INT(voice_volume),
@@ -155,6 +155,13 @@ static default_t	doom_defaults_list[] =

     CONFIG_VARIABLE_INT(show_messages),

+    //!
+    // If non-zero, dialogue text is displayed over characters' pictures
+    // when engaging actors who have voices. (Strife only)
+    //
+
+    CONFIG_VARIABLE_INT(show_text),
+
     //!
     // Keyboard key to turn right.
     //
diff --git a/src/strife/d_englsh.h b/src/strife/d_englsh.h
index 52a9e23c..55d4a662 100644
--- a/src/strife/d_englsh.h
+++ b/src/strife/d_englsh.h
@@ -190,16 +190,17 @@
 #define HUSTR_33        "AREA  2: Town"
 #define HUSTR_34        "AREA  3: Movement Base"

-#define HUSTR_CHATMACRO1	"I'm ready to kick butt!"
-#define HUSTR_CHATMACRO2	"I'm OK."
-#define HUSTR_CHATMACRO3	"I'm not looking too good!"
-#define HUSTR_CHATMACRO4	"Help!"
-#define HUSTR_CHATMACRO5	"You suck!"
-#define HUSTR_CHATMACRO6	"Next time, scumbag..."
-#define HUSTR_CHATMACRO7	"Come here!"
-#define HUSTR_CHATMACRO8	"I'll take care of it."
-#define HUSTR_CHATMACRO9	"Yes"
-#define HUSTR_CHATMACRO0	"No"
+// haleyjd 20110219: [STRIFE] replaced all with Strife chat macros:
+#define HUSTR_CHATMACRO1        "Mommy?"
+#define HUSTR_CHATMACRO2        "Fucker!"
+#define HUSTR_CHATMACRO3        "--SPLAT-- Instant wall art."
+#define HUSTR_CHATMACRO4        "That had to hurt!"
+#define HUSTR_CHATMACRO5        "Smackings!"
+#define HUSTR_CHATMACRO6        "Gib-O-Matic baby."
+#define HUSTR_CHATMACRO7        "Burn!  Yah! Yah!"
+#define HUSTR_CHATMACRO8        "Buh-Bye!"
+#define HUSTR_CHATMACRO9        "Sizzle chest!"
+#define HUSTR_CHATMACRO0        "That sucked!"

 #define HUSTR_TALKTOSELF1	"You mumble to yourself"
 #define HUSTR_TALKTOSELF2	"Who's there?"
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 95b1b643..c414a337 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -60,6 +60,7 @@
 #include "m_menu.h"
 #include "m_saves.h" // haleyjd [STRIFE]
 #include "p_saveg.h"
+#include "p_dialog.h" // haleyjd [STRIFE]

 #include "i_endoom.h"
 #include "i_joystick.h"
@@ -194,7 +195,7 @@ void D_ProcessEvents (void)
 //
 gamestate_t     wipegamestate = GS_UNKNOWN;
 extern  boolean setsizeneeded;
-extern  int             showMessages;
+//extern  int             showMessages; [STRIFE] no such variable
 void R_ExecuteSetViewSize (void);

 void D_Display (void)
@@ -414,11 +415,13 @@ void D_BindVariables(void)
     // haleyjd 08/29/10: [STRIFE]
     // * Added voice volume
     // * Added back flat
+    // * Removed show_messages
+    // * Added show_text
     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("show_text",              &dialogshowtext);
     M_BindVariable("screenblocks",           &screenblocks);
     M_BindVariable("detaillevel",            &detailLevel);
     M_BindVariable("snd_channels",           &snd_channels);
@@ -1915,6 +1918,16 @@ void D_DoomMain (void)
     S_Init (sfxVolume * 8, musicVolume * 8, voiceVolume * 8); // [STRIFE]: voice
     D_IntroTick(); // [STRIFE]

+    // haleyjd 20110220: This stuff was done in I_StartupSound in vanilla, but
+    // we'll do it here instead so we don't have to modify the low-level shared
+    // code with Strife-specific stuff.
+    if(disable_voices || M_CheckParm("-novoice"))
+    {
+        dialogshowtext = disable_voices = 1;
+    }
+    if(devparm)
+        DEH_printf("  Play voices = %d\n", disable_voices == 0);
+
     if(devparm) // [STRIFE]
         DEH_printf("D_CheckNetGame: Checking network game status.\n");
     D_CheckNetGame ();
diff --git a/src/strife/hu_stuff.c b/src/strife/hu_stuff.c
index 42a9dbb1..83757b07 100644
--- a/src/strife/hu_stuff.c
+++ b/src/strife/hu_stuff.c
@@ -117,7 +117,7 @@ static boolean          message_nottobefuckedwith;
 static hu_stext_t       w_message;
 static int              message_counter;

-extern int              showMessages;
+//extern int              showMessages; [STRIFE] no such variable
 extern boolean          automapactive;

 static boolean          headsupactive = false;
@@ -420,8 +420,9 @@ void HU_Ticker(void)
         message_nottobefuckedwith = false;
     }

-    if (showMessages || message_dontfuckwithme)
-    {
+    // haleyjd 20110219: [STRIFE] this condition was removed
+    //if (showMessages || message_dontfuckwithme)
+    //{
         // display message if necessary
         if ((plr->message && !message_nottobefuckedwith)
             || (plr->message && message_dontfuckwithme))
@@ -434,7 +435,7 @@ void HU_Ticker(void)
             message_nottobefuckedwith = message_dontfuckwithme;
             message_dontfuckwithme = 0;
         }
-    } // else message_on = false;
+    //} // else message_on = false;

     // check for incoming chat characters
     if (netgame)
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index 4d16e3e8..972e5b75 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -81,8 +81,9 @@ extern boolean          sendsave;       // [STRIFE]
 //
 int			mouseSensitivity = 5;

+// [STRIFE]: removed this entirely
 // Show messages has default, 0 = off, 1 = on
-int			showMessages = 1;
+//int			showMessages = 1;


 // Blocky mode, has default, 0 = high, 1 = normal
@@ -175,7 +176,7 @@ void M_ReadThis2(int choice);
 void M_ReadThis3(int choice); // [STRIFE]
 void M_QuitStrife(int choice);

-void M_ChangeMessages(int choice);
+//void M_ChangeMessages(int choice); [STRIFE]
 void M_ChangeSensitivity(int choice);
 void M_SfxVol(int choice);
 void M_VoiceVol(int choice); // [STRIFE]
@@ -1173,6 +1174,8 @@ void M_ChangeShowText(void)
 //
 //      Toggle messages on/off
 //
+// [STRIFE] Messages cannot be disabled in Strife
+/*
 void M_ChangeMessages(int choice)
 {
     // warning: unused parameter `int choice'
@@ -1186,6 +1189,7 @@ void M_ChangeMessages(int choice)

     message_dontfuckwithme = true;
 }
+*/


 //
diff --git a/src/strife/p_dialog.c b/src/strife/p_dialog.c
index aaba1a3a..55d886e5 100644
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -70,7 +70,7 @@

 // This can be toggled at runtime to determine if the full dialog messages
 // are subtitled on screen or not. Defaults to off.
-boolean dialogshowtext = false;
+int dialogshowtext = false;

 // The global mission objective buffer. This gets written to and read from file,
 // and is set by dialogs and line actions.
diff --git a/src/strife/p_dialog.h b/src/strife/p_dialog.h
index 66a3b0a8..7463490b 100644
--- a/src/strife/p_dialog.h
+++ b/src/strife/p_dialog.h
@@ -45,7 +45,7 @@

 extern char mission_objective[OBJECTIVE_LEN];

-extern boolean dialogshowtext;
+extern int dialogshowtext;

 // villsa - convenient macro for giving objective logs to player
 #define GiveObjective(x, minlumpnum) \