diff options
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/journal.cpp | 5 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_journal.h | 40 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_inventory.cpp | 4 |
3 files changed, 25 insertions, 24 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 8763af31dd..7c2d1c263a 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -438,8 +438,9 @@ void Journal::loadJournalFile(bool alreadyLoaded) { } } - // Is it a control character? - if (isPrintable(c)) { + if (c == '\r' || c == '\n') { + journalString += '\n'; + } else if (isPrintable(c)) { // Nope. Set flag for allowing control codes to insert spaces ctrlSpace = true; justChangedSpeaker = false; diff --git a/engines/sherlock/tattoo/tattoo_journal.h b/engines/sherlock/tattoo/tattoo_journal.h index 9f0fa1fc9b..282f5b05f1 100644 --- a/engines/sherlock/tattoo/tattoo_journal.h +++ b/engines/sherlock/tattoo/tattoo_journal.h @@ -1,24 +1,24 @@ /* ScummVM - Graphic Adventure Engine -* -* ScummVM is the legal property of its developers, whose names -* are too numerous to list here. Please refer to the COPYRIGHT -* file distributed with this source distribution. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -*/ + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ #ifndef SHERLOCK_TATTOO_JOURNAL_H #define SHERLOCK_TATTOO_JOURNAL_H diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index 9f126cf7a7..c0b3180a51 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -377,14 +377,14 @@ void WidgetInventoryVerbs::handleEvents() { innerBounds.grow(-3); // Flag is they started pressing outside of the menu - if (events._firstPress && !_bounds.contains(mousePos)) + if (events._firstPress && !innerBounds.contains(mousePos)) _outsideMenu = true; if (events._released || events._rightReleased || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { ui._scrollHighlight = SH_NONE; banishWindow(); - if ((_outsideMenu && !innerBounds.contains(mousePos)) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { + if (_outsideMenu || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { _owner->_invVerbMode = 0; } else if (innerBounds.contains(mousePos)) { _outsideMenu = false; |