summaryrefslogtreecommitdiff
path: root/src/heretic/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/heretic/d_main.c')
-rw-r--r--src/heretic/d_main.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index 437abed3..6107ba16 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -64,36 +64,6 @@ void D_AdvanceDemo(void);
void F_Drawer(void);
boolean F_Responder(event_t * ev);
-/*
-===============================================================================
-
- EVENT HANDLING
-
-Events are asyncronous inputs generally generated by the game user.
-
-Events can be discarded if no responder claims them
-
-===============================================================================
-*/
-
-event_t events[MAXEVENTS];
-int eventhead;
-int eventtail;
-
-//---------------------------------------------------------------------------
-//
-// PROC D_PostEvent
-//
-// Called by the I/O functions when input is detected.
-//
-//---------------------------------------------------------------------------
-
-void D_PostEvent(event_t * ev)
-{
- events[eventhead] = *ev;
- eventhead = (eventhead + 1) & (MAXEVENTS - 1);
-}
-
//---------------------------------------------------------------------------
//
// PROC D_ProcessEvents
@@ -106,10 +76,8 @@ void D_ProcessEvents(void)
{
event_t *ev;
- for (; eventtail != eventhead;
- eventtail = (eventtail + 1) & (MAXEVENTS - 1))
+ while ((ev = D_PopEvent()) != NULL)
{
- ev = &events[eventtail];
if (F_Responder(ev))
{
continue;