diff options
-rw-r--r-- | engines/mads/player.cpp | 2 | ||||
-rw-r--r-- | engines/mads/rails.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index a78d35d77f..bde313af8d 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -648,7 +648,7 @@ void Player::startMovement() { break; } - _totalDistance = sqrt((double)(xAmt100 * xAmt100 + yAmt100 * yAmt100)); + _totalDistance = (int)sqrt((double)(xAmt100 * xAmt100 + yAmt100 * yAmt100)); _posDiff.x = xDiff + 1; _posDiff.y = yDiff + 1; _posChange.x = xDiff; diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp index 7f8a56d21b..322e6e7cb3 100644 --- a/engines/mads/rails.cpp +++ b/engines/mads/rails.cpp @@ -201,7 +201,7 @@ void Rails::setNodePosition(int nodeIndex, const Common::Point &pt) { int xDiff = ABS(_nodes[idx]._walkPos.x - pt.x); int yDiff = ABS(_nodes[idx]._walkPos.y - pt.y); - hypotenuse = sqrt((double)(xDiff * xDiff + yDiff * yDiff)); + hypotenuse = (int)sqrt((double)(xDiff * xDiff + yDiff * yDiff)); if (hypotenuse >= 0x3FFF) // Shouldn't ever be this large |