aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.cpp12
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.h10
-rw-r--r--engines/sherlock/talk.cpp10
-rw-r--r--engines/sherlock/talk.h4
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.cpp4
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.h10
6 files changed, 40 insertions, 10 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 9b38a95c64..69d14211fd 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -171,6 +171,18 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) {
}
+void ScalpelTalk::talkTo(const Common::String filename) {
+ ScalpelUserInterface &ui = *(ScalpelUserInterface *)_vm->_ui;
+
+ Talk::talkTo(filename);
+
+ if (filename == "Tube59c") {
+ // WORKAROUND: Original game bug causes the results of testing the powdery substance
+ // to disappear too quickly. Introduce a delay to allow it to be properly displayed
+ ui._menuCounter = 30;
+ }
+}
+
void ScalpelTalk::talkInterface(const byte *&str) {
FixedText &fixedText = *_vm->_fixedText;
People &people = *_vm->_people;
diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h
index 4d13258985..31f78cbf85 100644
--- a/engines/sherlock/scalpel/scalpel_talk.h
+++ b/engines/sherlock/scalpel/scalpel_talk.h
@@ -84,6 +84,16 @@ public:
virtual ~ScalpelTalk() {}
/**
+ * Called whenever a conversation or item script needs to be run. For standard conversations,
+ * it opens up a description window similar to how 'talk' does, but shows a 'reply' directly
+ * instead of waiting for a statement option.
+ * @remarks It seems that at some point, all item scripts were set up to use this as well.
+ * In their case, the conversation display is simply suppressed, and control is passed on to
+ * doScript to implement whatever action is required.
+ */
+ virtual void talkTo(const Common::String filename);
+
+ /**
* Draws the interface for conversation display
*/
void drawInterface();
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index d0c74f8c4b..b31a273a88 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -127,7 +127,7 @@ Talk::Talk(SherlockEngine *vm) : _vm(vm) {
_talkHistory.resize(IS_ROSE_TATTOO ? 1500 : 500);
}
-void Talk::talkTo(const Common::String &filename) {
+void Talk::talkTo(const Common::String filename) {
Events &events = *_vm->_events;
Inventory &inv = *_vm->_inventory;
Journal &journal = *_vm->_journal;
@@ -440,12 +440,6 @@ void Talk::talkTo(const Common::String &filename) {
// previous script can continue
popStack();
- if (IS_SERRATED_SCALPEL && filename == "Tube59c") {
- // WORKAROUND: Original game bug causes the results of testing the powdery substance
- // to disappear too quickly. Introduce a delay to allow it to be properly displayed
- ui._menuCounter = 30;
- }
-
events.setCursor(ARROW);
}
@@ -647,7 +641,7 @@ void Talk::pushSequence(int speaker) {
}
}
-void Talk::doScript(const Common::String script) {
+void Talk::doScript(const Common::String &script) {
People &people = *_vm->_people;
Scene &scene = *_vm->_scene;
Screen &screen = *_vm->_screen;
diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h
index b3868d7293..a22a39db94 100644
--- a/engines/sherlock/talk.h
+++ b/engines/sherlock/talk.h
@@ -283,13 +283,13 @@ public:
* In their case, the conversation display is simply suppressed, and control is passed on to
* doScript to implement whatever action is required.
*/
- void talkTo(const Common::String &filename);
+ virtual void talkTo(const Common::String filename);
/**
* Parses a reply for control codes and display text. The found text is printed within
* the text window, handles delays, animations, and animating portraits.
*/
- void doScript(const Common::String script);
+ void doScript(const Common::String &script);
/**
* Main method for handling conversations when a character to talk to has been
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index a341115137..7c57605f61 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -183,6 +183,10 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm), _talkWidget(vm), _passwor
_opcodeTable = OPCODE_METHODS;
}
+void TattooTalk::talkTo(const Common::String filename) {
+ Talk::talkTo(filename);
+}
+
void TattooTalk::talkInterface(const byte *&str) {
TattooEngine &vm = *(TattooEngine *)_vm;
Sound &sound = *_vm->_sound;
diff --git a/engines/sherlock/tattoo/tattoo_talk.h b/engines/sherlock/tattoo/tattoo_talk.h
index d2ddda08a8..9b010513dc 100644
--- a/engines/sherlock/tattoo/tattoo_talk.h
+++ b/engines/sherlock/tattoo/tattoo_talk.h
@@ -103,6 +103,16 @@ protected:
public:
TattooTalk(SherlockEngine *vm);
virtual ~TattooTalk() {}
+
+ /**
+ * Called whenever a conversation or item script needs to be run. For standard conversations,
+ * it opens up a description window similar to how 'talk' does, but shows a 'reply' directly
+ * instead of waiting for a statement option.
+ * @remarks It seems that at some point, all item scripts were set up to use this as well.
+ * In their case, the conversation display is simply suppressed, and control is passed on to
+ * doScript to implement whatever action is required.
+ */
+ virtual void talkTo(const Common::String filename);
/**
* Push the details of a passed object onto the saved sequences stack