diff options
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 9d8fc565f9..2fdcbd475f 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -77,15 +77,13 @@ enum { PF_FATAL = -2 }; -#define scummvm_roundf(a) ((fmod(a, 1) < 0.5) ? floor(a) : ceil(a)) - // Floating point struct struct FloatPoint { FloatPoint() : x(0), y(0) {} FloatPoint(float x_, float y_) : x(x_), y(y_) {} Common::Point toPoint() { - return Common::Point((int16)scummvm_roundf(x), (int16)scummvm_roundf(y)); + return Common::Point(x + 0.5, y + 0.5); } float x, y; |