X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=keys.h;h=3736ac4d561419af08bbf85197d1bf3a591b4fa3;hp=0cf98f4799b67f0a59595ff8ac4c085d030dcf68;hb=e41d0c1d5a96671a8337222ad74edb76c27e969f;hpb=97b89633e50db645c6c48493302c53db4ce1715a diff --git a/keys.h b/keys.h index 0cf98f47..3736ac4d 100644 --- a/keys.h +++ b/keys.h @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to: - + Free Software Foundation, Inc. 59 Temple Place - Suite 330 Boston, MA 02111-1307, USA @@ -32,7 +32,8 @@ // // these are the key numbers that should be passed to Key_Event // -extern enum { +typedef enum keynum_e +{ K_TAB = 9, K_ENTER = 13, K_ESCAPE = 27, @@ -108,10 +109,10 @@ extern enum { K_MOUSE1 = 512, K_MOUSE2, K_MOUSE3, + K_MWHEELUP, + K_MWHEELDOWN, K_MOUSE4, - K_MWHEELUP = K_MOUSE4, K_MOUSE5, - K_MWHEELDOWN = K_MOUSE5, K_MOUSE6, K_MOUSE7, K_MOUSE8, @@ -127,10 +128,22 @@ extern enum { // // joystick buttons // - K_JOY1 = 1024, + K_JOY1 = 768, K_JOY2, K_JOY3, K_JOY4, + K_JOY5, + K_JOY6, + K_JOY7, + K_JOY8, + K_JOY9, + K_JOY10, + K_JOY11, + K_JOY12, + K_JOY13, + K_JOY14, + K_JOY15, + K_JOY16, // // aux keys are for multi-buttoned joysticks to generate so they can use @@ -169,27 +182,32 @@ extern enum { K_AUX31, K_AUX32, -} keynum_t; - -typedef enum { key_game, key_message, key_menu } keydest_t; +} +keynum_t; -extern char *keybindings[8][256]; -extern char key_lines[32][256]; -extern int key_linepos; -extern int edit_line; -extern int history_line; -extern void Key_ClearEditLine(int edit_line); -extern qboolean chat_team; -extern char chat_buffer[256]; -extern unsigned int chat_bufferlen; +typedef enum keydest_e { key_game, key_message, key_menu } keydest_t; +#define MAX_INPUTLINES 32 +#define MAX_BINDMAPS 8 +#define MAX_KEYS 1024 +extern int edit_line; +extern int history_line; +extern char key_lines[MAX_INPUTLINES][MAX_INPUTLINE]; +extern int key_linepos; +extern qboolean key_insert; // insert key toggle (for editing) +extern keydest_t key_dest; // key_consoleactive bits // user wants console (halfscreen) #define KEY_CONSOLEACTIVE_USER 1 // console forced because there's nothing else active (fullscreen) #define KEY_CONSOLEACTIVE_FORCED 4 -extern int key_consoleactive; -extern keydest_t key_dest; +extern int key_consoleactive; +extern char *keybindings[MAX_BINDMAPS][MAX_KEYS]; + +extern void Key_ClearEditLine(int edit_line); +extern qboolean chat_team; +extern char chat_buffer[MAX_INPUTLINE]; +extern unsigned int chat_bufferlen; void Key_WriteBindings(qfile_t *f); void Key_Init(void);