aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-27 20:32:32 -0400
committerPaul Gilbert2015-07-27 20:32:32 -0400
commitd021b20e82c0699cc2d168d7026b02bd92735fe1 (patch)
treefe3f4e2e8071dd5094f2001bd9110ba13df8e4ab
parent6ff53ea018b5bb56235c4331e016d43801699886 (diff)
downloadscummvm-rg350-d021b20e82c0699cc2d168d7026b02bd92735fe1.tar.gz
scummvm-rg350-d021b20e82c0699cc2d168d7026b02bd92735fe1.tar.bz2
scummvm-rg350-d021b20e82c0699cc2d168d7026b02bd92735fe1.zip
SHERLOCK: RT: Fix loading and display of journal locations
-rw-r--r--engines/sherlock/journal.cpp6
-rw-r--r--engines/sherlock/sherlock.h1
-rw-r--r--engines/sherlock/tattoo/tattoo_journal.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index dcb7641124..cd973858ff 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -245,7 +245,7 @@ bool Journal::drawJournal(int direction, int howFar) {
Common::String lineStart(_lines[temp].c_str(), matchP);
if (lineStart.hasPrefix("@")) {
width = screen.stringWidth(lineStart.c_str() + 1);
- screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), 15, "%s", lineStart.c_str() + 1);
+ screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_HIGHLIGHT, "%s", lineStart.c_str() + 1);
} else {
width = screen.stringWidth(lineStart.c_str());
screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_COLOR, "%s", lineStart.c_str());
@@ -260,13 +260,13 @@ bool Journal::drawJournal(int direction, int howFar) {
// Print remainder of line
screen.gPrint(Common::Point(JOURNAL_LEFT_X + width, yp), COL_PEN_COLOR, "%s", matchP + _find.size());
} else if (_lines[temp].hasPrefix("@")) {
- screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), 15, "%s", _lines[temp].c_str() + 1);
+ screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_HIGHLIGHT, "%s", _lines[temp].c_str() + 1);
} else {
screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_COLOR, "%s", _lines[temp].c_str());
}
} else {
if (_lines[temp].hasPrefix("@")) {
- screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), 15, "%s", _lines[temp].c_str() + 1);
+ screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_HIGHLIGHT, "%s", _lines[temp].c_str() + 1);
} else {
screen.gPrint(Common::Point(JOURNAL_LEFT_X, yp), COL_PEN_COLOR, "%s", _lines[temp].c_str());
}
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index ab2c8be6b6..c05680eb08 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -72,6 +72,7 @@ enum GameType {
#define COL_INFO_FOREGROUND (IS_SERRATED_SCALPEL ? (byte)Scalpel::INFO_FOREGROUND : (byte)Tattoo::INFO_FOREGROUND)
#define COL_PEN_COLOR (IS_SERRATED_SCALPEL ? (byte)Scalpel::PEN_COLOR : (byte)Tattoo::PEN_COLOR)
+#define COL_PEN_HIGHLIGHT (IS_SERRATED_SCALPEL ? 15 : 129)
struct SherlockGameDescription;
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp
index 6c33971357..b4b8005ae6 100644
--- a/engines/sherlock/tattoo/tattoo_journal.cpp
+++ b/engines/sherlock/tattoo/tattoo_journal.cpp
@@ -409,7 +409,7 @@ void TattooJournal::loadLocations() {
locNumStr += line[i];
i++;
}
- locNum = atoi(locNumStr.c_str());
+ locNum = atoi(locNumStr.c_str()) - 1;
// Skip the dot, spaces and initial quotation mark
while (line[i] == ' ' || line[i] == '.' || line[i] == '\"')