aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authormd52011-03-10 21:50:06 +0200
committermd52011-03-10 21:50:06 +0200
commit24df295328dc118bd1dcf03abaf9c68c665a7ab6 (patch)
treeb0b8b6f53d132b5d8b3ae86388ade80f417b784e /engines/sci
parent0929d1e12d1f03dd115ee98a5b8a85033458e465 (diff)
downloadscummvm-rg350-24df295328dc118bd1dcf03abaf9c68c665a7ab6.tar.gz
scummvm-rg350-24df295328dc118bd1dcf03abaf9c68c665a7ab6.tar.bz2
scummvm-rg350-24df295328dc118bd1dcf03abaf9c68c665a7ab6.zip
SCI: Made some checks inside unditherBitmap() more understandable
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/view.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index e637159174..402a69dc04 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -593,12 +593,8 @@ void GfxView::unditherBitmap(byte *bitmapPtr, int16 width, int16 height, byte cl
if (!ditheredPicColors)
return;
- // Makes no sense to process bitmaps that are 3 pixels wide or less
- if (width <= 3)
- return;
-
- // We need at least 2 pixel lines
- if (height < 2)
+ // We need at least a 4x2 bitmap for this algorithm to work
+ if (width < 4 || height < 2)
return;
// If EGA mapping is used for this view, dont do undithering as well