aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/detection.cpp3
-rw-r--r--engines/sherlock/journal.cpp5
-rw-r--r--engines/sherlock/tattoo/tattoo_journal.h40
-rw-r--r--engines/sherlock/tattoo/widget_inventory.cpp6
-rw-r--r--engines/sherlock/tattoo/widget_talk.cpp17
5 files changed, 36 insertions, 35 deletions
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index 5a94b3485f..c6e632f999 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -199,7 +199,8 @@ bool SherlockMetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsLoadingDuringStartup) ||
(f == kSupportsDeleteSave) ||
(f == kSavesSupportMetaInfo) ||
- (f == kSavesSupportThumbnail);
+ (f == kSavesSupportThumbnail) ||
+ (f == kSimpleSavesNames);
}
bool Sherlock::SherlockEngine::hasFeature(EngineFeature f) const {
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..5e7238680a 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -376,15 +376,15 @@ void WidgetInventoryVerbs::handleEvents() {
Common::Rect innerBounds = _bounds;
innerBounds.grow(-3);
- // Flag is they started pressing outside of the menu
- if (events._firstPress && !_bounds.contains(mousePos))
+ // Flag is they are pressing outside of the menu
+ if (!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;
diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp
index b673f32d31..aec664561e 100644
--- a/engines/sherlock/tattoo/widget_talk.cpp
+++ b/engines/sherlock/tattoo/widget_talk.cpp
@@ -196,22 +196,21 @@ void WidgetTalk::handleEvents() {
// Handle selecting a talk entry if a numeric key has been pressed
if (keycode >= Common::KEYCODE_1 && keycode <= Common::KEYCODE_9) {
- int x = 0, t = 0, y = 0;
+ int x = 0, y = 0, t;
+
+ for (t = 0; t < (int)_statementLines.size(); ++t) {
+ if (t > 0 && _statementLines[x]._num != _statementLines[t]._num) {
+ x = t;
+ ++y;
+ }
- do {
if (y == (keycode - Common::KEYCODE_1)) {
_selector = _statementLines[t]._num;
_outsideMenu = false;
hotkey = true;
break;
}
-
- ++t;
- if (_statementLines[x]._num != _statementLines[t]._num) {
- x = t;
- ++y;
- }
- } while (t < (int)_statementLines.size());
+ }
}
// Display the selected statement highlighted and reset the last statement.