diff options
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 25 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.h | 2 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/talk.cpp | 3 | ||||
-rw-r--r-- | engines/sherlock/talk.h | 2 |
5 files changed, 28 insertions, 6 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index 3a5ac677eb..9003eb5d24 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -524,15 +524,32 @@ void ScalpelTalk::talkWait(const byte *&str) { } } -void ScalpelTalk::talk3DOMovieTrigger(int selector, int subIndex) { +void ScalpelTalk::talk3DOMovieTrigger(int subIndex) { if (_vm->getPlatform() != Common::kPlatform3DO) { // No 3DO? No movie! return; } // Find out a few things that we need + int userSelector = _vm->_ui->_selector; + int scriptSelector = _scriptSelect; + int selector = 0; int roomNr = _vm->_scene->_currentScene; + if (userSelector >= 0) { + // User-selected dialog + selector = userSelector; + } else { + if (scriptSelector >= 0) { + // Script-selected dialog + selector = scriptSelector; + subIndex--; // for scripts we adjust subIndex, b/c we won't get called from doTalkControl() + } else { + warning("talk3DOMovieTrigger: unable to find selector"); + return; + } + } + // Make a quick update, so that current text is shown on screen _vm->_screen->update(); @@ -546,6 +563,12 @@ void ScalpelTalk::talk3DOMovieTrigger(int selector, int subIndex) { movieFilename.insertChar(subIndex + 'a', movieFilename.size()); movieFilename = Common::String::format("movies/%02d/%s.stream", roomNr, movieFilename.c_str()); + warning("3DO movie player:"); + warning("room: %d", roomNr); + warning("script: %s", _scriptName.c_str()); + warning("selector: %d", selector); + warning("subindex: %d", subIndex); + Scalpel3DOMoviePlay(movieFilename.c_str(), Common::Point(5, 5)); // Restore screen HACK diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h index 3a94fbcf89..2f8e412795 100644 --- a/engines/sherlock/scalpel/scalpel_talk.h +++ b/engines/sherlock/scalpel/scalpel_talk.h @@ -66,7 +66,7 @@ protected: /** * Trigger to play a 3DO talk dialog movie */ - virtual void talk3DOMovieTrigger(int selector, int subIndex); + virtual void talk3DOMovieTrigger(int subIndex); public: ScalpelTalk(SherlockEngine *vm); diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index c8d9aeecc7..302e95867c 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -1641,7 +1641,7 @@ void ScalpelUserInterface::doTalkControl() { } // Trigger to play 3DO movie - talk.talk3DOMovieTrigger(_selector, 0); + talk.talk3DOMovieTrigger(0); talk.waitForMore(talk._statements[_selector]._statement.size()); if (talk._talkToAbort) diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 1a27f8e9fc..2fe9f35650 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -1079,8 +1079,7 @@ void Talk::doScript(const Common::String &script) { if (_wait) { // Trigger to play 3DO movie - int selector = _vm->_ui->_selector; - talk3DOMovieTrigger(selector, subIndex); + talk3DOMovieTrigger(subIndex); subIndex++; } diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h index aea2800a1f..6695e4ea08 100644 --- a/engines/sherlock/talk.h +++ b/engines/sherlock/talk.h @@ -267,7 +267,7 @@ protected: /** * Trigger to play a 3DO talk dialog movie */ - virtual void talk3DOMovieTrigger(int selector, int subIndex) {}; + virtual void talk3DOMovieTrigger(int subIndex) {}; public: TalkSequence _talkSequenceStack[TALK_SEQUENCE_STACK_SIZE]; |