aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/lines.cpp
diff options
context:
space:
mode:
authorStrangerke2013-03-26 08:11:53 +0100
committerStrangerke2013-03-26 08:13:14 +0100
commit02f939c28209122ed1b8bef3cbf98973afed4bee (patch)
tree5152f22520255412edd2f8707f5ae483609dcd93 /engines/hopkins/lines.cpp
parent63b669cfc4ec0cae7be83949f98ee3fd48607f90 (diff)
downloadscummvm-rg350-02f939c28209122ed1b8bef3cbf98973afed4bee.tar.gz
scummvm-rg350-02f939c28209122ed1b8bef3cbf98973afed4bee.tar.bz2
scummvm-rg350-02f939c28209122ed1b8bef3cbf98973afed4bee.zip
HOPKINS: Simplify some statements using MIN, MAX and CLIP
Diffstat (limited to 'engines/hopkins/lines.cpp')
-rw-r--r--engines/hopkins/lines.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index e0f0d844a4..52a17b10e2 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -2698,14 +2698,10 @@ void LinesManager::CARRE_ZONE() {
int zoneX = *dataP++;
int zoneY = *dataP++;
- if (curZone->_left >= zoneX)
- curZone->_left = zoneX;
- if (curZone->_right <= zoneX)
- curZone->_right = zoneX;
- if (curZone->_top >= zoneY)
- curZone->_top = zoneY;
- if (curZone->_bottom <= zoneY)
- curZone->_bottom = zoneY;
+ curZone->_left = MIN(curZone->_left, zoneX);
+ curZone->_right = MAX(curZone->_right, zoneX);
+ curZone->_top = MIN(curZone->_top, zoneY);
+ curZone->_bottom = MAX(curZone->_bottom, zoneY);
}
}