]> icculus.org git repositories - taylor/freespace2.git/blob - include/keycontrol.h
Initial revision
[taylor/freespace2.git] / include / keycontrol.h
1 /*
2  * $Logfile: /Freespace2/code/Io/KeyControl.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Header file for managing keyboard/joystick/mouse button presses
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
14  * 2     10/07/98 10:53a Dave
15  * Initial checkin.
16  * 
17  * 1     10/07/98 10:49a Dave
18  * 
19  * 6     4/23/98 1:28a Dave
20  * Seemingly nailed the current_primary_bank and current_secondary_bank -1
21  * problem. Made sure non-critical button presses are _never_ sent to the
22  * server.
23  * 
24  * 5     3/12/98 4:02p Lawrance
25  * Cleanup how pause works, fix couple pause-related bugs.
26  * 
27  * 4     1/27/98 5:54p Lawrance
28  * extern Dead key set, so popups can use it.
29  * 
30  * 3     10/21/97 7:06p Hoffoss
31  * Overhauled the key/joystick control structure and usage throughout the
32  * entire FreeSpace code.  The whole system is very different now.
33  * 
34  * 2     9/15/97 11:38p Lawrance
35  * redo how game actions are recorded from player input and executed
36  * 
37  * 1     9/15/97 1:23p Lawrance
38  *
39  * $NoKeywords: $
40  */
41
42 #ifndef __FREESPACE_KEYCONTROL_H__
43 #define __FREESPACE_KEYCONTROL_H__
44
45 #include "controlsconfig.h"
46
47 // Holds the bit arrays that indicate which action is to be executed.
48 #define NUM_BUTTON_FIELDS       ((CCFG_MAX + 31) / 32)
49
50 extern int Dead_key_set[];
51 extern int Dead_key_set_size;
52
53 typedef struct button_info
54 {
55         int status[NUM_BUTTON_FIELDS];
56 } button_info;
57
58 void button_info_set(button_info *bi, int n);
59 void button_info_unset(button_info *bi, int n);
60 int button_info_query(button_info *bi, int n);
61 void button_info_do(button_info *bi);
62 void button_info_clear(button_info *bi);
63 void process_set_of_keys(int key, int count, int *list);
64 void game_process_pause_key();
65 void button_strip_noncritical_keys(button_info *bi);
66
67
68 #endif
69