diff options
author | Paul Gilbert | 2015-05-19 09:10:35 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-19 09:10:35 -0400 |
commit | 8ae0014bc25e42e519d5a6a31279ee22580aaba9 (patch) | |
tree | f65994d628384e0cec0ead4799e92410658e157f /engines/sherlock/inventory.cpp | |
parent | 1c395b4de91f3edb0ad7109da016eb42a32b434b (diff) | |
download | scummvm-rg350-8ae0014bc25e42e519d5a6a31279ee22580aaba9.tar.gz scummvm-rg350-8ae0014bc25e42e519d5a6a31279ee22580aaba9.tar.bz2 scummvm-rg350-8ae0014bc25e42e519d5a6a31279ee22580aaba9.zip |
SHERLOCK: Refactor Surface not to descend directly from Graphics::Surface
Diffstat (limited to 'engines/sherlock/inventory.cpp')
-rw-r--r-- | engines/sherlock/inventory.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp index 28065a1b72..63642f4e5a 100644 --- a/engines/sherlock/inventory.cpp +++ b/engines/sherlock/inventory.cpp @@ -155,9 +155,9 @@ void Inventory::putInv(InvSlamMode slamIt) { } // Draw the item image - Graphics::Surface &img = (*_invShapes[itemNum])[0]._frame; - bb.transBlitFrom(img, Common::Point(6 + itemNum * 52 + ((47 - img.w) / 2), - 163 + ((33 - img.h) / 2))); + ImageFrame &frame = (*_invShapes[itemNum])[0]; + bb.transBlitFrom(frame, Common::Point(6 + itemNum * 52 + ((47 - frame._width) / 2), + 163 + ((33 - frame._height) / 2))); } if (slamIt == SLAM_DISPLAY) @@ -307,11 +307,11 @@ 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; + ImageFrame &frame = (*_invShapes[slot])[0]; 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))); + bb.transBlitFrom(frame, Common::Point(6 + slot * 52 + ((47 - frame._width) / 2), + 163 + ((33 - frame._height) / 2))); screen.slamArea(8 + slot * 52, 165, 44, 30); } @@ -331,8 +331,7 @@ void Inventory::refreshInv() { ui.examine(); if (!talk._talkToAbort) { - screen._backBuffer2.blitFrom((*ui._controlPanel)[0]._frame, - Common::Point(0, CONTROLS_Y)); + screen._backBuffer2.blitFrom((*ui._controlPanel)[0], Common::Point(0, CONTROLS_Y)); loadInv(); } } |