diff options
-rw-r--r-- | engines/draci/walking.cpp | 4 | ||||
-rw-r--r-- | engines/drascula/actors.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp index e57972fbc5..02612832d2 100644 --- a/engines/draci/walking.cpp +++ b/engines/draci/walking.cpp @@ -324,7 +324,7 @@ void WalkingMap::drawOverlayRectangle(const Common::Point &p, byte colour, byte } int WalkingMap::pointsBetween(const Common::Point &p1, const Common::Point &p2) { - return MAX(abs(p2.x - p1.x), abs(p2.y - p1.y)); + return MAX(ABS(p2.x - p1.x), ABS(p2.y - p1.y)); } Common::Point WalkingMap::interpolate(const Common::Point &p1, const Common::Point &p2, int i, int n) { @@ -636,7 +636,7 @@ bool WalkingState::walkOnNextEdge() { Movement WalkingState::animationForDirection(const Common::Point &here, const Common::Point &there) { const int dx = there.x - here.x; const int dy = there.y - here.y; - if (abs(dx) >= abs(dy)) { + if (ABS(dx) >= ABS(dy)) { return dx >= 0 ? kMoveRight : kMoveLeft; } else { return dy >= 0 ? kMoveDown : kMoveUp; diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index 33cb7fd478..8523b5b158 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -312,9 +312,9 @@ void DrasculaEngine::quadrant_2() { float distanceX, distanceY; if (currentChapter == 2) - distanceX = abs(curX + curWidth - roomX); + distanceX = ABS(curX + curWidth - roomX); else - distanceX = abs(curX + curWidth / 2 - roomX); + distanceX = ABS(curX + curWidth / 2 - roomX); distanceY = (curY + curHeight) - roomY; @@ -354,9 +354,9 @@ void DrasculaEngine::quadrant_4() { float distanceX, distanceY; if (currentChapter == 2) - distanceX = abs(curX + curWidth - roomX); + distanceX = ABS(curX + curWidth - roomX); else - distanceX = abs(curX + curWidth / 2 - roomX); + distanceX = ABS(curX + curWidth / 2 - roomX); distanceY = roomY - (curY + curHeight); |