diff --git a/Source/Common/Common.vcproj b/Source/Common/Common.vcproj index ff469900a..e7047f664 100644 --- a/Source/Common/Common.vcproj +++ b/Source/Common/Common.vcproj @@ -157,6 +157,10 @@ RelativePath=".\path.cpp" > + + @@ -230,6 +234,10 @@ RelativePath=".\path.h" > + + diff --git a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp index ad3b51589..12c81e95e 100644 --- a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp +++ b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp @@ -21,6 +21,30 @@ #include #include +#if (defined(_MSC_VER) && (_MSC_VER < 1800)) +double round(double num) +{ + return (num - floor(num) > 0.5) ? ceil(num) : floor(num); +} + +float roundf(float num) +{ + return (num - floorf(num) > 0.5) ? ceilf(num) : floorf(num); +} +#endif + +#if (defined(_MSC_VER) && (_MSC_VER < 1700)) +double trunc(double num) +{ + return (num < 0) ? ceil(num) : floor(num); +} + +float truncf(float num) +{ + return (num < 0) ? ceilf(num) : floorf(num); +} +#endif + void InPermLoop(); void TestInterpreterJump(uint32_t PC, uint32_t TargetPC, int32_t Reg1, int32_t Reg2); diff --git a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp index fec38842c..48b6ea728 100644 --- a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp +++ b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "x86CodeLog.h" uint32_t CRegInfo::m_fpuControl = 0;