mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
obsolete declaration cleanup and const correctness for Key_GetBinding
This commit is contained in:
parent
08210bc93f
commit
750100b3e3
2 changed files with 11 additions and 19 deletions
|
@ -361,11 +361,16 @@ typedef enum {
|
|||
} imt_t; // Input Mapping Table
|
||||
|
||||
// key_none should, preferably, be last
|
||||
typedef enum {key_game, key_console, key_message, key_menu, key_none} keydest_t;
|
||||
typedef enum {
|
||||
key_game,
|
||||
key_console,
|
||||
key_message,
|
||||
key_menu,
|
||||
key_none
|
||||
} keydest_t;
|
||||
|
||||
#ifndef __QFCC__
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
int down[2]; // key nums holding it down
|
||||
int state; // low bit is down state
|
||||
} kbutton_t;
|
||||
|
@ -375,30 +380,17 @@ extern imt_t game_target;
|
|||
|
||||
extern char *keybindings[IMT_LAST][QFK_LAST];
|
||||
extern int keydown[QFK_LAST];
|
||||
extern int key_lastpress;
|
||||
|
||||
extern char chat_buffer[];
|
||||
extern int chat_bufferlen;
|
||||
extern qboolean chat_team;
|
||||
|
||||
void Key_Event (knum_t key, short unicode, qboolean down);
|
||||
void Key_Init (void);
|
||||
void Key_Init_Cvars (void);
|
||||
void Key_WriteBindings (VFile *f);
|
||||
void Key_ClearStates (void);
|
||||
char *Key_GetBinding (imt_t imt, knum_t key);
|
||||
const char *Key_GetBinding (imt_t imt, knum_t key);
|
||||
void Key_SetBinding (imt_t target, knum_t keynum, const char *binding);
|
||||
|
||||
|
||||
void Key_ClearTyping (void);
|
||||
|
||||
float Key_KeyState (kbutton_t *key);
|
||||
const char *Key_KeynumToString (knum_t keynum);
|
||||
|
||||
#define MAXCMDLINE 256
|
||||
extern char key_lines[32][MAXCMDLINE];
|
||||
extern int edit_line;
|
||||
extern int key_linepos;
|
||||
#endif
|
||||
|
||||
#endif // _KEYS_H
|
||||
|
|
|
@ -381,7 +381,7 @@ keyname_t keynames[] = {
|
|||
qboolean
|
||||
Key_Game (knum_t key, short unicode)
|
||||
{
|
||||
char *kb;
|
||||
const char *kb;
|
||||
char cmd[1024];
|
||||
|
||||
kb = Key_GetBinding(game_target, key);
|
||||
|
@ -792,7 +792,7 @@ Key_Init_Cvars (void)
|
|||
"unbind wrappers to in_bind and in_unbind");
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
Key_GetBinding (imt_t imt, knum_t key)
|
||||
{
|
||||
return keybindings[imt][key];
|
||||
|
|
Loading…
Reference in a new issue