enlarge various key arrays to hold 1024 keys
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3888
d7cf8633-e32d-0410-b094-
e92efae38249
static int key_count; // incremented every key event
static int key_bmap, key_bmap2;
static int key_count; // incremented every key event
static int key_bmap, key_bmap2;
-char *keybindings[8][256];
-static qboolean consolekeys[256]; // if true, can't be rebound while in
+char *keybindings[8][1024];
+static qboolean consolekeys[1024]; // if true, can't be rebound while in
-static qboolean menubound[256]; // if true, can't be rebound while in
+static qboolean menubound[1024]; // if true, can't be rebound while in
-static unsigned int key_repeats[256]; // if > 1, it is autorepeating
-static qboolean keydown[256];
+static unsigned int key_repeats[1024]; // if > 1, it is autorepeating
+static qboolean keydown[1024];
typedef struct {
const char *name;
typedef struct {
const char *name;
int i, j;
for (j = 0; j < 8; j++)
int i, j;
for (j = 0; j < 8; j++)
- for (i = 0; i < 256; i++)
+ for (i = 0; i < sizeof(keybindings[0])/sizeof(keybindings[0][0]); i++)
if (keybindings[j][i])
Key_SetBinding (i, j, "");
}
if (keybindings[j][i])
Key_SetBinding (i, j, "");
}
- for (i = 0; i < 256; i++)
+ for (i = 0; i < sizeof(keybindings[0])/sizeof(keybindings[0][0]); i++)
if (keybindings[0][i])
FS_Printf (f, "bind %s \"%s\"\n",
Key_KeynumToString (i), keybindings[0][i]);
for (j = 1; j < 8; j++)
if (keybindings[0][i])
FS_Printf (f, "bind %s \"%s\"\n",
Key_KeynumToString (i), keybindings[0][i]);
for (j = 1; j < 8; j++)
- for (i = 0; i < 256; i++)
+ for (i = 0; i < sizeof(keybindings[0])/sizeof(keybindings[0][0]); i++)
if (keybindings[j][i])
FS_Printf (f, "in_bind %d %s \"%s\"\n",
j, Key_KeynumToString (i), keybindings[j][i]);
if (keybindings[j][i])
FS_Printf (f, "in_bind %d %s \"%s\"\n",
j, Key_KeynumToString (i), keybindings[j][i]);
- for (i = 0;i < 256;i++)
+ for (i = 0; i < sizeof(keydown)/sizeof(keydown[0]); i++)
{
keydown[i] = false;
key_repeats[i] = 0;
{
keydown[i] = false;
key_repeats[i] = 0;
//
// joystick buttons
//
//
// joystick buttons
//
typedef enum { key_game, key_message, key_menu } keydest_t;
typedef enum { key_game, key_message, key_menu } keydest_t;
-extern char *keybindings[8][256];
+extern char *keybindings[8][1024];
extern char key_lines[32][256];
extern int key_linepos;
extern int edit_line;
extern char key_lines[32][256];
extern int key_linepos;
extern int edit_line;