aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/star_control/surface_area.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/titanic/star_control/surface_area.cpp b/engines/titanic/star_control/surface_area.cpp
index a3029bde88..4536d7bf4e 100644
--- a/engines/titanic/star_control/surface_area.cpp
+++ b/engines/titanic/star_control/surface_area.cpp
@@ -169,11 +169,8 @@ double CSurfaceArea::fillRect(const FRect &rect) {
}
}
- Common::Rect rr((int)(r.left - 0.5), (int)(r.top - 0.5), (int)(r.right - 0.5), (int)(r.bottom - 0.5));
- if (rr.left > rr.right) {
- SWAP(rr.left, rr.right);
- SWAP(rr.top, rr.bottom);
- }
+ Common::Rect rr((int)(MIN(r.left, r.right) - 0.5), (int)(MIN(r.top, r.bottom) - 0.5),
+ (int)(MAX(r.left, r.right) - 0.5), (int)(MAX(r.top, r.bottom) - 0.5));
Graphics::Surface s;
s.setPixels(_pixelsPtr);