2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Io/KeyControl.h $
15 * Header file for managing keyboard/joystick/mouse button presses
18 * Revision 1.2 2002/06/09 04:41:13 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 2 10/07/98 10:53a Dave
28 * 1 10/07/98 10:49a Dave
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
35 * 5 3/12/98 4:02p Lawrance
36 * Cleanup how pause works, fix couple pause-related bugs.
38 * 4 1/27/98 5:54p Lawrance
39 * extern Dead key set, so popups can use it.
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.
45 * 2 9/15/97 11:38p Lawrance
46 * redo how game actions are recorded from player input and executed
48 * 1 9/15/97 1:23p Lawrance
53 #ifndef __FREESPACE_KEYCONTROL_H__
54 #define __FREESPACE_KEYCONTROL_H__
56 #include "controlsconfig.h"
58 // Holds the bit arrays that indicate which action is to be executed.
59 #define NUM_BUTTON_FIELDS ((CCFG_MAX + 31) / 32)
61 extern int Dead_key_set[];
62 extern int Dead_key_set_size;
64 typedef struct button_info
66 int status[NUM_BUTTON_FIELDS];
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);