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
This commit is contained in:
Simon Howard 2005-09-04 14:51:19 +00:00
parent 2e941b777d
commit 4fcb2575e7
5 changed files with 71 additions and 30 deletions

View file

@ -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"
@ -53,9 +57,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;

View file

@ -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
@ -69,11 +69,6 @@ extern char *gamedescription;
extern boolean modifiedgame;
// -------------------------------------------
// Language.
extern Language_t language;
// -------------------------------------------
// Selected skill type, map etc.
//
@ -297,6 +292,10 @@ extern int ticdup;
//-----------------------------------------------------------------------------
//
// $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.

View file

@ -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 @@ char* endmsg[] =
"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 @@ char* endmsg[] =
"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 @@ char* endmsg[] =
"THIS IS NO MESSAGE!\nPage intentionally left blank."
};
#endif

View file

@ -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,15 +73,21 @@
// 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
//-----------------------------------------------------------------------------
//
// $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
//

View file

@ -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 @@ void M_QuitResponse(int ch)
}
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);
}