summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-10-01 19:10:02 +0000
committerSimon Howard2008-10-01 19:10:02 +0000
commit16e361951eb7bce9726e4a96699429f2883bd68c (patch)
tree55b83cc346639acba2b357c3220005919ef4c7fd
parentd35a4b7cf3a206a35ac57e279fb36bad9436ab0b (diff)
downloadchocolate-doom-16e361951eb7bce9726e4a96699429f2883bd68c.tar.gz
chocolate-doom-16e361951eb7bce9726e4a96699429f2883bd68c.tar.bz2
chocolate-doom-16e361951eb7bce9726e4a96699429f2883bd68c.zip
Remove Hexen duplicate KEY_ definitions.
Subversion-branch: /branches/raven-branch Subversion-revision: 1317
-rw-r--r--src/hexen/am_map.c1
-rw-r--r--src/hexen/ct_chat.c1
-rw-r--r--src/hexen/d_net.c1
-rw-r--r--src/hexen/g_game.c30
-rw-r--r--src/hexen/h2def.h47
-rw-r--r--src/hexen/m_misc.c1
-rw-r--r--src/hexen/mn_menu.c1
7 files changed, 21 insertions, 61 deletions
diff --git a/src/hexen/am_map.c b/src/hexen/am_map.c
index b490e6f5..5a68bf91 100644
--- a/src/hexen/am_map.c
+++ b/src/hexen/am_map.c
@@ -23,6 +23,7 @@
#include "h2def.h"
+#include "doomkeys.h"
#include "i_video.h"
#include "i_swap.h"
#include "p_local.h"
diff --git a/src/hexen/ct_chat.c b/src/hexen/ct_chat.c
index 778d708e..09df13cf 100644
--- a/src/hexen/ct_chat.c
+++ b/src/hexen/ct_chat.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <ctype.h>
#include "h2def.h"
+#include "doomkeys.h"
#include "p_local.h"
#include "soundst.h"
#include "v_video.h"
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c
index 086b685f..2f6a53c3 100644
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -23,6 +23,7 @@
#include "h2def.h"
+#include "doomkeys.h"
#include "i_video.h"
#include "i_system.h"
#include "i_timer.h"
diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c
index d86f7d93..62eb249b 100644
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -24,12 +24,14 @@
#include <string.h>
#include "h2def.h"
+#include "doomkeys.h"
#include "i_video.h"
#include "i_system.h"
#include "i_timer.h"
#include "m_misc.h"
#include "p_local.h"
#include "soundst.h"
+#include "v_video.h"
#define AM_STARTKEY 9
@@ -596,41 +598,41 @@ void G_BuildTiccmd(ticcmd_t * cmd)
gamekeydown[KEY_BACKSPACE] = false; // Use one of each artifact
cmd->arti = NUMARTIFACTS;
}
- else if (gamekeydown[KEY_BACKSLASH] && !cmd->arti
+ else if (gamekeydown['\\'] && !cmd->arti
&& (players[consoleplayer].mo->health < MAXHEALTH))
{
- gamekeydown[KEY_BACKSLASH] = false;
+ gamekeydown['\\'] = false;
cmd->arti = arti_health;
}
- else if (gamekeydown[KEY_ZERO] && !cmd->arti)
+ else if (gamekeydown['0'] && !cmd->arti)
{
- gamekeydown[KEY_ZERO] = false;
+ gamekeydown['0'] = false;
cmd->arti = arti_poisonbag;
}
- else if (gamekeydown[KEY_NINE] && !cmd->arti)
+ else if (gamekeydown['9'] && !cmd->arti)
{
- gamekeydown[KEY_NINE] = false;
+ gamekeydown['9'] = false;
cmd->arti = arti_blastradius;
}
- else if (gamekeydown[KEY_EIGHT] && !cmd->arti)
+ else if (gamekeydown['8'] && !cmd->arti)
{
- gamekeydown[KEY_EIGHT] = false;
+ gamekeydown['8'] = false;
cmd->arti = arti_teleport;
}
- else if (gamekeydown[KEY_SEVEN] && !cmd->arti)
+ else if (gamekeydown['7'] && !cmd->arti)
{
- gamekeydown[KEY_SEVEN] = false;
+ gamekeydown['7'] = false;
cmd->arti = arti_teleportother;
}
- else if (gamekeydown[KEY_SIX] && !cmd->arti)
+ else if (gamekeydown['6'] && !cmd->arti)
{
- gamekeydown[KEY_SIX] = false;
+ gamekeydown['6'] = false;
cmd->arti = arti_egg;
}
- else if (gamekeydown[KEY_FIVE] && !cmd->arti
+ else if (gamekeydown['5'] && !cmd->arti
&& !players[consoleplayer].powers[pw_invulnerability])
{
- gamekeydown[KEY_FIVE] = false;
+ gamekeydown['5'] = false;
cmd->arti = arti_invulnerability;
}
diff --git a/src/hexen/h2def.h b/src/hexen/h2def.h
index 790e3ac1..82993815 100644
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -93,53 +93,6 @@
extern byte *destview, *destscreen; // PC direct to screen pointers
-//
-// most key data are simple ascii (uppercased)
-//
-#define KEY_RIGHTARROW 0xae
-#define KEY_LEFTARROW 0xac
-#define KEY_UPARROW 0xad
-#define KEY_DOWNARROW 0xaf
-#define KEY_ESCAPE 27
-#define KEY_ENTER 13
-#define KEY_F1 (0x80+0x3b)
-#define KEY_F2 (0x80+0x3c)
-#define KEY_F3 (0x80+0x3d)
-#define KEY_F4 (0x80+0x3e)
-#define KEY_F5 (0x80+0x3f)
-#define KEY_F6 (0x80+0x40)
-#define KEY_F7 (0x80+0x41)
-#define KEY_F8 (0x80+0x42)
-#define KEY_F9 (0x80+0x43)
-#define KEY_F10 (0x80+0x44)
-#define KEY_F11 (0x80+0x57)
-#define KEY_F12 (0x80+0x58)
-
-#define KEY_BACKSPACE 127
-#define KEY_PAUSE 0xff
-
-#define KEY_EQUALS 0x3d
-#define KEY_MINUS 0x2d
-
-#define KEY_RSHIFT (0x80+0x36)
-#define KEY_RCTRL (0x80+0x1d)
-#define KEY_RALT (0x80+0x38)
-
-#define KEY_LALT KEY_RALT
-
-#define KEY_FIVE 0x35
-#define KEY_SIX 0x36
-#define KEY_SEVEN 0x37
-#define KEY_EIGHT 0x38
-#define KEY_NINE 0x39
-#define KEY_ZERO 0x30
-#define KEY_BACKSLASH 0x5C
-
-
-#define FINEANGLES 8192
-#define FINEMASK (FINEANGLES-1)
-#define ANGLETOFINESHIFT 19 // 0x100000000 to 0x2000
-
/*
===============================================================================
diff --git a/src/hexen/m_misc.c b/src/hexen/m_misc.c
index 02287cd2..35569b78 100644
--- a/src/hexen/m_misc.c
+++ b/src/hexen/m_misc.c
@@ -34,6 +34,7 @@
#endif
#include <ctype.h>
#include "h2def.h"
+#include "doomkeys.h"
#include "i_system.h"
#include "m_argv.h"
#include "p_local.h"
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index 0177225e..717fbe28 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -26,6 +26,7 @@
#include <ctype.h>
#include "h2def.h"
+#include "doomkeys.h"
#include "i_system.h"
#include "i_video.h"
#include "p_local.h"