diff options
author | Martin Kiewitz | 2015-06-13 21:15:34 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-06-13 21:15:34 +0200 |
commit | d8e57490a5bf1d37ac579788b22fd1b3c30dc051 (patch) | |
tree | 7b74881d78908b8def92ac7660fcb9f49c6b5224 /engines/sherlock/scalpel | |
parent | 23f368c9814645707a6eb1c7253d6ee3dc3fbf9d (diff) | |
download | scummvm-rg350-d8e57490a5bf1d37ac579788b22fd1b3c30dc051.tar.gz scummvm-rg350-d8e57490a5bf1d37ac579788b22fd1b3c30dc051.tar.bz2 scummvm-rg350-d8e57490a5bf1d37ac579788b22fd1b3c30dc051.zip |
SHERLOCK: 3DO: movie playback for script events
also added debug information output
Diffstat (limited to 'engines/sherlock/scalpel')
-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 |
3 files changed, 26 insertions, 3 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) |