Enable the Key_StringToKeynum builtin.

I don't know why I didn't do it earlier other than lack of need.
This commit is contained in:
Bill Currie 2016-01-04 16:10:22 +09:00
parent 7c16acf4aa
commit 59f60d1ba7

View file

@ -143,12 +143,19 @@ bi_Key_KeynumToString (progs_t *pr)
RETURN_STRING (pr, Key_KeynumToString (keynum));
};
static void
bi_Key_StringToKeynum (progs_t *pr)
{
const char *keyname = P_GSTRING (pr, 0);
R_INT (pr) = Key_StringToKeynum (keyname);
}
static builtin_t builtins[] = {
{"Key_SetBinding", bi_Key_SetBinding, -1},
{"Key_LookupBinding", bi_Key_LookupBinding, -1},
{"Key_CountBinding", bi_Key_CountBinding, -1},
{"Key_KeynumToString", bi_Key_KeynumToString, -1},
// NEED THIS ?// {"Key_StringToKeynum", bi_Key_KeynumToString, -1},
{"Key_StringToKeynum", bi_Key_StringToKeynum, -1},
{0}
};