aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/talk.cpp3
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.cpp16
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.h7
-rw-r--r--engines/sherlock/tattoo/widget_talk.cpp6
4 files changed, 12 insertions, 20 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 217b24a772..ffc55db121 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -374,8 +374,7 @@ void Talk::talkTo(const Common::String &filename) {
// If the new conversion is a reply first, then we don't need
// to display any choices, since the reply needs to be shown
- if (!newStatement._statement.hasPrefix("*") &&
- !newStatement._statement.hasPrefix("^")) {
+ if (!newStatement._statement.hasPrefix("*") && !newStatement._statement.hasPrefix("^")) {
_talkIndex = select;
showTalk();
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index d0c4bdc3b0..51704e7023 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -198,9 +198,15 @@ void TattooTalk::talkInterface(const byte *&str) {
_wait = true;
}
-void TattooTalk::openTalkWindow() {
+void TattooTalk::showTalk() {
+ TattooPeople &people = *(TattooPeople *)_vm->_people;
+
+ _sequenceStack.clear();
+ people.setListenSequence(_talkTo, 129);
+
_talkWidget.load();
_talkWidget.summonWindow();
+ _talkWidget.refresh();
}
OpcodeReturn TattooTalk::cmdSwitchSpeaker(const byte *&str) {
@@ -861,14 +867,6 @@ OpcodeReturn TattooTalk::cmdWalkHomesAndNPCToCoords(const byte *&str) {
return RET_SUCCESS;
}
-void TattooTalk::showTalk() {
- TattooPeople &people = *(TattooPeople *)_vm->_people;
-
- _sequenceStack.clear();
- people.setListenSequence(_talkTo, 129);
- _talkWidget.refresh();
-}
-
} // End of namespace Tattoo
} // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_talk.h b/engines/sherlock/tattoo/tattoo_talk.h
index f9a4d01f4f..8abbb1b8be 100644
--- a/engines/sherlock/tattoo/tattoo_talk.h
+++ b/engines/sherlock/tattoo/tattoo_talk.h
@@ -79,13 +79,6 @@ private:
OpcodeReturn cmdWalkNPCToCAnimation(const byte *&str);
OpcodeReturn cmdWalkNPCToCoords(const byte *&str);
OpcodeReturn cmdWalkHomesAndNPCToCoords(const byte *&str);
-private:
- void drawTalk(const char *str);
-
- /**
- * Open the talk window
- */
- void openTalkWindow();
protected:
/**
* Display the talk interface window
diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp
index cc6c49e551..7d86736925 100644
--- a/engines/sherlock/tattoo/widget_talk.cpp
+++ b/engines/sherlock/tattoo/widget_talk.cpp
@@ -415,7 +415,9 @@ void WidgetTalk::handleEvents() {
// See if the new file is a standard file, a reply first file, or a Stealth Mode file
if (!talk._statements[select]._statement.hasPrefix("*") && !talk._statements[select]._statement.hasPrefix("^")) {
- talk.openTalkWindow();
+ load();
+ summonWindow();
+
setStatementLines();
render(HL_NO_HIGHLIGHTING);
break;
@@ -557,7 +559,7 @@ void WidgetTalk::setStatementLines() {
// But if there isn't (and this shouldn't ever happen), just split the line right at that point
if (width > xSize) {
if (space) {
- line = Common::String(str.c_str(), space - 1);
+ line = Common::String(str.c_str(), space);
str = Common::String(space + 1);
} else {
line = Common::String(str.c_str(), ch);