aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/tattoo_journal.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2016-04-08 22:51:03 +0200
committerTorbjörn Andersson2016-04-08 22:52:59 +0200
commit0d1bfecebc9fd0d050abed493cdb8989bc23c1b8 (patch)
treebc57d9807119f97727e5687831444b41a194b954 /engines/sherlock/tattoo/tattoo_journal.cpp
parenta8c42e491cf28f44d47a106b4c13e35a05db71b1 (diff)
downloadscummvm-rg350-0d1bfecebc9fd0d050abed493cdb8989bc23c1b8.tar.gz
scummvm-rg350-0d1bfecebc9fd0d050abed493cdb8989bc23c1b8.tar.bz2
scummvm-rg350-0d1bfecebc9fd0d050abed493cdb8989bc23c1b8.zip
SHERLOCK: Fix crash when searching journal in Rose Tattoo
Another part bug, part regression from using ManagedSurface, I guess.
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_journal.cpp')
-rw-r--r--engines/sherlock/tattoo/tattoo_journal.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp
index 918887f320..0d5c26d7ce 100644
--- a/engines/sherlock/tattoo/tattoo_journal.cpp
+++ b/engines/sherlock/tattoo/tattoo_journal.cpp
@@ -523,15 +523,14 @@ void TattooJournal::drawControls(int mode) {
if (mode != 2) {
// Draw the Bars separating the Journal Commands
- int xp = r.right / 3;
+ int xp = r.left + r.width() / 3;
for (int idx = 0; idx < 2; ++idx) {
screen._backBuffer1.SHtransBlitFrom(images[6], Common::Point(xp - 2, r.top + 1));
screen._backBuffer1.SHtransBlitFrom(images[7], Common::Point(xp - 2, yp - 1));
- screen._backBuffer1.hLine(xp - 1, r.top + 4, yp - 2, INFO_TOP);
- screen._backBuffer1.hLine(xp, r.top + 4, yp - 2, INFO_MIDDLE);
- screen._backBuffer1.hLine(xp + 1, r.top + 4, yp - 2, INFO_BOTTOM);
- xp = r.right / 3 * 2;
+ screen._backBuffer1.vLine(xp - 1, r.top + 4, yp - 2, INFO_TOP); screen._backBuffer1.vLine(xp, r.top + 4, yp - 2, INFO_MIDDLE);
+ screen._backBuffer1.vLine(xp + 1, r.top + 4, yp - 2, INFO_BOTTOM);
+ xp += r.width() / 3;
}
}