Permalink
Browse files

2nd part of Doom3 merge. Removed cl_keys.cpp, keys.h and keycodes.h. …

…Added Framework folder with KeyInput.cpp and KeyInput.h files.
  • Loading branch information...
1 parent 3b0cd97 commit 1672d81baa68c5db18d62839bbb6bf7594f97413 @TheDushan committed Sep 1, 2012
Showing with 523 additions and 1,225 deletions.
  1. +5 −14 src/engine/OpenWolf.vcxproj
  2. +9 −9 src/engine/OpenWolf.vcxproj.filters
  3. +1 −0 src/engine/botlib/botlib.vcxproj
  4. +19 −40 src/engine/client/cl_cgame.cpp
  5. +117 −28 src/engine/client/cl_console.cpp
  6. +5 −4 src/engine/client/cl_download.cpp
  7. +2 −2 src/engine/client/cl_input.cpp
  8. +3 −1 src/engine/client/cl_irc.cpp
  9. +4 −11 src/engine/client/cl_main.cpp
  10. +11 −83 src/engine/client/cl_ui.cpp
  11. +0 −6 src/engine/client/client.h
  12. +0 −71 src/engine/client/keys.h
  13. +167 −151 src/engine/{client/cl_keys.cpp → framework/KeyInput.cpp}
  14. +64 −15 src/{gamelogic/etmain/src/ui/keycodes.h → engine/framework/KeyInput.h}
  15. +1 −0 src/engine/idLib/idLib.vcxproj
  16. +2 −0 src/engine/idLib/precompiled.h
  17. +0 −4 src/engine/null/null_client.cpp
  18. +9 −678 src/engine/qcommon/cmd.cpp
  19. +6 −39 src/engine/qcommon/common.cpp
  20. +2 −1 src/engine/qcommon/files.cpp
  21. +2 −1 src/engine/qcommon/net_chan.cpp
  22. +2 −1 src/engine/qcommon/net_http.cpp
  23. +39 −3 src/engine/qcommon/q_shared.cpp
  24. +0 −11 src/engine/qcommon/q_shared.h
  25. +20 −20 src/engine/qcommon/qcommon.h
  26. +2 −1 src/engine/server/sv_bot.cpp
  27. +2 −1 src/engine/server/sv_main.cpp
  28. +9 −7 src/engine/sys/sdl_input.cpp
  29. +5 −3 src/engine/sys/sys_main.cpp
  30. +2 −2 src/gamelogic/base/src/cgame/cgame.vcxproj
  31. +3 −4 src/gamelogic/base/src/game/g_main.cpp
  32. +2 −2 src/gamelogic/base/src/game/game.vcxproj
  33. +4 −4 src/gamelogic/base/src/ui/ui.vcxproj
  34. +1 −1 src/gamelogic/base/src/ui/ui_local.h
  35. +1 −1 src/gamelogic/base/src/ui/ui_shared.h
  36. +0 −1 src/gamelogic/etmain/src/cgame/cgame.vcxproj
  37. +0 −3 src/gamelogic/etmain/src/cgame/cgame.vcxproj.filters
  38. +1 −1 src/gamelogic/etmain/src/ui/ui_local.h
  39. +1 −1 src/gamelogic/etmain/src/ui/ui_shared.h
@@ -632,7 +632,7 @@ hostname &gt; status-info/build-machine</Command>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;USE_VOIP;USE_CIN_THEORA;USE_INCREASED_ENTITIES;ZLIB_WINAPI;USE_CRYPTO;USE_PHP;HAVE_BZIP2;USE_PHYSICS;ET_SQL;USE_MUMBLE;GUIDMASTER_SUPPORT;BOTLIB_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>
</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>
</FunctionLevelLinking>
@@ -713,7 +713,7 @@ echo hostname &gt; status-info/build-machine
<PreprocessorDefinitions>WIN32;AMD64;WIN64;__WIN64__;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;USE_CODEC_VORBIS;USE_LOCAL_HEADERS;USE_CIN_THEORA;HAVE_CONFIG_H;USE_VOIP;USE_MUMBLE;USE_CRYPTO;USE_PHP;HAVE_BZIP2;USE_INCREASED_ENTITIES;ET_SQL;USE_PHYSICS;GUIDMASTER_SUPPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>
</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>
</FunctionLevelLinking>
@@ -731,6 +731,7 @@ echo hostname &gt; status-info/build-machine
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ExceptionHandling>SyncCThrow</ExceptionHandling>
+ <DisableSpecificWarnings>4189;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -1146,16 +1147,6 @@ echo hostname &gt; status-info/build-machine
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug AutoUpdate|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="client\cl_keys.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug AutoUpdate|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug AutoUpdate|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release AutoUpdate|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Dedicated|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release AutoUpdate|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Dedicated|Win32'">true</ExcludedFromBuild>
- </ClCompile>
<ClCompile Include="client\cl_main.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug AutoUpdate|Win32'">true</ExcludedFromBuild>
@@ -1217,6 +1208,7 @@ echo hostname &gt; status-info/build-machine
<ClCompile Include="cm\CollisionModel_translate.cpp" />
<ClCompile Include="database\db_main.cpp" />
<ClCompile Include="database\db_mysql.cpp" />
+ <ClCompile Include="FrameWork\KeyInput.cpp" />
<ClCompile Include="qcommon\cm_api.cpp" />
<ClCompile Include="qcommon\cm_load.cpp" />
<ClCompile Include="qcommon\cm_patch.cpp" />
@@ -1375,6 +1367,7 @@ echo hostname &gt; status-info/build-machine
<ClInclude Include="..\libs\nettle\nettle\sexp.h" />
<ClInclude Include="cm\CollisionModel.h" />
<ClInclude Include="cm\CollisionModel_local.h" />
+ <ClInclude Include="FrameWork\KeyInput.h" />
<ClInclude Include="qcommon\crypto.h" />
<ClInclude Include="qcommon\q_platform.h" />
<ClInclude Include="client\cg_api.h" />
@@ -1389,8 +1382,6 @@ echo hostname &gt; status-info/build-machine
<ClInclude Include="qcommon\cm_patch.h" />
<ClInclude Include="qcommon\cm_polylib.h" />
<ClInclude Include="qcommon\cm_public.h" />
- <ClInclude Include="..\..\etmain\src\ui\keycodes.h" />
- <ClInclude Include="client\keys.h" />
<ClInclude Include="qcommon\q_shared.h" />
<ClInclude Include="qcommon\qcommon.h" />
<ClInclude Include="qcommon\qfiles.h" />
@@ -114,6 +114,9 @@
<Filter Include="Source Files\CM\Header Files">
<UniqueIdentifier>{e2c117eb-eda9-4eb1-9e5e-a11392c6bcac}</UniqueIdentifier>
</Filter>
+ <Filter Include="Source Files\FrameWork">
+ <UniqueIdentifier>{30518ec2-5b89-4b1e-888f-0bfecde49fe4}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\libs\libnewton\include\dMath\dVector.cpp">
@@ -362,9 +365,6 @@
<ClCompile Include="client\cl_irc.cpp">
<Filter>Source Files\Client</Filter>
</ClCompile>
- <ClCompile Include="client\cl_keys.cpp">
- <Filter>Source Files\Client</Filter>
- </ClCompile>
<ClCompile Include="client\cl_main.cpp">
<Filter>Source Files\Client</Filter>
</ClCompile>
@@ -533,6 +533,9 @@
<ClCompile Include="qcommon\cm_patch.cpp">
<Filter>Source Files\Collision Model</Filter>
</ClCompile>
+ <ClCompile Include="FrameWork\KeyInput.cpp">
+ <Filter>Source Files\FrameWork</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\etmain\src\game\bg_public.h">
@@ -553,9 +556,6 @@
<ClInclude Include="qcommon\cm_public.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="client\keys.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="qcommon\qcommon.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -601,9 +601,6 @@
<ClInclude Include="qcommon\htable.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\..\etmain\src\ui\keycodes.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="sys\sys_win32.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -694,6 +691,9 @@
<ClInclude Include="cm\CollisionModel_local.h">
<Filter>Source Files\CM\Header Files</Filter>
</ClInclude>
+ <ClInclude Include="FrameWork\KeyInput.h">
+ <Filter>Source Files\FrameWork</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\etmain\ui\addfilter.menu">
@@ -179,6 +179,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<Optimization>Full</Optimization>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <DisableSpecificWarnings>4189;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -34,6 +34,8 @@ Maryland 20850 USA.
// cl_cgame.c -- client system interaction with client game
+#include "../idLib/precompiled.h"
+
#ifdef _MSC_VER
#include "../../libs/msinttypes/inttypes.h"
#else
@@ -56,16 +58,6 @@ extern qboolean getCameraInfo(int camNum, int time, vec3_t * origin, vec3_t * an
static void(*completer)(const char *s) = NULL;
-// NERVE - SMF
-void Key_GetBindingBuf(int keynum, char *buf, int buflen);
-void Key_KeynumToStringBuf(int keynum, char *buf, int buflen);
-
-// -NERVE - SMF
-
-// ydnar: can we put this in a header, pls?
-void Key_GetBindingByString(const char *binding, int *key1, int *key2);
-
-
/*
====================
CL_GetGameState
@@ -279,19 +271,6 @@ void CL_CgameError(const char *string)
Com_Error(ERR_DROP, "%s", string);
}
-qboolean CL_CGameCheckKeyExec(int key)
-{
- if(cgvm)
- {
- return (qboolean)VM_Call(cgvm, CG_CHECKEXECKEY, key);
- }
- else
- {
- return qfalse;
- }
-}
-
-
/*
=====================
CL_ConfigstringModified
@@ -727,7 +706,7 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
FS_Read2(VMA(1), args[2], args[3]);
return 0;
case CG_FS_WRITE:
- return FS_Write((char*)VMA(1), args[2], args[3]);
+ return FS_Write(VMA(1), args[2], args[3]);
case CG_FS_FCLOSEFILE:
FS_FCloseFile(args[1]);
return 0;
@@ -977,18 +956,18 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
case CG_MEMORY_REMAINING:
return Hunk_MemoryRemaining();
case CG_KEY_ISDOWN:
- return Key_IsDown(args[1]);
+ return idKeyInput::IsDown(args[1]);
case CG_KEY_GETCATCHER:
- return Key_GetCatcher();
+ return idKeyInput::GetCatcher();
case CG_KEY_SETCATCHER:
- Key_SetCatcher(args[1]);
+ idKeyInput::SetCatcher(args[1]);
return 0;
case CG_KEY_GETKEY:
- return Key_GetKey((char*)VMA(1));
+ return idKeyInput::GetKey((char*)VMA(1));
case CG_KEY_GETOVERSTRIKEMODE:
- return Key_GetOverstrikeMode();
+ return idKeyInput::GetOverstrikeMode();
case CG_KEY_SETOVERSTRIKEMODE:
- Key_SetOverstrikeMode((qboolean)args[1]);
+ idKeyInput::SetOverstrikeMode((qboolean)args[1]);
return 0;
case CG_MEMSET:
// we cannot return server-address to QVM !
@@ -1069,10 +1048,10 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
//startCamera(args[1], args[2]);
return 0;
case CG_STOPCAMERA:
- //if(args[1] == 0)
- //{ // CAM_PRIMARY
- // cl.cameraMode = false;
- //}
+ //if(args[1] == 0)
+ //{ // CAM_PRIMARY
+ // cl.cameraMode = false;
+ //}
return 0;
case CG_GETCAMERAINFO:
//return getCameraInfo(args[1], args[2], VMA(3), VMA(4), VMA(5));
@@ -1089,10 +1068,10 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
case CG_INGAME_CLOSEPOPUP:
return 0;
case CG_KEY_GETBINDINGBUF:
- Key_GetBindingBuf(args[1], (char*)VMA(2), args[3]);
+ idKeyInput::GetBindingBuf(args[1], (char*)VMA(2), args[3]);
return 0;
case CG_KEY_SETBINDING:
- Key_SetBinding(args[1], (char*)VMA(2));
+ idKeyInput::SetBinding(args[1], (char*)VMA(2));
return 0;
case CG_PARSE_ADD_GLOBAL_DEFINE:
return Parse_AddGlobalDefine( (char*)VMA(1) );
@@ -1105,10 +1084,10 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
case CG_PARSE_SOURCE_FILE_AND_LINE:
return Parse_SourceFileAndLine( args[1], (char*)VMA(2), (int *)VMA(3) );
case CG_KEY_KEYNUMTOSTRINGBUF:
- Key_KeynumToStringBuf(args[1], (char*)VMA(2), args[3]);
+ idKeyInput::KeynumToStringBuf(args[1], (char*)VMA(2), args[3]);
return 0;
case CG_KEY_BINDINGTOKEYS:
- Key_GetBindingByString((char*)VMA(1), (int*)VMA(2), (int*)VMA(3));
+ idKeyInput::GetBindingByString((char*)VMA(1), (int*)VMA(2), (int*)VMA(3));
return 0;
case CG_TRANSLATE_STRING:
CL_TranslateString((char*)VMA(1), (char*)VMA(2));
@@ -1123,8 +1102,8 @@ intptr_t CL_CgameSystemCalls(intptr_t * args) {
Com_GetHunkInfo((int*)VMA(1), (int*)VMA(2));
return 0;
case CG_PUMPEVENTLOOP:
-// Com_EventLoop();
-// CL_WritePacket();
+// Com_EventLoop();
+// CL_WritePacket();
return 0;
case CG_SENDMESSAGE:
CL_SendBinaryMessage((char*)VMA(1), args[2]);
Oops, something went wrong.

0 comments on commit 1672d81

Please sign in to comment.