d_event.h (841B)
1 #ifndef __D_EVENT__ 2 #define __D_EVENT__ 3 4 #include "doomdef.h" 5 6 typedef enum { 7 ev_keydown, 8 ev_keyup, 9 ev_mouse, 10 ev_joystick 11 }evtype_t; 12 13 14 typedef struct { 15 evtype_t type; 16 int data1; 17 int data2; 18 int data3; 19 }event_t; 20 21 22 typedef enum { 23 ga_nothing, 24 ga_loadlevel, 25 ga_newgame, 26 ga_loadgame, 27 ga_savegame, 28 ga_playdemo, 29 ga_completed, 30 ga_victory, 31 ga_worlddone 32 } gameaction_t; 33 34 typedef enum { 35 BT_ATTACK = 1, 36 BT_USE = 2, 37 BT_SPECIAL = 128, 38 BT_SPECIALMASK = 3, 39 BT_CHANGE = 4, 40 BT_WEAPONMASK = (8+16+32), 41 BT_WEAPONSHIFT = 3, 42 BTS_PAUSE = 1, 43 BTS_SAVEGAME = 2, 44 BTS_SAVEMASK = (4+8+16), 45 BTS_SAVESHIFT = 2 46 }buttoncode_t; 47 48 #define MAXEVENTS 64 49 50 extern event_t events[MAXEVENTS]; 51 extern int eventhead; 52 extern int eventtail; 53 extern gameaction_t gameaction; 54 55 #endif