Now compile with Visual Studio 2012 ...

... produced dll not tested yet.
This commit is contained in:
Walter Julius Hennecke 2012-12-30 19:07:34 +01:00
parent cebfea0101
commit a18c19c2bd
11 changed files with 31 additions and 31 deletions

1
.gitignore vendored
View file

@ -176,3 +176,4 @@ pip-log.txt
# Mac crap # Mac crap
.DS_Store .DS_Store
*.idb

View file

@ -364,21 +364,12 @@ class SafePtr : public SafePtrBase
SafePtr& operator=( const SafePtr& obj ); SafePtr& operator=( const SafePtr& obj );
SafePtr& operator=( T * const obj ); SafePtr& operator=( T * const obj );
#ifdef LINUX template <class F> friend int operator==( SafePtr<F> a, F *b );
friend int operator==<>( SafePtr<T> a, T *b ); template <class F> friend int operator!=( SafePtr<F> a, F *b );
friend int operator!=<>( SafePtr<T> a, T *b ); template <class F> friend int operator==( F *a, SafePtr<F> b );
friend int operator==<>( T *a, SafePtr<T> b ); template <class F> friend int operator!=( F *a, SafePtr<F> b );
friend int operator!=<>( T *a, SafePtr<T> b ); template <class F> friend int operator==( SafePtr<F> a, SafePtr<F> b );
friend int operator==<>( SafePtr<T> a, SafePtr<T> b ); template <class F> friend int operator!=( SafePtr<F> a, SafePtr<F> b );
friend int operator!=<>( SafePtr<T> a, SafePtr<T> b );
#else
friend int operator==( SafePtr<T> a, T *b );
friend int operator!=( SafePtr<T> a, T *b );
friend int operator==( T *a, SafePtr<T> b );
friend int operator!=( T *a, SafePtr<T> b );
friend int operator==( SafePtr<T> a, SafePtr<T> b );
friend int operator!=( SafePtr<T> a, SafePtr<T> b );
#endif
operator T*() const; operator T*() const;
T* operator->() const; T* operator->() const;

View file

@ -103,7 +103,7 @@ Container<Type>::Container()
} }
template< class Type > template< class Type >
Container<Type>::~Container<Type>() Container<Type>::~Container()
{ {
FreeObjectList(); FreeObjectList();
} }

View file

@ -112,9 +112,10 @@
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\../Debug\</OutDir> <OutDir>$(ProjectDir)Debug\</OutDir>
<IntDir>.\./Debug\</IntDir> <IntDir>$(ProjectDir)Debug\</IntDir>
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetName>gamex86</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release CDROM|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release CDROM|Win32'">
<OutDir>.\Release\</OutDir> <OutDir>.\Release\</OutDir>
@ -268,11 +269,11 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\Shared;..\..\DLLs;..\..\Executable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\Shared;..\..\DLLs;..\..\Executable;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;FGAME_EXPORTS;GAME_DLL;MISSIONPACK;ENABLE_ALTROUTING;MSVC_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;FGAME_EXPORTS;GAME_DLL;MISSIONPACK;ENABLE_ALTROUTING;MSVC_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\./Debug\</AssemblerListingLocation> <AssemblerListingLocation>$(ProjectDir)Debug\</AssemblerListingLocation>
<BrowseInformation>true</BrowseInformation> <BrowseInformation>true</BrowseInformation>
<PrecompiledHeaderOutputFile>.\./Debug\game.pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(ProjectDir)Debug\game.pch</PrecompiledHeaderOutputFile>
<ObjectFileName>.\./Debug\</ObjectFileName> <ObjectFileName>$(ProjectDir)Debug\</ObjectFileName>
<ProgramDataBaseFileName>.\./Debug\</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(ProjectDir)Debug\</ProgramDataBaseFileName>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile> </ClCompile>
<Midl> <Midl>
@ -295,8 +296,8 @@
<LinkDLL>true</LinkDLL> <LinkDLL>true</LinkDLL>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<OutputFile>../../Executable/Debug/gamex86.dll</OutputFile> <OutputFile>$(ProjectDir)Debug/gamex86.dll</OutputFile>
<ImportLibrary>.\../Debug\gamex86.lib</ImportLibrary> <ImportLibrary>$(ProjectDir)Debug\gamex86.lib</ImportLibrary>
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>.\game.def</ModuleDefinitionFile> <ModuleDefinitionFile>.\game.def</ModuleDefinitionFile>
</Link> </Link>

View file

@ -498,7 +498,7 @@ void Level::setSkill( int value )
{ {
int skill_level; int skill_level;
skill_level = (int) floor( value ); skill_level = (int) floor( (float)value );
skill_level = bound( skill_level, 0, 3 ); skill_level = bound( skill_level, 0, 3 );
gi.cvar_set( "skill", va( "%d", skill_level ) ); gi.cvar_set( "skill", va( "%d", skill_level ) );
@ -541,7 +541,7 @@ void Level::SpawnEntities( const char *themapname, const char *entities, int lev
// Init the level variables // Init the level variables
Init(); Init();
spawnpos = strchr( themapname, '$' ); spawnpos = (char *)strchr( themapname, '$' );
if ( spawnpos ) if ( spawnpos )
{ {
mapname = str( themapname, 0, spawnpos - themapname ); mapname = str( themapname, 0, spawnpos - themapname );

View file

@ -615,7 +615,7 @@ void EventArgDef::Setup( const char *eventName, const char *argName, const char
while( 1 ) while( 1 )
{ {
// find opening '[' // find opening '['
tokptr = strchr( ptr, '[' ); tokptr = (char *)strchr( ptr, '[' );
if ( !tokptr ) if ( !tokptr )
{ {
break; break;

View file

@ -5674,7 +5674,7 @@ void Player::GetViewTrace( trace_t& trace, int contents, float maxDistance )
fov_x = client->ps.fov; fov_x = client->ps.fov;
x = 640.0f / (float)tan( fov_x / 360.0 * M_PI ); x = 640.0f / (float)tan( fov_x / 360.0 * M_PI );
fov_y = (float)atan2( 480.0, x ); fov_y = (float)atan2( 480.0f, x );
fov_y *= 360.0f / M_PI; fov_y *= 360.0f / M_PI;
ymax = 4.0f * (float)tan( fov_y * M_PI / 360.0 ); ymax = 4.0f * (float)tan( fov_y * M_PI / 360.0 );

View file

@ -1149,7 +1149,11 @@ class Player : public Sentient
inline bool Player::IsNewActiveWeapon() inline bool Player::IsNewActiveWeapon()
{ {
return ( newActiveWeapon.weapon != NULL ); if(newActiveWeapon.weapon != NULL) {
return true;
} else {
return false;
}
} }
inline weaponhand_t Player::GetNewActiveWeaponHand() inline weaponhand_t Player::GetNewActiveWeaponHand()

View file

@ -49,11 +49,13 @@
#pragma warning(disable : 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data #pragma warning(disable : 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
#pragma warning(disable : 4305) // truncation from const double to float #pragma warning(disable : 4305) // truncation from const double to float
//#pragma warning(disable : 4310) // cast truncates constant value //#pragma warning(disable : 4310) // cast truncates constant value
#pragma warning(disable : 4389)
#pragma warning(disable : 4512) // 'Class' : assignment operator could not be generated #pragma warning(disable : 4512) // 'Class' : assignment operator could not be generated
#pragma warning(disable : 4514) // unreferenced inline/local function has been removed #pragma warning(disable : 4514) // unreferenced inline/local function has been removed
//#pragma warning(disable : 4611) // interaction between '_setjmp' and C++ object destruction is non-portable //#pragma warning(disable : 4611) // interaction between '_setjmp' and C++ object destruction is non-portable
#pragma warning(disable : 4710) // did not inline this function #pragma warning(disable : 4710) // did not inline this function
#pragma warning(disable : 4711) // selected for automatic inline expansion #pragma warning(disable : 4711) // selected for automatic inline expansion
#pragma warning(disable : 4996)
// shut up warnings with Intel Compiler // shut up warnings with Intel Compiler

View file

@ -60,7 +60,7 @@ inline Stack<Type>::Stack()
} }
template <class Type> template <class Type>
inline Stack<Type>::~Stack<Type>() inline Stack<Type>::~Stack()
{ {
Clear(); Clear();
} }

View file

@ -29,6 +29,7 @@
#ifdef _WIN32 #ifdef _WIN32
#pragma warning(disable : 4710) // function 'blah' not inlined #pragma warning(disable : 4710) // function 'blah' not inlined
#pragma warning(disable : 4996)
#endif #endif
#define STRING_PREALLOC_SIZE 16 #define STRING_PREALLOC_SIZE 16