aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/journal.cpp12
-rw-r--r--engines/sherlock/screen.cpp13
2 files changed, 15 insertions, 10 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index 2811c463a2..f9c2c54289 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -56,7 +56,7 @@ Journal::Journal(SherlockEngine *vm): _vm(vm) {
_index = 0;
_sub = 0;
_up = _down = false;
- _page = 0;
+ _page = 1;
_converseNum = -1;
// Load the journal directory and location names
@@ -140,7 +140,6 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
Screen &screen = *_vm->_screen;
Talk &talk = *_vm->_talk;
JournalEntry &journalEntry = _journal[_index];
- Statement &statement = talk[journalEntry._statementNum];
Common::String dirFilename = _directory[journalEntry._converseNum];
bool replyOnly = journalEntry._replyOnly;
@@ -184,6 +183,7 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
}
// Start building journal string
+ Statement &statement = talk[journalEntry._statementNum];
Common::String journalString;
if (newLocation != oldLocation) {
@@ -260,7 +260,7 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
// If a reply isn't just being started, and we didn't just end
// a comment (which would have added a line), add a carriage return
if (!startOfReply && ((!commentJustPrinted && c == '{') || c == '}'))
- journalString += '"';
+ journalString += '\n';
startOfReply = false;
// Handle setting or clearing comment state
@@ -434,7 +434,7 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
}
// Add in the line
- _lines.push_back(Common::String(startP, endP));
+ _lines.push_back(Common::String(journalString.c_str(), endP));
// Strip line off from string being processed
journalString = *endP ? Common::String(endP + 1) : "";
@@ -461,6 +461,10 @@ void Journal::drawInterface() {
bg->read(palette, PALETTE_SIZE);
delete bg;
+ // Translate the palette for display
+ for (int idx = 0; idx < PALETTE_SIZE; ++idx)
+ palette[idx] = VGA_COLOR_TRANS(palette[idx]);
+
// Set the palette and print the title
screen.setPalette(palette);
screen.gPrint(Common::Point(111, 18), BUTTON_BOTTOM, "Watson's Journal");
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 0eeddf2a5f..a30108118c 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -440,15 +440,16 @@ void Screen::buttonPrint(const Common::Point &pt, byte color, bool slamIt,
if (slamIt) {
print(Common::Point(xStart, pt.y + 1), COMMAND_HIGHLIGHTED, "%c", str[0]);
print(Common::Point(xStart + charWidth(str[0]), pt.y + 1),
- color, "%s", str.c_str() + 1);
+ COMMAND_FOREGROUND, str.c_str() + 1);
} else {
- print(Common::Point(xStart, pt.y), COMMAND_HIGHLIGHTED, "%c", str[0]);
- print(Common::Point(xStart + charWidth(str[0]), pt.y),
- color, "%s", str.c_str() + 1);
+ gPrint(Common::Point(xStart, pt.y), COMMAND_HIGHLIGHTED, "%c", str[0]);
+ gPrint(Common::Point(xStart + charWidth(str[0]), pt.y),
+ COMMAND_FOREGROUND, str.c_str() + 1);
}
+ } else if (slamIt) {
+ print(Common::Point(xStart, pt.y + 1), color, str.c_str());
} else {
- print(Common::Point(xStart, slamIt ? pt.y + 1 : pt.y), COMMAND_HIGHLIGHTED,
- "%s", str.c_str());
+ gPrint(Common::Point(xStart, pt.y), color, str.c_str());
}
}