ref: 4fcb2575e748bdff1f219da8051844c31254f19a
parent: 2e941b777d32cdfc5d023f5e127da580edabadc3
author: Simon Howard <fraggle@gmail.com>
date: Sun Sep 4 10:51:19 EDT 2005
Display the correct quit messages according to which game is being played. Remove "language" variable (do this through gettext, if ever) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 66
--- a/src/doomstat.c
+++ b/src/doomstat.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: doomstat.c 59 2005-08-31 21:21:18Z fraggle $
+// $Id: doomstat.c 66 2005-09-04 14:51:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.5 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.4 2005/08/31 21:21:18 fraggle
// Better IWAD detection and identification. Support '-iwad' to specify
// the IWAD to use.
@@ -42,7 +46,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: doomstat.c 59 2005-08-31 21:21:18Z fraggle $";
+rcsid[] = "$Id: doomstat.c 66 2005-09-04 14:51:19Z fraggle $";
#include "doomstat.h"
@@ -52,9 +56,6 @@
GameMode_t gamemode = indetermined;
GameMission_t gamemission = doom;
char *gamedescription;
-
-// Language.
-Language_t language = english;
// Set if homebrew PWAD stuff has been added.
boolean modifiedgame;
--- a/src/doomstat.h
+++ b/src/doomstat.h
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: doomstat.h 59 2005-08-31 21:21:18Z fraggle $
+// $Id: doomstat.h 66 2005-09-04 14:51:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -70,11 +70,6 @@
// -------------------------------------------
-// Language.
-extern Language_t language;
-
-
-// -------------------------------------------
// Selected skill type, map etc.
//
@@ -297,6 +292,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
+// Revision 1.5 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.4 2005/08/31 21:21:18 fraggle
// Better IWAD detection and identification. Support '-iwad' to specify
// the IWAD to use.
--- a/src/dstrings.c
+++ b/src/dstrings.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: dstrings.c 18 2005-07-23 18:56:07Z fraggle $
+// $Id: dstrings.c 66 2005-09-04 14:51:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.4 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.3 2005/07/23 18:56:07 fraggle
// Remove unneccessary pragmas
//
@@ -38,17 +42,13 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: dstrings.c 18 2005-07-23 18:56:07Z fraggle $";
+rcsid[] = "$Id: dstrings.c 66 2005-09-04 14:51:19Z fraggle $";
#include "dstrings.h"
-
-
-char* endmsg[] =
+char *doom1_endmsg[] =
{
- // DOOM1
- QUITMSG,
"please don't leave, there's more\ndemons to toast!",
"let's beat it -- this is turning\ninto a bloodbath!",
"i wouldn't leave if i were you. \ndos is much worse.",
@@ -56,7 +56,10 @@
"don't leave yet -- there's a\ndemon around that corner!",
"ya know, next time you come in here\ni'm gonna toast ya.",
"go ahead and leave. see if i care.",
+};
+char *doom2_endmsg[] =
+{
// QuitDOOM II messages
"you want to quit?\nthen, thou hast lost an eighth!",
"don't go now, there's a \ndimensional shambler waiting \nat the dos prompt!",
@@ -65,7 +68,16 @@
"look, bud. you leave now\nand you forfeit your body count!",
"just leave. when you come\nback, i'll be waiting with a bat.",
"you're lucky i don't smack\nyou for thinking about leaving.",
+};
+#if 0
+
+// UNUSED messages included in the source release
+
+char* endmsg[] =
+{
+ // DOOM1
+ QUITMSG,
// FinalDOOM?
"fuck you, pussy!\nget the fuck out!",
"you quit and i'll jizz\nin your cystholes!",
@@ -79,6 +91,7 @@
"THIS IS NO MESSAGE!\nPage intentionally left blank."
};
+#endif
--- a/src/dstrings.h
+++ b/src/dstrings.h
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: dstrings.h 18 2005-07-23 18:56:07Z fraggle $
+// $Id: dstrings.h 66 2005-09-04 14:51:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -23,6 +23,10 @@
//
//
// $Log$
+// Revision 1.4 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.3 2005/07/23 18:56:07 fraggle
// Remove unneccessary pragmas
//
@@ -69,9 +73,11 @@
// Not done in french?
// QuitDOOM messages
-#define NUM_QUITMESSAGES 15
+// 7 per each game type
+#define NUM_QUITMESSAGES 7
-extern char* endmsg[];
+extern char *doom1_endmsg[];
+extern char *doom2_endmsg[];
#endif
@@ -78,6 +84,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
+// Revision 1.4 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.3 2005/07/23 18:56:07 fraggle
// Remove unneccessary pragmas
//
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: m_menu.c 45 2005-08-06 18:37:47Z fraggle $
+// $Id: m_menu.c 66 2005-09-04 14:51:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.5 2005/09/04 14:51:19 fraggle
+// Display the correct quit messages according to which game is being played.
+// Remove "language" variable (do this through gettext, if ever)
+//
// Revision 1.4 2005/08/06 18:37:46 fraggle
// Fix low resolution mode
//
@@ -42,7 +46,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: m_menu.c 45 2005-08-06 18:37:47Z fraggle $";
+rcsid[] = "$Id: m_menu.c 66 2005-09-04 14:51:19Z fraggle $";
#include <unistd.h>
#include <sys/types.h>
@@ -1112,18 +1116,32 @@
}
+static char *M_SelectEndMessage(void)
+{
+ char **endmsg;
+ if (gamemission == doom)
+ {
+ // Doom 1
+ endmsg = doom1_endmsg;
+ }
+ else
+ {
+ // Doom 2
+
+ endmsg = doom2_endmsg;
+ }
+
+ return endmsg[gametic % NUM_QUITMESSAGES];
+}
+
+
void M_QuitDOOM(int choice)
{
- // We pick index 0 which is language sensitive,
- // or one at random, between 1 and maximum number.
- if (language != english )
- sprintf(endstring,"%s\n\n"DOSY, endmsg[0] );
- else
- sprintf(endstring,"%s\n\n"DOSY, endmsg[ (gametic%(NUM_QUITMESSAGES-2))+1 ]);
+ sprintf(endstring, "%s\n\n" DOSY, M_SelectEndMessage());
- M_StartMessage(endstring,M_QuitResponse,true);
+ M_StartMessage(endstring,M_QuitResponse,true);
}