[Scummvm-cvs-logs] scummvm master -> 97b2f5890e6485093a75004b1431649eaefdba4c

dreammaster dreammaster at scummvm.org
Thu Sep 10 03:48:47 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
97b2f5890e SHERLOCK: 3DO: Improve syncing of 3do portrait movies with talk text


Commit: 97b2f5890e6485093a75004b1431649eaefdba4c
    https://github.com/scummvm/scummvm/commit/97b2f5890e6485093a75004b1431649eaefdba4c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-09-09T21:48:21-04:00

Commit Message:
SHERLOCK: 3DO: Improve syncing of 3do portrait movies with talk text

Changed paths:
    engines/sherlock/scalpel/scalpel_talk.cpp
    engines/sherlock/scalpel/scalpel_talk.h
    engines/sherlock/talk.h



diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 3f894d7..5241f7b 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 31f78cb..025c8ed 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 a22a39d..3bbb326 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






More information about the Scummvm-git-logs mailing list