mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
keys: Simplify r1097.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1098 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3ecdc28743
commit
6ae9f2e37e
1 changed files with 22 additions and 35 deletions
57
Quake/keys.c
57
Quake/keys.c
|
@ -858,41 +858,28 @@ void Key_Init (void)
|
||||||
//
|
//
|
||||||
// initialize consolekeys[]
|
// initialize consolekeys[]
|
||||||
//
|
//
|
||||||
for (i = 0; i < MAX_KEYS; i++)
|
memcpy(consolekeys, specialkeys, MAX_KEYS * sizeof(qboolean));
|
||||||
{
|
for (i = 32; i < 127; i++) // ascii characters
|
||||||
switch (i)
|
consolekeys[i] = true;
|
||||||
{
|
consolekeys['`'] = false;
|
||||||
case K_KP_NUMLOCK:
|
consolekeys['~'] = false;
|
||||||
case K_KP_SLASH:
|
consolekeys[K_KP_NUMLOCK] = true;
|
||||||
case K_KP_STAR:
|
consolekeys[K_KP_SLASH] = true;
|
||||||
case K_KP_MINUS:
|
consolekeys[K_KP_STAR] = true;
|
||||||
case K_KP_HOME:
|
consolekeys[K_KP_MINUS] = true;
|
||||||
case K_KP_UPARROW:
|
consolekeys[K_KP_HOME] = true;
|
||||||
case K_KP_PGUP:
|
consolekeys[K_KP_UPARROW] = true;
|
||||||
case K_KP_PLUS:
|
consolekeys[K_KP_PGUP] = true;
|
||||||
case K_KP_LEFTARROW:
|
consolekeys[K_KP_PLUS] = true;
|
||||||
case K_KP_5:
|
consolekeys[K_KP_LEFTARROW] = true;
|
||||||
case K_KP_RIGHTARROW:
|
consolekeys[K_KP_5] = true;
|
||||||
case K_KP_END:
|
consolekeys[K_KP_RIGHTARROW] = true;
|
||||||
case K_KP_DOWNARROW:
|
consolekeys[K_KP_END] = true;
|
||||||
case K_KP_PGDN:
|
consolekeys[K_KP_DOWNARROW] = true;
|
||||||
case K_KP_ENTER:
|
consolekeys[K_KP_PGDN] = true;
|
||||||
case K_KP_INS:
|
consolekeys[K_KP_ENTER] = true;
|
||||||
case K_KP_DEL:
|
consolekeys[K_KP_INS] = true;
|
||||||
consolekeys[i] = true;
|
consolekeys[K_KP_DEL] = true;
|
||||||
break;
|
|
||||||
case '`':
|
|
||||||
case '~':
|
|
||||||
consolekeys[i] = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// init ascii characters in console mode
|
|
||||||
if (i >= 32 && i <= 126)
|
|
||||||
consolekeys[i] = true;
|
|
||||||
else consolekeys[i] = specialkeys[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// initialize menubound[]
|
// initialize menubound[]
|
||||||
|
|
Loading…
Reference in a new issue