[Scummvm-cvs-logs] scummvm master -> beb74228be303e00b072440d0f514e5ef060433e

dreammaster dreammaster at scummvm.org
Sun Jun 21 20:00:12 CEST 2015


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:
beb74228be SHERLOCK: RT: Implement makeBGArea for converting to greyscale


Commit: beb74228be303e00b072440d0f514e5ef060433e
    https://github.com/scummvm/scummvm/commit/beb74228be303e00b072440d0f514e5ef060433e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-21T13:59:01-04:00

Commit Message:
SHERLOCK: RT: Implement makeBGArea for converting to greyscale

Changed paths:
    engines/sherlock/tattoo/tattoo_user_interface.cpp
    engines/sherlock/tattoo/tattoo_user_interface.h



diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 771c22c..84ebfe7 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -863,6 +863,18 @@ void TattooUserInterface::drawMaskArea(bool mode) {
 	}
 }
 
+void TattooUserInterface::makeBGArea(const Common::Rect &r) {
+	Screen &screen = *_vm->_screen;
+
+	for (int yp = r.top; yp < r.bottom; ++yp) {
+		byte *ptr = screen._backBuffer1.getBasePtr(r.left, yp);
+
+		for (int xp = r.left; xp < r.right; ++xp, ++ptr)
+			*ptr = _lookupTable[*ptr];
+	}
+}
+
+
 } // End of namespace Tattoo
 
 } // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h
index 6eeae2d..27039d9 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.h
+++ b/engines/sherlock/tattoo/tattoo_user_interface.h
@@ -208,6 +208,11 @@ public:
 	void doBgAnimEraseBackground();
 
 	void drawMaskArea(bool mode);
+
+	/**
+	 * Translate a given area of the back buffer to greyscale shading
+	 */
+	void makeBGArea(const Common::Rect &r);
 public:
 	/**
 	 * Resets the user interface






More information about the Scummvm-git-logs mailing list