summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/d_ticcmd.h14
-rw-r--r--src/heretic/d_main.c1
-rw-r--r--src/heretic/d_net.c4
-rw-r--r--src/heretic/doomdef.h62
-rw-r--r--src/heretic/g_game.c2
-rw-r--r--src/heretic/in_lude.c1
-rw-r--r--src/heretic/mn_menu.c1
-rw-r--r--src/heretic/p_enemy.c1
-rw-r--r--src/heretic/p_inter.c1
-rw-r--r--src/heretic/p_map.c1
-rw-r--r--src/heretic/p_mobj.c1
-rw-r--r--src/heretic/p_plats.c1
-rw-r--r--src/heretic/p_pspr.c1
-rw-r--r--src/heretic/p_setup.c1
-rw-r--r--src/heretic/p_spec.c1
-rw-r--r--src/heretic/p_switch.c1
-rw-r--r--src/heretic/p_tick.c1
-rw-r--r--src/heretic/r_data.c1
-rw-r--r--src/heretic/r_local.h1
-rw-r--r--src/heretic/r_plane.c1
-rw-r--r--src/heretic/r_things.c1
-rw-r--r--src/i_system.h17
-rw-r--r--src/i_video.c2
-rw-r--r--src/i_video.h10
24 files changed, 47 insertions, 81 deletions
diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h
index 2968a352..1cd72d70 100644
--- a/src/d_ticcmd.h
+++ b/src/d_ticcmd.h
@@ -35,14 +35,20 @@
// and transmitted to other peers (multiplayer).
// Mainly movements/button commands per game tick,
// plus a checksum for internal state consistency.
+
typedef struct
{
signed char forwardmove; // *2048 for move
signed char sidemove; // *2048 for move
- short angleturn; // <<16 for angle delta
- byte chatchar;
- byte buttons;
- byte consistancy; // checks for net game
+ short angleturn; // <<16 for angle delta
+ byte chatchar;
+ byte buttons;
+ byte consistancy; // checks for net game
+
+ // Heretic/Hexen specific:
+
+ byte lookfly; // look/fly up/down/centering
+ byte arti; // artitype_t to use
} ticcmd_t;
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index 5bba9aa2..437abed3 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include "doomdef.h"
+#include "i_video.h"
#include "m_argv.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/d_net.c b/src/heretic/d_net.c
index bd94746a..8b8aba20 100644
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -27,6 +27,10 @@
#include "doomdef.h"
#include "doomkeys.h"
+#include "i_system.h"
+#include "i_timer.h"
+#include "i_video.h"
+
#define NCMD_EXIT 0x80000000
#define NCMD_RETRANSMIT 0x40000000
#define NCMD_SETUP 0x20000000
diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h
index 4a4e5299..d9f7f35c 100644
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -65,6 +65,9 @@
// gamemode/mission
#include "d_mode.h"
+// ticcmd_t
+#include "d_ticcmd.h"
+
extern byte *destview, *destscreen; // PC direct to screen pointers
#define SAVEGAMENAME "hticsav"
@@ -83,18 +86,6 @@ extern byte *destview, *destscreen; // PC direct to screen pointers
#define TICRATE 35 // number of tics / second
#define TICSPERSEC 35
-typedef struct
-{
- char forwardmove; // *2048 for move
- char sidemove; // *2048 for move
- short angleturn; // <<16 for angle delta
- short consistancy; // checks for net game
- byte chatchar;
- byte buttons;
- byte lookfly; // look/fly up/down/centering
- byte arti; // artitype_t to use
-} ticcmd_t;
-
#define BT_ATTACK 1
#define BT_USE 2
#define BT_CHANGE 4 // if true, the next 3 bits hold weapon num
@@ -693,34 +684,11 @@ void TryRunTics(void);
//---------
//SYSTEM IO
//---------
-#if 1
-#define SCREENWIDTH 320
-#define SCREENHEIGHT 200
-#else
-#define SCREENWIDTH 560
-#define SCREENHEIGHT 375
-#endif
byte *I_ZoneBase(int *size);
// called by startup code to get the ammount of memory to malloc
// for the zone management
-int I_GetTime(void);
-// called by D_DoomLoop
-// returns current time in tics
-
-void I_StartFrame(void);
-// called by D_DoomLoop
-// called before processing any tics in a frame (just after displaying a frame)
-// time consuming syncronous operations are performed here (joystick reading)
-// can call D_PostEvent
-
-void I_StartTic(void);
-// called by D_DoomLoop
-// called before processing each tic in a frame
-// quick syncronous operations are performed here
-// can call D_PostEvent
-
// asyncronous interrupt functions should maintain private ques that are
// read by the syncronous functions to be converted into events
@@ -728,39 +696,15 @@ void I_Init(void);
// called by D_DoomMain
// determines the hardware configuration and sets up the video mode
-void I_InitGraphics(void);
-
void I_InitNetwork(void);
void I_NetCmd(void);
-void I_Error(char *error, ...);
-// called by anything that can generate a terminal error
-// bad exit with diagnostic message
-
-void I_Quit(void);
-// called by M_Responder when quit is selected
-// clean exit, displays sell blurb
-
-void I_SetPalette(byte * palette);
-// takes full 8 bit values
-
void I_Update(void);
// Copy buffer to video
-void I_WipeUpdate(wipe_t wipe);
-// Copy buffer to video with wipe effect
-
-void I_WaitVBL(int count);
-// wait for vertical retrace or pause a bit
-
-void I_BeginRead(void);
-void I_EndRead(void);
-
byte *I_AllocLow(int length);
// allocates from low memory under dos, just mallocs under unix
-void I_Tactile(int on, int off, int total);
-
#ifdef __WATCOMC__
extern boolean useexterndriver;
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c
index 630f0619..59be2f87 100644
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -27,6 +27,8 @@
#include <string.h>
#include "doomdef.h"
#include "doomkeys.h"
+#include "i_timer.h"
+#include "i_system.h"
#include "m_misc.h"
#include "m_random.h"
#include "p_local.h"
diff --git a/src/heretic/in_lude.c b/src/heretic/in_lude.c
index 255e5f98..c64bd55b 100644
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -30,6 +30,7 @@
#include "doomdef.h"
#include "s_sound.h"
+#include "i_system.h"
#include "i_video.h"
#include "v_video.h"
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index 1a7a6f86..716282d6 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -26,6 +26,7 @@
#include <ctype.h>
#include "doomdef.h"
#include "doomkeys.h"
+#include "i_system.h"
#include "p_local.h"
#include "r_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_enemy.c b/src/heretic/p_enemy.c
index 59c5a981..188f7c30 100644
--- a/src/heretic/p_enemy.c
+++ b/src/heretic/p_enemy.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_inter.c b/src/heretic/p_inter.c
index f935ecea..20ab5013 100644
--- a/src/heretic/p_inter.c
+++ b/src/heretic/p_inter.c
@@ -24,6 +24,7 @@
// P_inter.c
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_map.c b/src/heretic/p_map.c
index 8c4bf51b..68353156 100644
--- a/src/heretic/p_map.c
+++ b/src/heretic/p_map.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "doomdef.h"
+#include "i_system.h"
#include "m_bbox.h"
#include "m_random.h"
#include "p_local.h"
diff --git a/src/heretic/p_mobj.c b/src/heretic/p_mobj.c
index 427a6238..dd7e80c6 100644
--- a/src/heretic/p_mobj.c
+++ b/src/heretic/p_mobj.c
@@ -24,6 +24,7 @@
// P_mobj.c
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "sounds.h"
diff --git a/src/heretic/p_plats.c b/src/heretic/p_plats.c
index 2cd706d8..93452b0f 100644
--- a/src/heretic/p_plats.c
+++ b/src/heretic/p_plats.c
@@ -24,6 +24,7 @@
// P_plats.c
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_pspr.c b/src/heretic/p_pspr.c
index 10666ff3..dc0b81ea 100644
--- a/src/heretic/p_pspr.c
+++ b/src/heretic/p_pspr.c
@@ -24,6 +24,7 @@
// P_pspr.c
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_setup.c b/src/heretic/p_setup.c
index c956cc48..78836f42 100644
--- a/src/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -28,6 +28,7 @@
#include "doomdef.h"
#include "i_swap.h"
+#include "i_system.h"
#include "m_argv.h"
#include "m_bbox.h"
#include "p_local.h"
diff --git a/src/heretic/p_spec.c b/src/heretic/p_spec.c
index 9ccd7b17..652a0142 100644
--- a/src/heretic/p_spec.c
+++ b/src/heretic/p_spec.c
@@ -24,6 +24,7 @@
// P_Spec.c
#include "doomdef.h"
+#include "i_system.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
diff --git a/src/heretic/p_switch.c b/src/heretic/p_switch.c
index 82951718..1c4dcf09 100644
--- a/src/heretic/p_switch.c
+++ b/src/heretic/p_switch.c
@@ -22,6 +22,7 @@
//-----------------------------------------------------------------------------
#include "doomdef.h"
+#include "i_system.h"
#include "p_local.h"
#include "s_sound.h"
#include "v_video.h"
diff --git a/src/heretic/p_tick.c b/src/heretic/p_tick.c
index 8a2b2577..089afdbf 100644
--- a/src/heretic/p_tick.c
+++ b/src/heretic/p_tick.c
@@ -24,6 +24,7 @@
// P_tick.c
#include "doomdef.h"
+#include "i_system.h"
#include "p_local.h"
#include "v_video.h"
diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c
index 7d7df2d1..16f6ca9f 100644
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -25,6 +25,7 @@
#include "doomdef.h"
#include "i_swap.h"
+#include "i_system.h"
#include "r_local.h"
#include "p_local.h"
diff --git a/src/heretic/r_local.h b/src/heretic/r_local.h
index d590cb7f..c7ae4329 100644
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -25,6 +25,7 @@
#ifndef __R_LOCAL__
#define __R_LOCAL__
+#include "i_video.h"
#include "v_patch.h"
#define ANGLETOSKYSHIFT 22 // sky map is 256*128*4 maps
diff --git a/src/heretic/r_plane.c b/src/heretic/r_plane.c
index bb694dd2..28c109a4 100644
--- a/src/heretic/r_plane.c
+++ b/src/heretic/r_plane.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "doomdef.h"
+#include "i_system.h"
#include "r_local.h"
planefunction_t floorfunc, ceilingfunc;
diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c
index 50db34af..a3bf3c19 100644
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "doomdef.h"
#include "i_swap.h"
+#include "i_system.h"
#include "r_local.h"
void R_DrawColumn(void);
diff --git a/src/i_system.h b/src/i_system.h
index 20a2f749..482ee669 100644
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -45,23 +45,6 @@ byte* I_ZoneBase (int *size);
boolean I_ConsoleStdout(void);
-// Called by D_DoomLoop,
-// called before processing any tics in a frame
-// (just after displaying a frame).
-// Time consuming syncronous operations
-// are performed here (joystick reading).
-// Can call D_PostEvent.
-//
-void I_StartFrame (void);
-
-
-//
-// Called by D_DoomLoop,
-// called before processing each tic in a frame.
-// Quick syncronous operations are performed here.
-// Can call D_PostEvent.
-void I_StartTic (void);
-
// Asynchronous interrupt functions should maintain private queues
// that are read by the synchronous functions
// to be converted into events.
diff --git a/src/i_video.c b/src/i_video.c
index f3be13e9..30938eb9 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -20,7 +20,7 @@
// 02111-1307, USA.
//
// DESCRIPTION:
-// DOOM graphics stuff for X11, UNIX.
+// Low level graphics code using SDL.
//
//-----------------------------------------------------------------------------
diff --git a/src/i_video.h b/src/i_video.h
index 7e9698fe..07c2842b 100644
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -102,6 +102,16 @@ void I_SetGrabMouseCallback(grabmouse_callback_t func);
void I_DisplayFPSDots(boolean dots_on);
void I_BindVideoVariables(void);
+// Called before processing any tics in a frame (just after displaying a frame).
+// Time consuming syncronous operations are performed here (joystick reading).
+
+void I_StartFrame (void);
+
+// Called before processing each tic in a frame.
+// Quick syncronous operations are performed here.
+
+void I_StartTic (void);
+
extern char *video_driver;
extern boolean screenvisible;
extern float mouse_acceleration;