summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
authorSimon Howard2009-03-09 22:53:24 +0000
committerSimon Howard2009-03-09 22:53:24 +0000
commit20cb00076d39bcb8a5c2e82912af8200c97034cb (patch)
tree07ab355fa2c56448e7f4fa6fc7f4cafc5389aec0 /src/hexen
parentf0c5cc898d993d3388dfbce5833e8ccca7b2f03f (diff)
downloadchocolate-doom-20cb00076d39bcb8a5c2e82912af8200c97034cb.tar.gz
chocolate-doom-20cb00076d39bcb8a5c2e82912af8200c97034cb.tar.bz2
chocolate-doom-20cb00076d39bcb8a5c2e82912af8200c97034cb.zip
Remove WATCOMC usage (thanks Quasar)
Subversion-branch: /branches/raven-branch Subversion-revision: 1453
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/d_net.c2
-rw-r--r--src/hexen/g_game.c209
-rw-r--r--src/hexen/h2_main.c14
-rw-r--r--src/hexen/h2def.h9
-rw-r--r--src/hexen/p_mobj.c16
-rw-r--r--src/hexen/p_setup.c5
-rw-r--r--src/hexen/p_user.c8
-rw-r--r--src/hexen/r_main.c12
-rw-r--r--src/hexen/sb_bar.c4
-rw-r--r--src/hexen/st_start.c1
10 files changed, 30 insertions, 250 deletions
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c
index f199cd38..87afd626 100644
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -556,6 +556,7 @@ void D_ArbitrateNetStart(void)
int i;
boolean gotinfo[MAXNETNODES];
boolean gotClass[MAXNETNODES];
+ // haleyjd FIXME: important somehow?
#ifdef __WATCOMC__
int nextTic;
extern volatile int ticcount;
@@ -591,6 +592,7 @@ void D_ArbitrateNetStart(void)
}
}
}
+ // haleyjd FIXME: important somehow?
#ifdef __WATCOMC__
if (ticcount <= nextTic)
{ // only send packets every half second
diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c
index 931ba1bb..9684eb17 100644
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -161,9 +161,7 @@ char savedescription[32];
int inventoryTics;
-#ifdef __WATCOMC__
-extern externdata_t *i_ExternData;
-#endif
+// haleyjd: removed externdriver crap
static skill_t TempSkill;
static int TempEpisode;
@@ -200,14 +198,7 @@ void G_BuildTiccmd(ticcmd_t * cmd)
extern boolean artiskip;
-#ifdef __WATCOMC__
- int angleDelta;
- static int oldAngle;
- extern int newViewAngleOff;
- static int externInvKey;
- extern boolean automapactive;
- event_t ev;
-#endif
+ // haleyjd: removed externdriver crap
pClass = players[consoleplayer].class;
memset(cmd, 0, sizeof(*cmd));
@@ -230,14 +221,8 @@ void G_BuildTiccmd(ticcmd_t * cmd)
|| gamekeydown[key_speed]
|| joybuttons[joybspeed];
-#ifdef __WATCOMC__
- if (useexterndriver)
- {
- speed |= (i_ExternData->buttons & EBT_SPEED);
- strafe |= (i_ExternData->buttons & EBT_STRAFE);
- }
-#endif
-
+ // haleyjd: removed externdriver crap
+
forward = side = look = arti = flyheight = 0;
//
@@ -338,187 +323,13 @@ void G_BuildTiccmd(ticcmd_t * cmd)
{
look = -lspeed;
}
-#ifdef __WATCOMC__
- if (gamekeydown[key_lookcenter] && !useexterndriver)
- {
- look = TOCENTER;
- }
-#else
+ // haleyjd: removed externdriver crap
if (gamekeydown[key_lookcenter])
{
look = TOCENTER;
}
-#endif
-#ifdef __WATCOMC__
- if (useexterndriver && look != TOCENTER && (gamestate == GS_LEVEL ||
- gamestate == GS_INTERMISSION))
- {
- if (i_ExternData->moveForward)
- {
- forward += i_ExternData->moveForward;
- if (speed)
- {
- forward <<= 1;
- }
- }
- if (i_ExternData->angleTurn)
- {
- if (strafe)
- {
- side += i_ExternData->angleTurn;
- }
- else
- {
- cmd->angleturn += i_ExternData->angleTurn;
- }
- }
- if (i_ExternData->moveSideways)
- {
- side += i_ExternData->moveSideways;
- if (speed)
- {
- side <<= 1;
- }
- }
- if (i_ExternData->buttons & EBT_CENTERVIEW)
- {
- look = TOCENTER;
- oldAngle = 0;
- }
- else if (i_ExternData->pitch)
- {
- angleDelta = i_ExternData->pitch - oldAngle;
- if (abs(angleDelta) < 35)
- {
- look = angleDelta / 5;
- }
- else
- {
- look = 7 * (angleDelta > 0 ? 1 : -1);
- }
- if (look == TOCENTER)
- {
- look++;
- }
- oldAngle += look * 5;
- }
- if (i_ExternData->flyDirection)
- {
- if (i_ExternData->flyDirection > 0)
- {
- flyheight = 5;
- }
- else
- {
- flyheight = -5;
- }
- }
- if (abs(newViewAngleOff - i_ExternData->angleHead) < 3000)
- {
- newViewAngleOff = i_ExternData->angleHead;
- }
- if (i_ExternData->buttons & EBT_FIRE)
- {
- cmd->buttons |= BT_ATTACK;
- }
- if (i_ExternData->buttons & EBT_OPENDOOR)
- {
- cmd->buttons |= BT_USE;
- }
- if (i_ExternData->buttons & EBT_PAUSE)
- {
- cmd->buttons = BT_SPECIAL | BTS_PAUSE;
- i_ExternData->buttons &= ~EBT_PAUSE;
- }
- if (externInvKey & EBT_USEARTIFACT)
- {
- ev.type = ev_keyup;
- ev.data1 = key_useartifact;
- H2_PostEvent(&ev);
- externInvKey &= ~EBT_USEARTIFACT;
- }
- else if (i_ExternData->buttons & EBT_USEARTIFACT)
- {
- externInvKey |= EBT_USEARTIFACT;
- ev.type = ev_keydown;
- ev.data1 = key_useartifact;
- H2_PostEvent(&ev);
- }
- if (externInvKey & EBT_INVENTORYRIGHT)
- {
- ev.type = ev_keyup;
- ev.data1 = key_invright;
- H2_PostEvent(&ev);
- externInvKey &= ~EBT_INVENTORYRIGHT;
- }
- else if (i_ExternData->buttons & EBT_INVENTORYRIGHT)
- {
- externInvKey |= EBT_INVENTORYRIGHT;
- ev.type = ev_keydown;
- ev.data1 = key_invright;
- H2_PostEvent(&ev);
- }
- if (externInvKey & EBT_INVENTORYLEFT)
- {
- ev.type = ev_keyup;
- ev.data1 = key_invleft;
- H2_PostEvent(&ev);
- externInvKey &= ~EBT_INVENTORYLEFT;
- }
- else if (i_ExternData->buttons & EBT_INVENTORYLEFT)
- {
- externInvKey |= EBT_INVENTORYLEFT;
- ev.type = ev_keydown;
- ev.data1 = key_invleft;
- H2_PostEvent(&ev);
- }
- if (i_ExternData->buttons & EBT_FLYDROP)
- {
- flyheight = TOCENTER;
- }
- if (gamestate == GS_LEVEL)
- {
- if (externInvKey & EBT_MAP)
- { // automap
- ev.type = ev_keyup;
- ev.data1 = AM_STARTKEY;
- H2_PostEvent(&ev);
- externInvKey &= ~EBT_MAP;
- }
- else if (i_ExternData->buttons & EBT_MAP)
- {
- externInvKey |= EBT_MAP;
- ev.type = ev_keydown;
- ev.data1 = AM_STARTKEY;
- H2_PostEvent(&ev);
- }
- }
- if (i_ExternData->buttons & EBT_WEAPONCYCLE)
- {
- int curWeapon;
- player_t *pl;
-
- pl = &players[consoleplayer];
- curWeapon = pl->readyweapon;
- for (curWeapon = (curWeapon + 1) & 3;
- curWeapon != pl->readyweapon;
- curWeapon = (curWeapon + 1) & 3)
- {
- if (pl->weaponowned[curWeapon])
- {
- cmd->buttons |= BT_CHANGE;
- cmd->buttons |= curWeapon << BT_WEAPONSHIFT;
- break;
- }
- }
- }
- if (i_ExternData->buttons & EBT_JUMP)
- {
- cmd->arti |= AFLAG_JUMP;
- }
- }
-#endif
+ // haleyjd: removed externdriver crap
// Fly up/down/drop keys
if (gamekeydown[key_flyup])
@@ -532,14 +343,8 @@ void G_BuildTiccmd(ticcmd_t * cmd)
if (gamekeydown[key_flycenter])
{
flyheight = TOCENTER;
-#ifdef __WATCOMC__
- if (!useexterndriver)
- {
- look = TOCENTER;
- }
-#else
+ // haleyjd: removed externdriver crap
look = TOCENTER;
-#endif
}
// Use artifact key
if (gamekeydown[key_useartifact])
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 042128db..3892b8d4 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -25,11 +25,7 @@
// HEADER FILES ------------------------------------------------------------
-#ifdef __WATCOMC__
-#include <dos.h>
-#include <sys\types.h>
-#include <direct.h>
-#endif
+// haleyjd: removed WATCOMC
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@@ -282,10 +278,7 @@ void D_DoomMain(void)
ST_Message("Z_Init: Init zone memory allocation daemon.\n");
Z_Init();
-#ifdef __WATCOMC__
- I_StartupKeyboard();
- I_StartupJoystick();
-#endif
+ // haleyjd: removed WATCOMC
ST_Message("W_Init: Init WADfiles.\n");
@@ -856,7 +849,7 @@ static void CheckRecordFrom(void)
H2_GameLoop(); // Never returns
}
-#ifdef __WATCOMC__
+// haleyjd: removed WATCOMC
/*
void CleanExit(void)
{
@@ -869,7 +862,6 @@ void CleanExit(void)
exit(1);
}
*/
-#endif
//==========================================================================
//
diff --git a/src/hexen/h2def.h b/src/hexen/h2def.h
index a168ed15..5993fe55 100644
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -31,11 +31,7 @@
//#include <values.h>
#include "st_start.h"
-#ifdef __WATCOMC__
-#include <malloc.h>
-#define strcasecmp strcmpi
-#define strncasecmp strnicmp
-#endif
+// haleyjd: removed WATCOMC
// ticcmd:
@@ -786,7 +782,8 @@ byte *I_AllocLow(int length);
void I_Tactile(int on, int off, int total);
-#ifdef __WATCOMC__
+// haleyjd: was WATCOMC, again preserved for historical interest as in Heretic
+#if 0
extern boolean useexterndriver;
#define EBT_FIRE 1
diff --git a/src/hexen/p_mobj.c b/src/hexen/p_mobj.c
index 66097170..5d6f7097 100644
--- a/src/hexen/p_mobj.c
+++ b/src/hexen/p_mobj.c
@@ -832,14 +832,8 @@ void P_ZMovement(mobj_t * mo)
{
S_StartSound(mo, SFX_PLAYER_LAND);
}
-#ifdef __WATCOMC__
- if (!useexterndriver)
- {
- mo->player->centering = true;
- }
-#else
+ // haleyjd: removed externdriver crap
mo->player->centering = true;
-#endif
}
}
else if (mo->type >= MT_POTTERY1 && mo->type <= MT_POTTERY3)
@@ -1056,14 +1050,8 @@ static void PlayerLandedOnThing(mobj_t * mo, mobj_t * onmobj)
{
S_StartSound(mo, SFX_PLAYER_LAND);
}
-#ifdef __WATCOMC__
- if (!useexterndriver)
- {
- mo->player->centering = true;
- }
-#else
+ // haleyjd: removed externdriver crap
mo->player->centering = true;
-#endif
}
//----------------------------------------------------------------------------
diff --git a/src/hexen/p_setup.c b/src/hexen/p_setup.c
index 77b7eb5c..1d7c943a 100644
--- a/src/hexen/p_setup.c
+++ b/src/hexen/p_setup.c
@@ -671,6 +671,7 @@ void P_GroupLines(void)
=================
*/
+// haleyjd FIXME: CDMUSIC
#ifdef __WATCOMC__
extern boolean i_CDMusic;
#endif
@@ -689,7 +690,9 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
= players[i].itemcount = 0;
}
players[consoleplayer].viewz = 1; // will be set by player think
-
+
+
+ // haleyjd FIXME: CDMUSIC
#ifdef __WATCOMC__
if (i_CDMusic == false)
{
diff --git a/src/hexen/p_user.c b/src/hexen/p_user.c
index 9569d3f1..9f4e285c 100644
--- a/src/hexen/p_user.c
+++ b/src/hexen/p_user.c
@@ -881,14 +881,8 @@ void P_PlayerThink(player_t * player)
{
if (player->mo->z != player->mo->floorz)
{
-#ifdef __WATCOMC__
- if (!useexterndriver)
- {
- player->centering = true;
- }
-#else
+ // haleyjd: removed externdriver crap
player->centering = true;
-#endif
}
player->mo->flags2 &= ~MF2_FLY;
player->mo->flags &= ~MF_NOGRAVITY;
diff --git a/src/hexen/r_main.c b/src/hexen/r_main.c
index 30d7afb0..48e21ab2 100644
--- a/src/hexen/r_main.c
+++ b/src/hexen/r_main.c
@@ -31,9 +31,7 @@
int viewangleoffset;
-#ifdef __WATCOMC__
-int newViewAngleOff;
-#endif
+// haleyjd: removed WATCOMC
int validcount = 1; // increment every time a check is made
@@ -725,12 +723,8 @@ void R_SetupFrame(player_t * player)
//drawbsp = 1;
viewplayer = player;
-#ifdef __WATCOMC__
- if (newViewAngleOff)
- {
- viewangleoffset = newViewAngleOff << ANGLETOFINESHIFT;
- }
-#endif
+ // haleyjd: removed WATCOMC
+ // haleyjd FIXME: viewangleoffset handling?
viewangle = player->mo->angle + viewangleoffset;
tableAngle = viewangle >> ANGLETOFINESHIFT;
viewx = player->mo->x;
diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c
index 4a9e4dd8..13b41ae3 100644
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -99,6 +99,7 @@ static void CheatTrackFunc2(player_t * player, Cheat_t * cheat);
extern int ArmorIncrement[NUMCLASSES][NUMARMOR];
extern int AutoArmorSave[NUMCLASSES];
+// haleyjd FIXME: CDMUSIC
#ifdef __WATCOMC__
extern boolean i_CDMusic;
extern int i_CDMusicLength;
@@ -115,6 +116,7 @@ int curpos;
int inv_ptr;
int ArtifactFlash;
+// haleyjd FIXME: CDMUSIC
#ifndef __WATCOMC__
boolean i_CDMusic; // in Watcom, defined in i_ibm
#endif
@@ -1922,6 +1924,7 @@ static void CheatRevealFunc(player_t * player, Cheat_t * cheat)
static void CheatTrackFunc1(player_t * player, Cheat_t * cheat)
{
+ // haleyjd FIXME: CDMUSIC
#ifdef __WATCOMC__
char buffer[80];
@@ -1947,6 +1950,7 @@ static void CheatTrackFunc1(player_t * player, Cheat_t * cheat)
static void CheatTrackFunc2(player_t * player, Cheat_t * cheat)
{
+ // haleyjd FIXME: CDMUSIC
#ifdef __WATCOMC__
char buffer[80];
int track;
diff --git a/src/hexen/st_start.c b/src/hexen/st_start.c
index 1f3cca1f..897c1810 100644
--- a/src/hexen/st_start.c
+++ b/src/hexen/st_start.c
@@ -202,6 +202,7 @@ void ST_UpdateNetNotches(int notchPosition)
void ST_Progress(void)
{
+ // haleyjd FIXME: any way to get input here? SDL event loop?
#ifdef __WATCOMC__
// Check for ESC press -- during startup all events eaten here
I_StartupReadKeys();