summaryrefslogtreecommitdiff
path: root/src/doom/d_main.c
diff options
context:
space:
mode:
authorSimon Howard2008-09-06 19:33:03 +0000
committerSimon Howard2008-09-06 19:33:03 +0000
commit87be507ed7d66194903cfd80db76a30275469260 (patch)
tree1f9fc50f24ec07a3ee680053da6b3198586170bf /src/doom/d_main.c
parentc7a42fe50293d39285b2bcd6c15b14c7f9f66598 (diff)
downloadchocolate-doom-87be507ed7d66194903cfd80db76a30275469260.tar.gz
chocolate-doom-87be507ed7d66194903cfd80db76a30275469260.tar.bz2
chocolate-doom-87be507ed7d66194903cfd80db76a30275469260.zip
Split event code into a separate d_event.c file.
Subversion-branch: /branches/raven-branch Subversion-revision: 1203
Diffstat (limited to 'src/doom/d_main.c')
-rw-r--r--src/doom/d_main.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 2ab329bf..6a6ab57d 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -144,53 +144,6 @@ void D_DoAdvanceDemo (void);
//
-// EVENT HANDLING
-//
-// Events are asynchronous inputs generally generated by the game user.
-// Events can be discarded if no responder claims them
-//
-
-#define MAXEVENTS 64
-
-static event_t events[MAXEVENTS];
-static int eventhead;
-static int eventtail;
-
-
-//
-// 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;
-}
-
-// Read an event from the queue.
-
-event_t *D_PopEvent(void)
-{
- event_t *result;
-
- // No more events waiting.
-
- if (eventtail == eventhead)
- {
- return NULL;
- }
-
- result = &events[eventtail];
-
- // Advance to the next event in the queue.
-
- eventtail = (eventtail + 1) % MAXEVENTS;
-
- return result;
-}
-
-
-//
// D_ProcessEvents
// Send all the events of the given timestamp down the responder chain
//