1 // SONIC ROBO BLAST 2 2 //----------------------------------------------------------------------------- 3 // Copyright (C) 1993-1996 by id Software, Inc. 4 // Copyright (C) 1998-2000 by DooM Legacy Team. 5 // Copyright (C) 1999-2020 by Sonic Team Junior. 6 // 7 // This program is free software distributed under the 8 // terms of the GNU General Public License, version 2. 9 // See the 'LICENSE' file for more details. 10 //----------------------------------------------------------------------------- 11 /// \file d_event.h 12 /// \brief Event handling 13 14 #ifndef __D_EVENT__ 15 #define __D_EVENT__ 16 17 #include "doomtype.h" 18 #include "g_state.h" 19 20 // Input event types. 21 typedef enum 22 { 23 ev_keydown, 24 ev_keyup, 25 ev_console, 26 ev_mouse, 27 ev_joystick, 28 ev_mouse2, 29 ev_joystick2, 30 } evtype_t; 31 32 // Event structure. 33 typedef struct 34 { 35 evtype_t type; 36 INT32 data1; // keys / mouse/joystick buttons 37 INT32 data2; // mouse/joystick x move 38 INT32 data3; // mouse/joystick y move 39 } event_t; 40 41 // 42 // GLOBAL VARIABLES 43 // 44 #define MAXEVENTS 128 45 46 extern event_t events[MAXEVENTS]; 47 extern INT32 eventhead, eventtail; 48 49 #endif 50