Skip to content
Browse files

Fixed compiling on Win64

  • Loading branch information...
1 parent 52fe1e6 commit d2912571450cb1764de311ad0e705bfd9382cb4e @TheDushan committed Aug 30, 2012
View
6 src/engine/botlib/be_interface.cpp
@@ -98,7 +98,7 @@ int botlibsetup = qfalse;
int Sys_MilliSeconds(void)
{
// Ridah, faster Win32 code
-#ifdef _WIN32
+#if 0 //def _WIN32
int sys_curtime;
static qboolean initialized = qfalse;
static int sys_timeBase;
@@ -173,7 +173,7 @@ qboolean BotLibSetup(char *str)
// Returns: -
// Changes Globals: -
//===========================================================================
-extern define_t *globaldefines;
+//extern define_t *globaldefines;
int Export_BotLibSetup(qboolean singleplayer)
{
int errnum;
@@ -221,7 +221,7 @@ int Export_BotLibSetup(qboolean singleplayer)
return errnum;
}
- globaldefines = NULL;
+ //globaldefines = NULL;
botlibsetup = qtrue;
botlibglobals.botlibsetup = qtrue;
View
4 src/engine/botlib/botlib.vcxproj
@@ -69,7 +69,7 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
@@ -239,7 +239,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <PreprocessorDefinitions>WIN32;_AMD64_;WIN64;__WIN64__;NDEBUG;BOTLIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_AMD64_;WIN64;__WIN64__;NDEBUG;BOTLIB;_CRT_SECURE_NO_WARNINGS;BOTLIB_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
View
4 src/engine/idLib/Str.h
@@ -38,8 +38,8 @@ If you have questions concerning this license or the applicable additional terms
*/
// these library functions should not be used for cross platform compatibility
-#define strcmp idStr::Cmp // use_idStr_Cmp
-#define strncmp use_idStr_Cmpn
+//#define strcmp idStr::Cmp // use_idStr_Cmp
+//#define strncmp use_idStr_Cmpn
#if defined( StrCmpN )
#undef StrCmpN
View
50 src/engine/idLib/idLib.vcxproj
@@ -167,30 +167,14 @@
<ClInclude Include="containers\Queue.h" />
<ClInclude Include="math\Random.h" />
<ClInclude Include="math\Rotation.h" />
- <ClInclude Include="math\Simd.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_3DNow.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_AltiVec.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_Generic.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_MMX.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_SSE.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_SSE2.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
- <ClInclude Include="math\Simd_SSE3.h">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClInclude>
+ <ClInclude Include="math\Simd.h" />
+ <ClInclude Include="math\Simd_3DNow.h" />
+ <ClInclude Include="math\Simd_AltiVec.h" />
+ <ClInclude Include="math\Simd_Generic.h" />
+ <ClInclude Include="math\Simd_MMX.h" />
+ <ClInclude Include="math\Simd_SSE.h" />
+ <ClInclude Include="math\Simd_SSE2.h" />
+ <ClInclude Include="math\Simd_SSE3.h" />
<ClInclude Include="bv\Sphere.h" />
<ClInclude Include="containers\Stack.h" />
<ClInclude Include="containers\StaticList.h" />
@@ -244,43 +228,41 @@
<ClCompile Include="precompiled.cpp" />
<ClCompile Include="math\Quat.cpp" />
<ClCompile Include="math\Rotation.cpp" />
- <ClCompile Include="math\Simd.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
+ <ClCompile Include="math\Simd.cpp" />
<ClCompile Include="math\Simd_3DNow.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_AltiVec.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_Generic.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_MMX.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_SSE.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_SSE2.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="math\Simd_SSE3.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="bv\Sphere.cpp" />
<ClCompile Include="Str.cpp" />
View
14 src/engine/qcommon/common.cpp
@@ -34,6 +34,7 @@ Maryland 20850 USA.
// common.c -- misc functions used in client and server
+#include "../idLib/precompiled.h"
#include "../qcommon/q_shared.h"
#include "qcommon.h"
#include "../database/database.h"
@@ -216,7 +217,7 @@ void QDECL Com_Printf(const char *fmt, ...)
va_start (argptr,fmt);
- Q_vsnprintf( msg, sizeof( msg ) - 1, fmt, argptr );
+ idStr::vsnPrintf( msg, sizeof( msg ) - 1, fmt, argptr );
msg[sizeof( msg ) - 1] = 0;
va_end (argptr);
@@ -332,7 +333,7 @@ void QDECL Com_DPrintf(const char *fmt, ...)
}
va_start(argptr, fmt);
- Q_vsnprintf(msg, sizeof(msg), fmt, argptr);
+ idStr::vsnPrintf(msg, sizeof(msg), fmt, argptr);
va_end(argptr);
Com_Printf("%s", msg);
@@ -413,7 +414,7 @@ void QDECL Com_Error(int code, const char *fmt, ...)
lastErrorTime = currentTime;
va_start (argptr,fmt);
- Q_vsnprintf (com_errorMessage, sizeof(com_errorMessage),fmt,argptr);
+ idStr::vsnPrintf (com_errorMessage, sizeof(com_errorMessage),fmt,argptr);
va_end (argptr);
switch(code) {
@@ -3091,9 +3092,11 @@ void Com_Init(char *commandLine)
Sys_Error("Error during initialization");
}
+ // initialize idLib
+ idLib::Init();
+
// bk001129 - do this before anything else decides to push events
Com_InitPushEvent();
-
Com_InitSmallZoneMemory();
Cvar_Init();
@@ -3850,6 +3853,9 @@ void Com_Shutdown(qboolean badProfile)
#if defined(USE_HTTP)
Net_HTTP_Kill();
#endif
+
+ // shutdown idLib
+ idLib::ShutDown();
}

0 comments on commit d291257

Please sign in to comment.
Something went wrong with that request. Please try again.