diff options
author | Simon Howard | 2008-10-01 18:00:13 +0000 |
---|---|---|
committer | Simon Howard | 2008-10-01 18:00:13 +0000 |
commit | f8b216522bb4a2f2a8279412ff949955706d727e (patch) | |
tree | 62f1e30c973f6af4da63770f11f7448b4489d244 /src/hexen/h2_main.c | |
parent | bf5e84859e2aca7f543f88a4a93bb971332aa989 (diff) | |
download | chocolate-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.c | 31 |
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(); } //========================================================================== |