SHERLOCK: RT: Fix loading and display of journal locations

This commit is contained in:
Paul Gilbert 2015-07-27 20:32:32 -04:00
parent 6ff53ea018
commit d021b20e82
3 changed files with 5 additions and 4 deletions

View File

@ -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());
}

View File

@ -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;

View File

@ -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] == '\"')