aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-21 13:59:01 -0400
committerPaul Gilbert2015-06-21 13:59:01 -0400
commitbeb74228be303e00b072440d0f514e5ef060433e (patch)
tree05ea0924a36c203552b1dcb7497bd2fa526d4512 /engines
parent6b01a11a398b6366cdf810a31648e371ea6146ca (diff)
downloadscummvm-rg350-beb74228be303e00b072440d0f514e5ef060433e.tar.gz
scummvm-rg350-beb74228be303e00b072440d0f514e5ef060433e.tar.bz2
scummvm-rg350-beb74228be303e00b072440d0f514e5ef060433e.zip
SHERLOCK: RT: Implement makeBGArea for converting to greyscale
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp12
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 771c22c46e..84ebfe7837 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 6eeae2dfd9..27039d9e4b 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