From 586ad8bab48cae35cd155d0256ec303038ed0e81 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 29 Jun 2008 11:59:43 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@811 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 8 ++++++++ polymer/eduke32/source/osdcmds.c | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d598bbbf1..cae57f0dd 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -161,7 +161,9 @@ keydef keynames[]= {"BACKSPACE", sc_BackSpace}, {"TAB", sc_Tab}, {"LEFTALT", sc_LeftAlt}, + {"RIGHTALT", sc_RightAlt}, {"LEFTCONTROL", sc_LeftControl}, + {"RIGHTCONTROL",sc_RightControl}, {"CAPSLOCK", sc_CapsLock}, {"LEFTSHIFT", sc_LeftShift}, {"RIGHTSHIFT", sc_RightShift}, @@ -244,6 +246,12 @@ keydef keynames[]= {"X", sc_X}, {"Y", sc_Y}, {"Z", sc_Z}, + + {"UPARROW", sc_UpArrow}, + {"DOWNARROW", sc_DownArrow}, + {"LEFTARROW", sc_LeftArrow}, + {"RIGHTARROW", sc_RightArrow}, + {0,0} }; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 06fd956aa..0a8098749 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -970,6 +970,7 @@ static int osdcmd_bind(const osdfuncparm_t *parm) for (i=0;keynames[i].name;i++)OSD_Printf("%s\n",keynames[i].name); return OSDCMD_OK; } + if (parm->numparms==0) { OSD_Printf("Keybindings:\n"); @@ -978,12 +979,17 @@ static int osdcmd_bind(const osdfuncparm_t *parm) return OSDCMD_OK; } - if (parm->numparms < 2) return OSDCMD_SHOWHELP; for (i=0;keynames[i].name;i++) if (!Bstrcasecmp(parm->parms[0],keynames[i].name)) break; if (!keynames[i].name) return OSDCMD_SHOWHELP; + if (parm->numparms < 2) + { + OSD_Printf("%-11s = %s\n",keynames[i].name, boundkeys[keynames[i].id].name); + return OSDCMD_OK; + } + j = 1; if (parm->numparms >= 2 && !Bstrcasecmp(parm->parms[j],"repeat")) { @@ -999,7 +1005,7 @@ static int osdcmd_bind(const osdfuncparm_t *parm) static int osdcmd_unbind(const osdfuncparm_t *parm) { - int i, j; + int i; if (parm->numparms==1&&!Bstrcasecmp(parm->parms[0],"all")) { @@ -1079,8 +1085,11 @@ int registerosdcommands(void) OSD_RegisterFunction("unbind","unbind : unbinds a key. Type \"unbind all\" to unbind all keys.", osdcmd_unbind); for (i=0;i