summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hu_stuff.c126
-rw-r--r--src/i_video.c16
-rw-r--r--src/wi_stuff.c24
3 files changed, 31 insertions, 135 deletions
diff --git a/src/hu_stuff.c b/src/hu_stuff.c
index 79f0ae91..9e425cde 100644
--- a/src/hu_stuff.c
+++ b/src/hu_stuff.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: hu_stuff.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: hu_stuff.c 51 2005-08-10 08:45:35Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.3 2005/08/10 08:45:35 fraggle
+// Remove "if (french)" stuff, FRENCH define, detect french wad automatically
+//
// Revision 1.2 2005/07/23 16:44:55 fraggle
// Update copyright to GNU GPL
//
@@ -34,7 +37,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: hu_stuff.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: hu_stuff.c 51 2005-08-10 08:45:35Z fraggle $";
#include <ctype.h>
@@ -296,112 +299,6 @@ char *mapnamest[] = // TNT WAD map names.
};
-const char* shiftxform;
-
-const char french_shiftxform[] =
-{
- 0,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31,
- ' ', '!', '"', '#', '$', '%', '&',
- '"', // shift-'
- '(', ')', '*', '+',
- '?', // shift-,
- '_', // shift--
- '>', // shift-.
- '?', // shift-/
- '0', // shift-0
- '1', // shift-1
- '2', // shift-2
- '3', // shift-3
- '4', // shift-4
- '5', // shift-5
- '6', // shift-6
- '7', // shift-7
- '8', // shift-8
- '9', // shift-9
- '/',
- '.', // shift-;
- '<',
- '+', // shift-=
- '>', '?', '@',
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
- 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '[', // shift-[
- '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
- ']', // shift-]
- '"', '_',
- '\'', // shift-`
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
- 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '{', '|', '}', '~', 127
-
-};
-
-const char english_shiftxform[] =
-{
-
- 0,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31,
- ' ', '!', '"', '#', '$', '%', '&',
- '"', // shift-'
- '(', ')', '*', '+',
- '<', // shift-,
- '_', // shift--
- '>', // shift-.
- '?', // shift-/
- ')', // shift-0
- '!', // shift-1
- '@', // shift-2
- '#', // shift-3
- '$', // shift-4
- '%', // shift-5
- '^', // shift-6
- '&', // shift-7
- '*', // shift-8
- '(', // shift-9
- ':',
- ':', // shift-;
- '<',
- '+', // shift-=
- '>', '?', '@',
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
- 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '[', // shift-[
- '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
- ']', // shift-]
- '"', '_',
- '\'', // shift-`
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
- 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '{', '|', '}', '~', 127
-};
-
-char frenchKeyMap[128]=
-{
- 0,
- 1,2,3,4,5,6,7,8,9,10,
- 11,12,13,14,15,16,17,18,19,20,
- 21,22,23,24,25,26,27,28,29,30,
- 31,
- ' ','!','"','#','$','%','&','%','(',')','*','+',';','-',':','!',
- '0','1','2','3','4','5','6','7','8','9',':','M','<','=','>','?',
- '@','Q','B','C','D','E','F','G','H','I','J','K','L',',','N','O',
- 'P','A','R','S','T','U','V','Z','X','Y','W','^','\\','$','^','_',
- '@','Q','B','C','D','E','F','G','H','I','J','K','L',',','N','O',
- 'P','A','R','S','T','U','V','Z','X','Y','W','^','\\','$','^',127
-};
-
-char ForeignTranslation(unsigned char ch)
-{
- return ch < 128 ? frenchKeyMap[ch] : ch;
-}
-
void HU_Init(void)
{
@@ -409,11 +306,6 @@ void HU_Init(void)
int j;
char buffer[9];
- if (french)
- shiftxform = french_shiftxform;
- else
- shiftxform = english_shiftxform;
-
// load the heads-up font
j = HU_FONTSTART;
for (i=0;i<HU_FONTSIZE;i++)
@@ -559,8 +451,6 @@ void HU_Ticker(void)
chat_dest[i] = c;
else
{
- if (c >= 'a' && c <= 'z')
- c = (char) shiftxform[(unsigned char) c];
rc = HUlib_keyInIText(&w_inputbuffer[i], c);
if (rc && c == KEY_ENTER)
{
@@ -714,7 +604,7 @@ boolean HU_Responder(event_t *ev)
}
else
{
- c = ev->data1;
+ c = ev->data2;
// send a macro
if (altdown)
{
@@ -740,10 +630,6 @@ boolean HU_Responder(event_t *ev)
}
else
{
- if (french)
- c = ForeignTranslation(c);
- if (shiftdown || (c >= 'a' && c <= 'z'))
- c = shiftxform[c];
eatkey = HUlib_keyInIText(&w_chat, c);
if (eatkey)
{
diff --git a/src/i_video.c b/src/i_video.c
index c21283b8..8197e674 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_video.c 49 2005-08-07 20:01:00Z fraggle $
+// $Id: i_video.c 51 2005-08-10 08:45:35Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.18 2005/08/10 08:45:35 fraggle
+// Remove "if (french)" stuff, FRENCH define, detect french wad automatically
+//
// Revision 1.17 2005/08/07 20:01:00 fraggle
// Clear the screen on startup
//
@@ -84,7 +87,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_video.c 49 2005-08-07 20:01:00Z fraggle $";
+rcsid[] = "$Id: i_video.c 51 2005-08-10 08:45:35Z fraggle $";
#include <ctype.h>
#include <SDL.h>
@@ -330,6 +333,7 @@ void I_GetEvent(void)
case SDL_KEYDOWN:
event.type = ev_keydown;
event.data1 = xlatekey(&sdlevent.key.keysym);
+ event.data2 = sdlevent.key.keysym.unicode;
D_PostEvent(&event);
break;
case SDL_KEYUP:
@@ -681,16 +685,18 @@ void I_InitGraphics(void)
I_Error("Error setting video mode: %s\n", SDL_GetError());
}
+ SDL_ShowCursor(0);
+ SDL_WM_GrabInput(SDL_GRAB_ON);
+
if (multiply == 1)
screens[0] = (unsigned char *) (screen->pixels);
else
screens[0] = (unsigned char *) Z_Malloc (SCREENWIDTH * SCREENHEIGHT, PU_STATIC, NULL);
- SDL_ShowCursor(0);
- SDL_WM_GrabInput(SDL_GRAB_ON);
-
LoadDiskImage();
+ SDL_EnableUNICODE(1);
+
// start with a clear black screen
memset(screens[0], 0, SCREENWIDTH * SCREENHEIGHT);
diff --git a/src/wi_stuff.c b/src/wi_stuff.c
index 89b19049..f207488f 100644
--- a/src/wi_stuff.c
+++ b/src/wi_stuff.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: wi_stuff.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: wi_stuff.c 51 2005-08-10 08:45:35Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.3 2005/08/10 08:45:35 fraggle
+// Remove "if (french)" stuff, FRENCH define, detect french wad automatically
+//
// Revision 1.2 2005/07/23 16:44:57 fraggle
// Update copyright to GNU GPL
//
@@ -35,7 +38,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: wi_stuff.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: wi_stuff.c 51 2005-08-10 08:45:35Z fraggle $";
#include <stdio.h>
@@ -1664,16 +1667,17 @@ void WI_loadData(void)
// "secret"
sp_secret = W_CacheLumpName("WISCRT2", PU_STATIC);
- // Yuck.
- if (french)
+ // french wad uses WIOBJ (?)
+ if (W_CheckNumForName("WIOBJ") >= 0)
{
- // "items"
- if (netgame && !deathmatch)
- items = W_CacheLumpName("WIOBJ", PU_STATIC);
- else
- items = W_CacheLumpName("WIOSTI", PU_STATIC);
- } else
+ // "items"
+ if (netgame && !deathmatch)
+ items = W_CacheLumpName("WIOBJ", PU_STATIC);
+ else
+ items = W_CacheLumpName("WIOSTI", PU_STATIC);
+ } else {
items = W_CacheLumpName("WIOSTI", PU_STATIC);
+ }
// "frgs"
frags = W_CacheLumpName("WIFRGS", PU_STATIC);