summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
authorSimon Howard2008-09-17 20:07:18 +0000
committerSimon Howard2008-09-17 20:07:18 +0000
commit90056c594d74eb1b938e34d02833435bd23e0bf7 (patch)
tree8d8b0ebee70c0ee650ca2751984139ede61c2c0a /src/heretic
parent967d3910e3957417630085237a95cdac546b1bd4 (diff)
downloadchocolate-doom-90056c594d74eb1b938e34d02833435bd23e0bf7.tar.gz
chocolate-doom-90056c594d74eb1b938e34d02833435bd23e0bf7.tar.bz2
chocolate-doom-90056c594d74eb1b938e34d02833435bd23e0bf7.zip
Remove heretic definitions for fixed math arithmetic and endianness
conversion macros; use the ones from the common code. Subversion-branch: /branches/raven-branch Subversion-revision: 1242
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/Makefile.am2
-rw-r--r--src/heretic/d_main.c15
-rw-r--r--src/heretic/doomdef.h35
-rw-r--r--src/heretic/f_finale.c4
-rw-r--r--src/heretic/m_misc.c5
-rw-r--r--src/heretic/p_setup.c2
-rw-r--r--src/heretic/r_data.c1
-rw-r--r--src/heretic/r_things.c1
-rw-r--r--src/heretic/v_video.c2
9 files changed, 12 insertions, 55 deletions
diff --git a/src/heretic/Makefile.am b/src/heretic/Makefile.am
index 179730b2..5f6bc865 100644
--- a/src/heretic/Makefile.am
+++ b/src/heretic/Makefile.am
@@ -1,5 +1,5 @@
-AM_CFLAGS=-I..
+AM_CFLAGS=-I.. @SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
noinst_LIBRARIES=libheretic.a
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index e274044c..bc1b0899 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -66,21 +66,6 @@ void D_AdvanceDemo(void);
void F_Drawer(void);
boolean F_Responder(event_t * ev);
-//---------------------------------------------------------------------------
-//
-// FUNC FixedDiv
-//
-//---------------------------------------------------------------------------
-
-fixed_t FixedDiv(fixed_t a, fixed_t b)
-{
- if ((abs(a) >> 14) >= abs(b))
- {
- return ((a ^ b) < 0 ? INT_MIN : INT_MAX);
- }
- return (FixedDiv2(a, b));
-}
-
/*
===============================================================================
diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h
index bdf78a19..654c1bd8 100644
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -62,6 +62,7 @@
// events
#include "d_event.h"
+// gamemode/mission
#include "d_mode.h"
extern byte *destview, *destscreen; // PC direct to screen pointers
@@ -666,40 +667,6 @@ extern boolean autostart;
===============================================================================
*/
-
-fixed_t FixedMul(fixed_t a, fixed_t b);
-fixed_t FixedDiv(fixed_t a, fixed_t b);
-fixed_t FixedDiv2(fixed_t a, fixed_t b);
-
-#ifdef __WATCOMC__
-#pragma aux FixedMul = \
- "imul ebx", \
- "shrd eax,edx,16" \
- parm [eax] [ebx] \
- value [eax] \
- modify exact [eax edx]
-
-#pragma aux FixedDiv2 = \
- "cdq", \
- "shld edx,eax,16", \
- "sal eax,16", \
- "idiv ebx" \
- parm [eax] [ebx] \
- value [eax] \
- modify exact [eax edx]
-#endif
-
-#ifdef __BIG_ENDIAN__
-short ShortSwap(short);
-long LongSwap(long);
-#define SHORT(x) ShortSwap(x)
-#define LONG(x) LongSwap(x)
-#else
-#define SHORT(x) (x)
-#define LONG(x) (x)
-#endif
-
-
#include "z_zone.h"
//----------
diff --git a/src/heretic/f_finale.c b/src/heretic/f_finale.c
index 10d11d7e..50b28efe 100644
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -22,9 +22,11 @@
//-----------------------------------------------------------------------------
// F_finale.c
+#include <ctype.h>
+
#include "doomdef.h"
+#include "i_swap.h"
#include "s_sound.h"
-#include <ctype.h>
int finalestage; // 0 = text, 1 = art screen
int finalecount;
diff --git a/src/heretic/m_misc.c b/src/heretic/m_misc.c
index 4d9f6b5d..91642f02 100644
--- a/src/heretic/m_misc.c
+++ b/src/heretic/m_misc.c
@@ -23,18 +23,15 @@
// M_misc.c
-#ifdef __NeXT__
-#include <libc.h>
-#else
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
-#endif
#include <ctype.h>
#include "doomdef.h"
+#include "i_swap.h"
#include "s_sound.h"
int myargc;
diff --git a/src/heretic/p_setup.c b/src/heretic/p_setup.c
index 03b1a59c..6d512293 100644
--- a/src/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -25,7 +25,9 @@
#include <math.h>
#include <stdlib.h>
+
#include "doomdef.h"
+#include "i_swap.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c
index e766becf..7d7df2d1 100644
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -24,6 +24,7 @@
// R_data.c
#include "doomdef.h"
+#include "i_swap.h"
#include "r_local.h"
#include "p_local.h"
diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c
index 1c7f1889..50db34af 100644
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "doomdef.h"
+#include "i_swap.h"
#include "r_local.h"
void R_DrawColumn(void);
diff --git a/src/heretic/v_video.c b/src/heretic/v_video.c
index 09812ce0..28d2f476 100644
--- a/src/heretic/v_video.c
+++ b/src/heretic/v_video.c
@@ -25,6 +25,8 @@
#include "doomdef.h"
+#include "i_swap.h"
+
#define SC_INDEX 0x3c4
byte *screen;