MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_KeyToAscii

Function ddio_KeyToAscii

ddio/key.cpp:470–483  ·  view source on GitHub ↗

converts keycode to ASCII

Source from the content-addressed store, hash-verified

468
469// converts keycode to ASCII
470int ddio_KeyToAscii(int code) {
471 int shifted;
472
473 shifted = code & KEY_SHIFTED;
474 code &= 0xFF;
475
476 if (code >= 127)
477 return 255;
478
479 if (shifted)
480 return (int)shifted_ascii_table[code];
481 else
482 return (int)ascii_table[code];
483}
484
485// converts ascii code to key
486int ddio_AsciiToKey(int ascii) {

Callers 4

con_raw_DeferFunction · 0.85
DemoCheatsFunction · 0.85
DoHUDInputMessageKeyFunction · 0.85
grfont_KeyToAsciiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected