aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-12-01 08:15:30 +0000
committerTorbjörn Andersson2007-12-01 08:15:30 +0000
commit044100c0975babf7f823802f9f7760eccf7d954e (patch)
treea1a2fc755fe75a616674fbb0e8cd53c6aff7b338 /engines/sword2
parente696469148c168ff4d6648a68ae13474e55e0c03 (diff)
downloadscummvm-rg350-044100c0975babf7f823802f9f7760eccf7d954e.tar.gz
scummvm-rg350-044100c0975babf7f823802f9f7760eccf7d954e.tar.bz2
scummvm-rg350-044100c0975babf7f823802f9f7760eccf7d954e.zip
Experimental "focus rectangle" support. I don't have any way to actually test
it myself. svn-id: r29677
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/function.cpp11
1 files changed, 11 insertions, 0 deletions
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);