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