[Scummvm-cvs-logs] scummvm master -> d021b20e82c0699cc2d168d7026b02bd92735fe1
dreammaster
dreammaster at scummvm.org
Tue Jul 28 02:37:09 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d021b20e82 SHERLOCK: RT: Fix loading and display of journal locations
Commit: d021b20e82c0699cc2d168d7026b02bd92735fe1
https://github.com/scummvm/scummvm/commit/d021b20e82c0699cc2d168d7026b02bd92735fe1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-27T20:32:32-04:00
Commit Message:
SHERLOCK: RT: Fix loading and display of journal locations
Changed paths:
engines/sherlock/journal.cpp
engines/sherlock/sherlock.h
engines/sherlock/tattoo/tattoo_journal.cpp
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index dcb7641..cd97385 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 ab2c8be..c05680e 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 6c33971..b4b8005 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] == '\"')
More information about the Scummvm-git-logs
mailing list