aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-07 20:55:12 -0400
committerPaul Gilbert2017-07-07 20:55:12 -0400
commit562da310b8a2d3331ea206c51e25ea7383925646 (patch)
treec339bc1ca03cab98174c2145ca2676bf24274668 /engines/titanic/support
parent8d7f0168abb4daa3bace49f3e08a0eaffe1a8e96 (diff)
downloadscummvm-rg350-562da310b8a2d3331ea206c51e25ea7383925646.tar.gz
scummvm-rg350-562da310b8a2d3331ea206c51e25ea7383925646.tar.bz2
scummvm-rg350-562da310b8a2d3331ea206c51e25ea7383925646.zip
TITANIC: Fix to only update modified parts of the screen
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/rect.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/support/rect.cpp b/engines/titanic/support/rect.cpp
index 5fce4402cb..b39ffc1c45 100644
--- a/engines/titanic/support/rect.cpp
+++ b/engines/titanic/support/rect.cpp
@@ -25,10 +25,11 @@
namespace Titanic {
void Rect::combine(const Rect &r) {
- if (isEmpty() || r.isEmpty())
- return;
-
- Common::Rect::extend(r);
+ if (isEmpty()) {
+ *this = r;
+ } else if (!r.isEmpty()) {
+ Common::Rect::extend(r);
+ }
}
void Rect::constrain(const Rect &r) {