# Correct the needed linklibs in curl-config also.
[AROS-Contrib.git] / Games / Doom / d_event.h
blobf44039f35af3872ff9b439be00a0c6c41530504c
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15 // for more details.
17 // DESCRIPTION:
19 //
20 //-----------------------------------------------------------------------------
23 #ifndef __D_EVENT__
24 #define __D_EVENT__
27 #include "doomtype.h"
31 // Event handling.
34 // Input event types.
35 typedef enum
37 ev_keydown,
38 ev_keyup,
39 ev_mouse,
40 ev_joystick
41 } evtype_t;
43 // Event structure.
44 typedef struct
46 evtype_t type;
47 int data1; // keys / mouse/joystick buttons
48 int data2; // mouse/joystick x move
49 int data3; // mouse/joystick y move
50 } event_t;
53 typedef enum
55 ga_nothing,
56 ga_loadlevel,
57 ga_newgame,
58 ga_loadgame,
59 ga_savegame,
60 ga_playdemo,
61 ga_completed,
62 ga_victory,
63 ga_worlddone,
64 ga_screenshot
65 } gameaction_t;
70 // Button/action code definitions.
72 typedef enum
74 // Press "Fire".
75 BT_ATTACK = 1,
76 // Use button, to open doors, activate switches.
77 BT_USE = 2,
79 // Flag: game events, not really buttons.
80 BT_SPECIAL = 128,
81 BT_SPECIALMASK = 3,
83 // Flag, weapon change pending.
84 // If true, the next 3 bits hold weapon num.
85 BT_CHANGE = 4,
86 // The 3bit weapon mask and shift, convenience.
87 BT_WEAPONMASK = (8+16+32),
88 BT_WEAPONSHIFT = 3,
90 // Pause the game.
91 BTS_PAUSE = 1,
92 // Save the game at each console.
93 BTS_SAVEGAME = 2,
95 // Savegame slot numbers
96 // occupy the second byte of buttons.
97 BTS_SAVEMASK = (4+8+16),
98 BTS_SAVESHIFT = 2
99 } buttoncode_t;
105 // GLOBAL VARIABLES
107 #define MAXEVENTS 64
109 extern event_t events[MAXEVENTS];
110 extern int eventhead;
111 extern int eventtail;
113 extern gameaction_t gameaction;
116 #endif
117 //-----------------------------------------------------------------------------
119 // $Log$
120 // Revision 1.1 2000/02/29 18:21:05 stegerg
121 // Doom port based on ADoomPPC. Read README.AROS!
124 //-----------------------------------------------------------------------------