mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
Very preliminary work with Visual Studio 2015 Community RC/RTM, resolve some version-specific build errors:
1. Standard library functions snprintf & vsnprintf are available thusly named (without the prepended underscores). Someone may want to check my conditionals against non-MSVC compilers, though. 2. zone/bonuses.cpp throws an internal compiler error with optimize enabled; #pragma disable optimization on VS2015 only on function Mob::NegateSpellBonuses works around it.
This commit is contained in:
parent
c91374444b
commit
5952610a7b
@ -23,7 +23,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,9 @@ typedef unsigned char uchar;
|
|||||||
typedef const char Const_char; //for perl XS
|
typedef const char Const_char; //for perl XS
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
typedef void ThreadReturnType;
|
typedef void ThreadReturnType;
|
||||||
|
|||||||
@ -26,8 +26,10 @@ target to center around.
|
|||||||
class Zone;
|
class Zone;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
|
#endif
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -38,7 +38,6 @@
|
|||||||
#include "../common/unix.h"
|
#include "../common/unix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void Mob::CalcBonuses()
|
void Mob::CalcBonuses()
|
||||||
{
|
{
|
||||||
CalcSpellBonuses(&spellbonuses);
|
CalcSpellBonuses(&spellbonuses);
|
||||||
@ -3493,6 +3492,17 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Avoid an internal compiler error in VS 2015
|
||||||
|
// Community RC (free) with the /O2 compiler
|
||||||
|
// option enabled on x64 build; definite fail on
|
||||||
|
// building Release-X64. Disabling optimizations
|
||||||
|
// for the entire file might be overkill and/or
|
||||||
|
// inapplicable to other builds, more testing needed.
|
||||||
|
// Bug has been reported to MS, fix ETA unknown.
|
||||||
|
#if (defined(_MSC_VER) && defined(_WIN64)&& _MSC_VER==1900)
|
||||||
|
#pragma optimize( "", off )
|
||||||
|
#endif
|
||||||
|
|
||||||
void Mob::NegateSpellsBonuses(uint16 spell_id)
|
void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||||
{
|
{
|
||||||
if(!IsValidSpell(spell_id))
|
if(!IsValidSpell(spell_id))
|
||||||
@ -4654,6 +4664,7 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
|||||||
itembonuses.SkillProcSuccess[e] = effect_value;
|
itembonuses.SkillProcSuccess[e] = effect_value;
|
||||||
aabonuses.SkillProcSuccess[e] = effect_value;
|
aabonuses.SkillProcSuccess[e] = effect_value;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SE_SkillProc:{
|
case SE_SkillProc:{
|
||||||
@ -4663,9 +4674,14 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
|||||||
itembonuses.SkillProc[e] = effect_value;
|
itembonuses.SkillProc[e] = effect_value;
|
||||||
aabonuses.SkillProc[e] = effect_value;
|
aabonuses.SkillProc[e] = effect_value;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See line 3495 above, more or less
|
||||||
|
#if (defined(_MSC_VER) && defined(_WIN64)&& _MSC_VER==1900)
|
||||||
|
#pragma optimize( "", on )
|
||||||
|
#endif
|
||||||
|
|||||||
@ -22,8 +22,10 @@ Child of the Mob class.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
|
#endif
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -17,10 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#define snprintf _snprintf
|
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||||
#define vsnprintf _vsnprintf
|
#define snprintf _snprintf
|
||||||
#define strncasecmp _strnicmp
|
#define vsnprintf _vsnprintf
|
||||||
#define strcasecmp _stricmp
|
#endif
|
||||||
|
#define strncasecmp _strnicmp
|
||||||
|
#define strcasecmp _stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../common/races.h"
|
#include "../common/races.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user