aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/journal.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-04-05 21:35:22 -0500
committerPaul Gilbert2015-04-05 21:35:22 -0500
commit900471834987c32b23b3162e2d2f40bbcc2b593d (patch)
tree74bb6a45e1c85ac99193f0fe642abdf94fd07e3a /engines/sherlock/journal.cpp
parentd17dea4afd76cba7280e3ffafd1e78a09430e983 (diff)
downloadscummvm-rg350-900471834987c32b23b3162e2d2f40bbcc2b593d.tar.gz
scummvm-rg350-900471834987c32b23b3162e2d2f40bbcc2b593d.tar.bz2
scummvm-rg350-900471834987c32b23b3162e2d2f40bbcc2b593d.zip
SHERLOCK: Fix display of journal
Diffstat (limited to 'engines/sherlock/journal.cpp')
-rw-r--r--engines/sherlock/journal.cpp12
1 files changed, 8 insertions, 4 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");