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

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Tue Oct 3 01:07:46 CEST 2006


Revision: 24089
          http://svn.sourceforge.net/scummvm/?rev=24089&view=rev
Author:   eriktorbjorn
Date:     2006-10-02 16:07:43 -0700 (Mon, 02 Oct 2006)

Log Message:
-----------
Fixed bug #1569594 ("BS2 DXA Movie Exit/Crash"). That's what I get for only
testing with subtitles enabled... :-)

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

Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp	2006-10-02 23:01:32 UTC (rev 24088)
+++ scummvm/trunk/engines/sword2/animation.cpp	2006-10-02 23:07:43 UTC (rev 24089)
@@ -254,23 +254,25 @@
 }
 
 void MoviePlayer::undrawTextObject(MovieTextObject *t) {
-	int xPos, yPos;
+	if (t->textSprite) {
+		int xPos, yPos;
 
-	calcTextPosition(t, xPos, yPos);
+		calcTextPosition(t, xPos, yPos);
 
-	// We only need to undraw the text if it's outside the frame. Otherwise
-	// the next frame will cover the old text anyway.
+		// We only need to undraw the text if it's outside the frame.
+		// Otherwise the next frame will cover the old text anyway.
 
-	if (yPos + t->textSprite->h > _frameY + _frameHeight || t->textSprite->w > _frameWidth) {
-		int screenWidth = _vm->_screen->getScreenWide();
-		byte *dst = _frameBuffer + yPos * screenWidth + xPos;
+		if (yPos + t->textSprite->h > _frameY + _frameHeight || t->textSprite->w > _frameWidth) {
+			int screenWidth = _vm->_screen->getScreenWide();
+			byte *dst = _frameBuffer + yPos * screenWidth + xPos;
 
-		for (int y = 0; y < t->textSprite->h; y++) {
-			memset(dst, 0, t->textSprite->w);
-			dst += screenWidth;
+			for (int y = 0; y < t->textSprite->h; y++) {
+				memset(dst, 0, t->textSprite->w);
+				dst += screenWidth;
+			}
+
+			_system->copyRectToScreen(_frameBuffer + yPos * screenWidth + xPos, screenWidth, xPos, yPos, t->textSprite->w, t->textSprite->h);
 		}
-
-		_system->copyRectToScreen(_frameBuffer + yPos * screenWidth + xPos, screenWidth, xPos, yPos, t->textSprite->w, t->textSprite->h);
 	}
 }
 


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