aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-09-09 21:48:21 -0400
committerPaul Gilbert2015-09-09 21:48:21 -0400
commit97b2f5890e6485093a75004b1431649eaefdba4c (patch)
treeb9429844e0f6abaf5d837c6038ae4d893c12aed9
parent84bb389baedc458e5d10fe230d716e04375ddbf0 (diff)
downloadscummvm-rg350-97b2f5890e6485093a75004b1431649eaefdba4c.tar.gz
scummvm-rg350-97b2f5890e6485093a75004b1431649eaefdba4c.tar.bz2
scummvm-rg350-97b2f5890e6485093a75004b1431649eaefdba4c.zip
SHERLOCK: 3DO: Improve syncing of 3do portrait movies with talk text
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.cpp48
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.h8
-rw-r--r--engines/sherlock/talk.h2
3 files changed, 50 insertions, 8 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 3f894d71a7..5241f7bc9d 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -548,12 +548,46 @@ void ScalpelTalk::nothingToSay() {
}
void ScalpelTalk::switchSpeaker() {
- // If it's the 3DO, pass on to start the actor's conversation movie
- if (IS_3DO)
- talk3DOMovieTrigger(_3doSpeechIndex++);
}
-void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
+int ScalpelTalk::waitForMore(int delay) {
+ Events &events = *_vm->_events;
+
+ if (!IS_3DO) {
+ return Talk::waitForMore(delay);
+ }
+
+ // Hide the cursor
+ events.hideCursor();
+ events.wait(1);
+
+ switchSpeaker();
+
+ // Play the video
+ talk3DOMovieTrigger(_3doSpeechIndex++);
+
+ // Adjust _talkStealth mode:
+ // mode 1 - It was by a pause without stealth being on before the pause, so reset back to 0
+ // mode 3 - It was set by a pause with stealth being on before the pause, to set it to active
+ // mode 0/2 (Inactive/active) No change
+ switch (_talkStealth) {
+ case 1:
+ _talkStealth = 0;
+ break;
+ case 2:
+ _talkStealth = 2;
+ break;
+ default:
+ break;
+ }
+
+ events.showCursor();
+ events._pressed = events._released = false;
+
+ return 254;
+}
+
+bool ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
ScalpelEngine &vm = *(ScalpelEngine *)_vm;
Screen &screen = *_vm->_screen;
@@ -573,7 +607,7 @@ void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
subIndex--; // for scripts we adjust subIndex, b/c we won't get called from doTalkControl()
} else {
warning("talk3DOMovieTrigger: unable to find selector");
- return;
+ return true;
}
}
@@ -600,10 +634,12 @@ void ScalpelTalk::talk3DOMovieTrigger(int subIndex) {
warning("selector: %d", selector);
warning("subindex: %d", subIndex);
- vm.play3doMovie(movieFilename, Common::Point(5, 5), true);
+ bool result = vm.play3doMovie(movieFilename, Common::Point(5, 5), true);
// Restore screen HACK
_vm->_screen->makeAllDirty();
+
+ return result;
}
void ScalpelTalk::drawInterface() {
diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h
index 31f78cbf85..025c8edcde 100644
--- a/engines/sherlock/scalpel/scalpel_talk.h
+++ b/engines/sherlock/scalpel/scalpel_talk.h
@@ -94,6 +94,12 @@ public:
virtual void talkTo(const Common::String filename);
/**
+ * When the talk window has been displayed, waits a period of time proportional to
+ * the amount of text that's been displayed
+ */
+ virtual int waitForMore(int delay);
+
+ /**
* Draws the interface for conversation display
*/
void drawInterface();
@@ -112,7 +118,7 @@ public:
/**
* Trigger to play a 3DO talk dialog movie
*/
- void talk3DOMovieTrigger(int subIndex);
+ bool talk3DOMovieTrigger(int subIndex);
/**
* Push the details of a passed object onto the saved sequences stack
diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h
index a22a39db94..3bbb326c70 100644
--- a/engines/sherlock/talk.h
+++ b/engines/sherlock/talk.h
@@ -228,7 +228,7 @@ protected:
* When the talk window has been displayed, waits a period of time proportional to
* the amount of text that's been displayed
*/
- int waitForMore(int delay);
+ virtual int waitForMore(int delay);
/**
* Display the talk interface window