From 044100c0975babf7f823802f9f7760eccf7d954e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 1 Dec 2007 08:15:30 +0000 Subject: Experimental "focus rectangle" support. I don't have any way to actually test it myself. svn-id: r29677 --- engines/sword2/function.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engines/sword2') diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp index 917d47d7a2..f09ca0cd1b 100644 --- a/engines/sword2/function.cpp +++ b/engines/sword2/function.cpp @@ -920,6 +920,15 @@ int32 Logic::fnISpeak(int32 *params) { locateTalker(params); + // If the speech is associated with a specific animation, and + // not just a voice-over, set the focus area to the calculated + // position. + + if (_animId) { + Common::Rect rect(_textX - 96, _textY - 64, _textX + 96, _textY + 64); + _vm->_system->setFocusRectangle(rect); + } + // Is it to be speech or subtitles or both? // Assume not running until know otherwise @@ -1075,6 +1084,8 @@ int32 Logic::fnISpeak(int32 *params) { // finished. if (speechFinished && !_speechAnimType) { + _vm->_system->clearFocusRectangle(); + // If there is text, kill it if (_speechTextBlocNo) { _vm->_fontRenderer->killTextBloc(_speechTextBlocNo); -- cgit v1.2.3