summaryrefslogtreecommitdiff
path: root/src/hexen/h2_main.c
diff options
context:
space:
mode:
authorSimon Howard2008-10-01 18:00:13 +0000
committerSimon Howard2008-10-01 18:00:13 +0000
commitf8b216522bb4a2f2a8279412ff949955706d727e (patch)
tree62f1e30c973f6af4da63770f11f7448b4489d244 /src/hexen/h2_main.c
parentbf5e84859e2aca7f543f88a4a93bb971332aa989 (diff)
downloadchocolate-doom-f8b216522bb4a2f2a8279412ff949955706d727e.tar.gz
chocolate-doom-f8b216522bb4a2f2a8279412ff949955706d727e.tar.bz2
chocolate-doom-f8b216522bb4a2f2a8279412ff949955706d727e.zip
Use common versions of ticcmd_t and event_t for Hexen code. Remove old
i_video definitions and use common i_video.c interface. Subversion-branch: /branches/raven-branch Subversion-revision: 1312
Diffstat (limited to 'src/hexen/h2_main.c')
-rw-r--r--src/hexen/h2_main.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 603b2f47..c3d42c5a 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include <time.h>
#include "h2def.h"
+#include "i_system.h"
#include "m_argv.h"
#include "p_local.h"
#include "soundst.h"
@@ -118,9 +119,6 @@ int startmap;
boolean autostart;
boolean advancedemo;
FILE *debugfile;
-event_t events[MAXEVENTS];
-int eventhead;
-int eventtail;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@@ -536,10 +534,15 @@ void H2_ProcessEvents(void)
{
event_t *ev;
- for (; eventtail != eventhead;
- eventtail = (eventtail + 1) & (MAXEVENTS - 1))
+ for (;;)
{
- ev = &events[eventtail];
+ ev = D_PopEvent();
+
+ if (ev == NULL)
+ {
+ break;
+ }
+
if (F_Responder(ev))
{
continue;
@@ -554,20 +557,6 @@ void H2_ProcessEvents(void)
//==========================================================================
//
-// H2_PostEvent
-//
-// Called by the I/O functions when input is detected.
-//
-//==========================================================================
-
-void H2_PostEvent(event_t * ev)
-{
- events[eventhead] = *ev;
- eventhead = (eventhead + 1) & (MAXEVENTS - 1);
-}
-
-//==========================================================================
-//
// DrawAndBlit
//
//==========================================================================
@@ -634,7 +623,7 @@ static void DrawAndBlit(void)
NetUpdate();
// Flush buffered stuff to screen
- I_Update();
+ I_FinishUpdate();
}
//==========================================================================