SCI: Make getBitsDataSize use the same logic as saveBits

svn-id: r44682
This commit is contained in:
Willem Jan Palenstijn
2009-10-05 23:00:48 +00:00
parent 30596adec2
commit 437a7cc07c
+10 -4
View File
@@ -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;
}