MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Key_KeyToHex

Function Key_KeyToHex

code/client/cl_keys.cpp:863–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863static const char *Key_KeyToHex( int keynum ) {
864 int i = keynum >> 4;
865 int j = keynum & 15;
866
867 tinyString[0] = '0';
868 tinyString[1] = 'x';
869 tinyString[2] = i > 9 ? (i - 10 + 'A') : (i + '0');
870 tinyString[3] = j > 9 ? (j - 10 + 'A') : (j + '0');
871 tinyString[4] = '\0';
872
873 return tinyString;
874}
875
876// Returns the ascii code of the keynum
877const char *Key_KeynumToAscii( int keynum ) {

Callers 2

Key_KeynumToAsciiFunction · 0.70
Key_KeynumToStringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected