aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/scene.cpp1
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.cpp4
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp4
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.h5
-rw-r--r--engines/sherlock/tattoo/widget_text.cpp2
5 files changed, 14 insertions, 2 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 3edac3c27d..e6a2762055 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -286,6 +286,7 @@ void Scene::freeScene() {
if (_currentScene == -1)
return;
+ _vm->_ui->clearWindow();
_vm->_talk->freeTalkVars();
_vm->_inventory->freeInv();
_vm->_music->freeSong();
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index 4868ef5ae0..d7d85f48dd 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -184,7 +184,7 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm), _talkWidget(vm) {
void TattooTalk::talkInterface(const byte *&str) {
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
- const char *s = (const char *)str;
+ const byte *s = str;
// Move to past the end of the text string
_charCount = 0;
@@ -195,7 +195,7 @@ void TattooTalk::talkInterface(const byte *&str) {
// Display the text window
ui.banishWindow();
- ui._textWidget.load(s, _speaker);
+ ui._textWidget.load(Common::String((const char *)s, (const char *)str), _speaker);
ui._textWidget.summonWindow();
_wait = true;
}
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index e309875ef7..ff98706844 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -865,6 +865,10 @@ void TattooUserInterface::banishWindow() {
_widget = nullptr;
}
+void TattooUserInterface::clearWindow() {
+ banishWindow();
+}
+
} // End of namespace Tattoo
} // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.h b/engines/sherlock/tattoo/tattoo_user_interface.h
index 5b623e74ba..527f326498 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.h
+++ b/engines/sherlock/tattoo/tattoo_user_interface.h
@@ -225,6 +225,11 @@ public:
* Draw the user interface onto the screen's back buffers
*/
virtual void drawInterface(int bufferNum = 3);
+
+ /**
+ * Clear any active text window
+ */
+ virtual void clearWindow();
};
} // End of namespace Tattoo
diff --git a/engines/sherlock/tattoo/widget_text.cpp b/engines/sherlock/tattoo/widget_text.cpp
index 5c2e7e087f..dd696b1a87 100644
--- a/engines/sherlock/tattoo/widget_text.cpp
+++ b/engines/sherlock/tattoo/widget_text.cpp
@@ -152,6 +152,8 @@ void WidgetText::centerWindowOnSpeaker(int speaker) {
pt.y = SHERLOCK_SCREEN_HEIGHT / 2 - _bounds.height() / 2;
}
}
+
+ _bounds.moveTo(pt);
}
void WidgetText::render(const Common::String &str) {