aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2009-10-05 23:00:48 +0000
committerWillem Jan Palenstijn2009-10-05 23:00:48 +0000
commit437a7cc07cc6deca0c8f6f2565fa3cd253e2fa7c (patch)
tree079fba011ccfddc97b774d3128f6a692808c4136
parent30596adec20f5b19636c7053bc69d5bc66236f95 (diff)
downloadscummvm-rg350-437a7cc07cc6deca0c8f6f2565fa3cd253e2fa7c.tar.gz
scummvm-rg350-437a7cc07cc6deca0c8f6f2565fa3cd253e2fa7c.tar.bz2
scummvm-rg350-437a7cc07cc6deca0c8f6f2565fa3cd253e2fa7c.zip
SCI: Make getBitsDataSize use the same logic as saveBits
svn-id: r44682
-rw-r--r--engines/sci/gui/gui_screen.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index c4429e57c9..a1372d829f 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -127,10 +127,16 @@ byte SciGuiScreen::isFillMatch(int16 x, int16 y, byte flag, byte t_color, byte t
int SciGuiScreen::getBitsDataSize(Common::Rect rect, byte mask) {
int byteCount = sizeof(rect) + sizeof(mask);
int pixels = rect.width() * rect.height();
- byteCount += pixels;
-
- if (mask & SCI_SCREEN_MASK_VISUAL)
- byteCount += pixels;
+ if (mask & SCI_SCREEN_MASK_VISUAL) {
+ byteCount += pixels; // _visualScreen
+ byteCount += pixels; // _displayScreen
+ }
+ if (mask & SCI_SCREEN_MASK_PRIORITY) {
+ byteCount += pixels; // _priorityScreen
+ }
+ if (mask & SCI_SCREEN_MASK_CONTROL) {
+ byteCount += pixels; // _controlScreen
+ }
return byteCount;
}