summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-18 01:54:21 +0000
committerTim Angus <tim@ngus.net>2006-01-18 01:54:21 +0000
commitb5a24aab3dbb3d65950843c19ab2fa9934064281 (patch)
treefef77c5cc94e3376442747136421f07f9bea74b0 /src/client
parent5cf09669133da12cf82ee3168e57a781e47b9e92 (diff)
* Added BG_FindUsableForUpgrade
* Added BG_UpgradeClassAvailable * Added generalised BG_*IsAllowed functions * Added some binding traps to cgame * Added tutorial mode (cg_tutorial)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cl_cgame.c10
-rw-r--r--src/client/cl_keys.c43
-rw-r--r--src/client/cl_ui.c45
-rw-r--r--src/client/keys.h2
4 files changed, 55 insertions, 45 deletions
diff --git a/src/client/cl_cgame.c b/src/client/cl_cgame.c
index 5b09acfa..96a18f6e 100644
--- a/src/client/cl_cgame.c
+++ b/src/client/cl_cgame.c
@@ -636,6 +636,16 @@ long CL_CgameSystemCalls( long *args ) {
CL_DemoName( VMA(1), args[2] );
return 0;
+ case CG_KEY_KEYNUMTOSTRINGBUF:
+ Key_KeynumToStringBuf( args[1], VMA(2), args[3] );
+ return 0;
+ case CG_KEY_GETBINDINGBUF:
+ Key_GetBindingBuf( args[1], VMA(2), args[3] );
+ return 0;
+ case CG_KEY_SETBINDING:
+ Key_SetBinding( args[1], VMA(2) );
+ return 0;
+
case CG_MEMSET:
Com_Memset( VMA(1), args[2], args[3] );
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c
index 8a1eb2cf..f80c24c3 100644
--- a/src/client/cl_keys.c
+++ b/src/client/cl_keys.c
@@ -1251,3 +1251,46 @@ void Key_ClearStates (void)
}
}
+/*
+====================
+Key_KeynumToStringBuf
+====================
+*/
+void Key_KeynumToStringBuf( int keynum, char *buf, int buflen ) {
+ Q_strncpyz( buf, Key_KeynumToString( keynum ), buflen );
+}
+
+/*
+====================
+Key_GetBindingBuf
+====================
+*/
+void Key_GetBindingBuf( int keynum, char *buf, int buflen ) {
+ char *value;
+
+ value = Key_GetBinding( keynum );
+ if ( value ) {
+ Q_strncpyz( buf, value, buflen );
+ }
+ else {
+ *buf = 0;
+ }
+}
+
+/*
+====================
+Key_GetCatcher
+====================
+*/
+int Key_GetCatcher( void ) {
+ return cls.keyCatchers;
+}
+
+/*
+====================
+Ket_SetCatcher
+====================
+*/
+void Key_SetCatcher( int catcher ) {
+ cls.keyCatchers = catcher;
+}
diff --git a/src/client/cl_ui.c b/src/client/cl_ui.c
index 7351d77e..eee0ba1f 100644
--- a/src/client/cl_ui.c
+++ b/src/client/cl_ui.c
@@ -627,51 +627,6 @@ static void GetClipboardData( char *buf, int buflen ) {
/*
====================
-Key_KeynumToStringBuf
-====================
-*/
-static void Key_KeynumToStringBuf( int keynum, char *buf, int buflen ) {
- Q_strncpyz( buf, Key_KeynumToString( keynum ), buflen );
-}
-
-/*
-====================
-Key_GetBindingBuf
-====================
-*/
-static void Key_GetBindingBuf( int keynum, char *buf, int buflen ) {
- char *value;
-
- value = Key_GetBinding( keynum );
- if ( value ) {
- Q_strncpyz( buf, value, buflen );
- }
- else {
- *buf = 0;
- }
-}
-
-/*
-====================
-Key_GetCatcher
-====================
-*/
-int Key_GetCatcher( void ) {
- return cls.keyCatchers;
-}
-
-/*
-====================
-Ket_SetCatcher
-====================
-*/
-void Key_SetCatcher( int catcher ) {
- cls.keyCatchers = catcher;
-}
-
-
-/*
-====================
GetConfigString
====================
*/
diff --git a/src/client/keys.h b/src/client/keys.h
index b1498a88..fbab475f 100644
--- a/src/client/keys.h
+++ b/src/client/keys.h
@@ -56,3 +56,5 @@ qboolean Key_GetOverstrikeMode( void );
void Key_SetOverstrikeMode( qboolean state );
void Key_ClearStates( void );
int Key_GetKey(const char *binding);
+void Key_KeynumToStringBuf( int keynum, char *buf, int buflen );
+void Key_GetBindingBuf( int keynum, char *buf, int buflen );