[Scummvm-cvs-logs] SF.net SVN: scummvm: [29677] scummvm/trunk/engines/sword2/function.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sat Dec 1 09:15:30 CET 2007


Revision: 29677
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29677&view=rev
Author:   eriktorbjorn
Date:     2007-12-01 00:15:30 -0800 (Sat, 01 Dec 2007)

Log Message:
-----------
Experimental "focus rectangle" support. I don't have any way to actually test
it myself.

Modified Paths:
--------------
    scummvm/trunk/engines/sword2/function.cpp

Modified: scummvm/trunk/engines/sword2/function.cpp
===================================================================
--- scummvm/trunk/engines/sword2/function.cpp	2007-12-01 04:54:06 UTC (rev 29676)
+++ scummvm/trunk/engines/sword2/function.cpp	2007-12-01 08:15:30 UTC (rev 29677)
@@ -920,6 +920,15 @@
 
 		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 @@
 	// finished.
 
 	if (speechFinished && !_speechAnimType) {
+		_vm->_system->clearFocusRectangle();
+
 		// If there is text, kill it
 		if (_speechTextBlocNo) {
 			_vm->_fontRenderer->killTextBloc(_speechTextBlocNo);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list