[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.64,1.65

David Eriksson twogood at users.sourceforge.net
Thu Nov 13 04:18:08 CET 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv946/queen

Modified Files:
	cutaway.cpp 
Log Message:
Fix crashing demos: the demos have no song parameter in cutaway animations.


Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- cutaway.cpp	10 Nov 2003 12:32:46 -0000	1.64
+++ cutaway.cpp	13 Nov 2003 12:17:53 -0000	1.65
@@ -893,12 +893,13 @@
 	anim.scale = (int16)READ_BE_UINT16(ptr);
 	ptr += 2;
 
-#if 1
-	anim.song = (int16)READ_BE_UINT16(ptr);
-	ptr += 2;
-#else
-	anim.song = 0;
-#endif
+	if (_resource->isDemo()) {
+		anim.song = 0;
+	}
+	else {
+		anim.song = (int16)READ_BE_UINT16(ptr);
+		ptr += 2;
+	}
 
 	// Extract information that depend on the signedness of values
 	if (anim.unpackFrame < 0) {





More information about the Scummvm-git-logs mailing list