summaryrefslogtreecommitdiff
path: root/src/doom
diff options
context:
space:
mode:
authorSimon Howard2008-09-06 20:06:14 +0000
committerSimon Howard2008-09-06 20:06:14 +0000
commit439a4b158b47c635100b0006470a7ed1e44e29f3 (patch)
tree292470a75ce641d09e6205063ffc645d68359917 /src/doom
parent87be507ed7d66194903cfd80db76a30275469260 (diff)
downloadchocolate-doom-439a4b158b47c635100b0006470a7ed1e44e29f3.tar.gz
chocolate-doom-439a4b158b47c635100b0006470a7ed1e44e29f3.tar.bz2
chocolate-doom-439a4b158b47c635100b0006470a7ed1e44e29f3.zip
Remove includes of doomdef.h where possible, move generic parts into top
level. Subversion-branch: /branches/raven-branch Subversion-revision: 1204
Diffstat (limited to 'src/doom')
-rw-r--r--src/doom/am_map.c1
-rw-r--r--src/doom/d_iwad.c1
-rw-r--r--src/doom/d_player.h1
-rw-r--r--src/doom/doomdef.h110
-rw-r--r--src/doom/g_game.c1
-rw-r--r--src/doom/hu_lib.c1
-rw-r--r--src/doom/hu_stuff.c1
-rw-r--r--src/doom/m_menu.c1
-rw-r--r--src/doom/r_defs.h1
-rw-r--r--src/doom/st_stuff.c1
10 files changed, 11 insertions, 108 deletions
diff --git a/src/doom/am_map.c b/src/doom/am_map.c
index 5fbe748a..9b662ac2 100644
--- a/src/doom/am_map.c
+++ b/src/doom/am_map.c
@@ -30,6 +30,7 @@
#include "deh_main.h"
#include "z_zone.h"
+#include "doomkeys.h"
#include "doomdef.h"
#include "st_stuff.h"
#include "p_local.h"
diff --git a/src/doom/d_iwad.c b/src/doom/d_iwad.c
index 032679e6..dcf2651a 100644
--- a/src/doom/d_iwad.c
+++ b/src/doom/d_iwad.c
@@ -30,6 +30,7 @@
#include <string.h>
#include "deh_main.h"
+#include "doomkeys.h"
#include "doomdef.h"
#include "doomstat.h"
#include "i_system.h"
diff --git a/src/doom/d_player.h b/src/doom/d_player.h
index 46b9b6c0..8bdccf46 100644
--- a/src/doom/d_player.h
+++ b/src/doom/d_player.h
@@ -45,6 +45,7 @@
// as commands per game tick.
#include "d_ticcmd.h"
+#include "net_defs.h"
diff --git a/src/doom/doomdef.h b/src/doom/doomdef.h
index 52964242..6db199d4 100644
--- a/src/doom/doomdef.h
+++ b/src/doom/doomdef.h
@@ -31,38 +31,7 @@
#include <stdio.h>
#include <string.h>
-// #define macros to provide functions missing in Windows.
-// Outside Windows, we use strings.h for str[n]casecmp.
-
-
-#ifdef _WIN32
-
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
-
-#else
-
-#include <strings.h>
-
-#endif
-
-
-//
-// The packed attribute forces structures to be packed into the minimum
-// space necessary. If this is not done, the compiler may align structure
-// fields differently to optimise memory access, inflating the overall
-// structure size. It is important to use the packed attribute on certain
-// structures where alignment is important, particularly data read/written
-// to disk.
-//
-
-#ifdef __GNUC__
-#define PACKEDATTR __attribute__((packed))
-#else
-#define PACKEDATTR
-#endif
+#include "i_timer.h"
//
// Global parameters/defines.
@@ -114,27 +83,6 @@ typedef enum
// most parameter validation debugging code will not be compiled
#define RANGECHECK
-
-
-// Screen width and height.
-
-#define SCREENWIDTH 320
-#define SCREENHEIGHT 200
-
-// Screen width used for "squash" scale functions
-
-#define SCREENWIDTH_4_3 256
-
-// Screen height used for "stretch" scale functions.
-
-#define SCREENHEIGHT_4_3 240
-
-// The maximum number of players, multiplayer/networking.
-#define MAXPLAYERS 4
-
-// State updates, number of tics / second.
-#define TICRATE 35
-
// The current state of the game: whether we are
// playing, gazing at the intermission screen,
// the game final animation, or a demo.
@@ -254,59 +202,5 @@ typedef enum
} powerduration_t;
-
-// fraggle: moved key definitions to a separate file
-
-#include "doomkeys.h"
-
-
-// DOOM basic types (boolean),
-// and max/min values.
-//#include "doomtype.h"
-
-// Fixed point.
-//#include "m_fixed.h"
-
-// Endianess handling.
-//#include "m_swap.h"
-
-
-// Binary Angles, sine/cosine/atan lookups.
-//#include "tables.h"
-
-// Event type.
-//#include "d_event.h"
-
-// Game function, skills.
-//#include "g_game.h"
-
-// All external data is defined here.
-//#include "doomdata.h"
-
-// All important printed strings.
-// Language selection (message strings).
-//#include "dstrings.h"
-
-// Player is a special actor.
-//struct player_s;
-
-
-//#include "d_items.h"
-//#include "d_player.h"
-//#include "p_mobj.h"
-//#include "d_net.h"
-
-// PLAY
-//#include "p_tick.h"
-
-
-
-
-// Header, generated by sound utility.
-// The utility was written by Dave Taylor.
-//#include "sounds.h"
-
-
-
-
#endif // __DOOMDEF__
+
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 44e77a74..978f38ee 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -30,6 +30,7 @@
#include <math.h>
#include "doomdef.h"
+#include "doomkeys.h"
#include "doomstat.h"
#include "deh_main.h"
diff --git a/src/doom/hu_lib.c b/src/doom/hu_lib.c
index a6b00f3f..5d8428ba 100644
--- a/src/doom/hu_lib.c
+++ b/src/doom/hu_lib.c
@@ -27,6 +27,7 @@
#include <ctype.h>
#include "doomdef.h"
+#include "doomkeys.h"
#include "v_video.h"
#include "i_swap.h"
diff --git a/src/doom/hu_stuff.c b/src/doom/hu_stuff.c
index 886236ba..ace4cef2 100644
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@ -27,6 +27,7 @@
#include <ctype.h>
#include "doomdef.h"
+#include "doomkeys.h"
#include "z_zone.h"
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index aab2afce..67bcd125 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -31,6 +31,7 @@
#include "doomdef.h"
+#include "doomkeys.h"
#include "dstrings.h"
#include "d_main.h"
diff --git a/src/doom/r_defs.h b/src/doom/r_defs.h
index 4e0d85b7..fe3517c2 100644
--- a/src/doom/r_defs.h
+++ b/src/doom/r_defs.h
@@ -42,6 +42,7 @@
// SECTORS do store MObjs anyway.
#include "p_mobj.h"
+#include "i_video.h"
diff --git a/src/doom/st_stuff.c b/src/doom/st_stuff.c
index f92d2dda..22d98685 100644
--- a/src/doom/st_stuff.c
+++ b/src/doom/st_stuff.c
@@ -39,6 +39,7 @@
#include "deh_main.h"
#include "deh_misc.h"
#include "doomdef.h"
+#include "doomkeys.h"
#include "g_game.h"