diff options
| -rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 48 | ||||
| -rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.h | 8 | ||||
| -rw-r--r-- | engines/sherlock/talk.h | 2 | 
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 | 
