CG_RQ3_KEY_KEYNUMTOSTRINGBUF syscall

This commit is contained in:
Andrei Drexler 2011-03-10 18:57:21 +00:00
parent e23856bbc6
commit a629b44209

View file

@ -401,6 +401,17 @@ void CL_ShutdownCGame( void ) {
cgvm = NULL;
}
/*
====================
CL_RQ3_Key_KeynumToStringBuf
====================
*/
static void CL_RQ3_Key_KeynumToStringBuf( int keynum, char *buf, int buflen ) {
Q_strncpyz( buf, Key_KeynumToString( keynum ), buflen );
}
static int FloatAsInt( float f ) {
floatint_t fi;
fi.f = f;
@ -699,6 +710,10 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) {
case CG_R_INPVS:
return re.inPVS( VMA(1), VMA(2) );
case CG_RQ3_KEY_KEYNUMTOSTRINGBUF:
CL_RQ3_Key_KeynumToStringBuf( args[1], VMA(2), args[3] );
return 0;
default:
assert(0);
Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] );