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:
Sander van Dijk 2014-10-11 11:47:05 +00:00
parent 3ecdc28743
commit 6ae9f2e37e

View file

@ -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[]