From d021b20e82c0699cc2d168d7026b02bd92735fe1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 27 Jul 2015 20:32:32 -0400 Subject: SHERLOCK: RT: Fix loading and display of journal locations --- engines/sherlock/journal.cpp | 6 +++--- engines/sherlock/sherlock.h | 1 + engines/sherlock/tattoo/tattoo_journal.cpp | 2 +- 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] == '\"') -- cgit v1.2.3