From 7f053e3a62e8558d98faed1bc477c1a469e7210f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 5 Oct 2009 07:51:31 +0000 Subject: Removed the unused _bytesPerDisplayPixel parameter. All SCI games use 8bpp color (apart from the videos in Phantasmagoria 2, which are not part of the engine itself) svn-id: r44653 --- engines/sci/gui/gui_screen.cpp | 13 ++++--------- engines/sci/gui/gui_screen.h | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp index 44d36cac93..1a143fe0d1 100644 --- a/engines/sci/gui/gui_screen.cpp +++ b/engines/sci/gui/gui_screen.cpp @@ -53,7 +53,6 @@ void SciGuiScreen::init() { _displayWidth = 320; _displayHeight = 200; _displayPixels = _displayWidth * _displayHeight; - _bytesPerDisplayPixel = 1; _visualScreen = initScreen(_pixels); _priorityScreen = initScreen(_pixels); @@ -133,15 +132,11 @@ 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(); - if (mask & SCI_SCREEN_MASK_VISUAL) { - byteCount += pixels + (pixels * _bytesPerDisplayPixel); - } - if (mask & SCI_SCREEN_MASK_PRIORITY) { - byteCount += pixels; - } - if (mask & SCI_SCREEN_MASK_CONTROL) { + byteCount += pixels; + + if (mask & SCI_SCREEN_MASK_VISUAL) byteCount += pixels; - } + return byteCount; } diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h index 1b0466fc65..94aca7ed9b 100644 --- a/engines/sci/gui/gui_screen.h +++ b/engines/sci/gui/gui_screen.h @@ -67,7 +67,6 @@ public: uint16 _displayWidth; uint16 _displayHeight; uint _displayPixels; - byte _bytesPerDisplayPixel; private: void restoreBitsScreen(Common::Rect rect, byte *&memoryPtr, byte *screen); -- cgit v1.2.3