[Scummvm-git-logs] scummvm master -> 751a96730ef7b43d2f59919b523c07ee685b56c2
dreammaster
dreammaster at scummvm.org
Fri Mar 31 04:24:29 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
751a96730e TITANIC: Fix rect calculation in CSurfaceArea fillRect
Commit: 751a96730ef7b43d2f59919b523c07ee685b56c2
https://github.com/scummvm/scummvm/commit/751a96730ef7b43d2f59919b523c07ee685b56c2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-03-30T22:24:20-04:00
Commit Message:
TITANIC: Fix rect calculation in CSurfaceArea fillRect
Changed paths:
engines/titanic/star_control/surface_area.cpp
diff --git a/engines/titanic/star_control/surface_area.cpp b/engines/titanic/star_control/surface_area.cpp
index a3029bd..4536d7b 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);
More information about the Scummvm-git-logs
mailing list