aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/inventory.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-04-02 08:44:07 -0400
committerPaul Gilbert2015-04-02 08:44:07 -0400
commit8ee021434236b454faf52995fb102322f2e7bd8f (patch)
tree3b6597aad6f167d4f3c625579c9d4bb1f641af43 /engines/sherlock/inventory.cpp
parent2c36889ec5312b15a7deba8a19003d9500425cb3 (diff)
downloadscummvm-rg350-8ee021434236b454faf52995fb102322f2e7bd8f.tar.gz
scummvm-rg350-8ee021434236b454faf52995fb102322f2e7bd8f.tar.bz2
scummvm-rg350-8ee021434236b454faf52995fb102322f2e7bd8f.zip
SHERLOCK: Implemented Inventory::highlight
Diffstat (limited to 'engines/sherlock/inventory.cpp')
-rw-r--r--engines/sherlock/inventory.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index ac37e7c587..f7706c9d64 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -329,8 +329,19 @@ void Inventory::invCommands(bool slamIt) {
}
}
-void Inventory::doInvLite(int index, byte color) {
- // TODO
+/**
+ * Set the highlighting color of a given inventory item
+ */
+void Inventory::highlight(int index, byte color) {
+ Screen &screen = *_vm->_screen;
+ Surface &bb = *screen._backBuffer;
+ int slot = index - _invIndex;
+ Graphics::Surface &img = (*_invShapes[slot])[0]._frame;
+
+ bb.fillRect(Common::Rect(8 + slot * 52, 165, (slot + 1) * 52, 194), color);
+ bb.transBlitFrom(img, Common::Point(6 + slot * 52 + ((47 - img.w) / 2),
+ 163 + ((33 - img.h) / 2)));
+ screen.slamArea(8 + slot * 52, 165, 44, 30);
}
void Inventory::doInvJF() {