[Scummvm-cvs-logs] scummvm master -> 24df295328dc118bd1dcf03abaf9c68c665a7ab6

bluegr md5 at scummvm.org
Thu Mar 10 20:52:03 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
24df295328 SCI: Made some checks inside unditherBitmap() more understandable


Commit: 24df295328dc118bd1dcf03abaf9c68c665a7ab6
    https://github.com/scummvm/scummvm/commit/24df295328dc118bd1dcf03abaf9c68c665a7ab6
Author: md5 (md5 at scummvm.org)
Date: 2011-03-10T11:50:06-08:00

Commit Message:
SCI: Made some checks inside unditherBitmap() more understandable

Changed paths:
    engines/sci/graphics/view.cpp



diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index e637159..402a69d 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






More information about the Scummvm-git-logs mailing list