[Scummvm-cvs-logs] SF.net SVN: scummvm:[47263] scummvm/trunk/engines/sci/graphics/portrait.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jan 12 13:00:00 CET 2010


Revision: 47263
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47263&view=rev
Author:   m_kiewitz
Date:     2010-01-12 12:00:00 +0000 (Tue, 12 Jan 2010)

Log Message:
-----------
SCI: continue when kPortrait is called with no sync resource existant for mouth movement, prints warning() instead

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/portrait.cpp

Modified: scummvm/trunk/engines/sci/graphics/portrait.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/portrait.cpp	2010-01-12 10:23:16 UTC (rev 47262)
+++ scummvm/trunk/engines/sci/graphics/portrait.cpp	2010-01-12 12:00:00 UTC (rev 47263)
@@ -139,9 +139,6 @@
 	Resource *syncResource = _resMan->findResource(syncResourceId, true);
 	uint syncOffset = 0;
 
-	if (!syncResource)
-		error("kPortrait: Could not open sync resource %d %X", resourceId, audioNumber);
-
 	// Set the portrait palette
 	_palette->set(&_portraitPalette, 1);
 
@@ -153,6 +150,13 @@
 	_audio->stopAudio();
 	_audio->startAudio(resourceId, audioNumber);
 
+	if (!syncResource) {
+		// Getting the book in the book shop calls kPortrait where no sync exists
+		// TODO: find out what to do then
+		warning("kPortrait: no sync resource %d %X", resourceId, audioNumber);
+		return;
+	}
+
 	// Do animation depending on sync resource till audio is done playing
 	uint16 syncCue;
 	int timerPosition, curPosition;


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