[Scummvm-cvs-logs] SF.net SVN: scummvm: [22503] scummvm/trunk/engines/kyra

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed May 17 13:55:12 CEST 2006


Revision: 22503
Author:   eriktorbjorn
Date:     2006-05-17 13:54:51 -0700 (Wed, 17 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22503&view=rev

Log Message:
-----------
Fixed two off-by-one errors. One would cause the same frame of the Kyra 3 to be
displayed twice in a row. The other, more serious one, would cause ScummVM to
crash when reaching the end of the music. Now the music loops properly. (It
does fade down before looping, but that's how it is in the original as well.
It's just the way the music is recorded.)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra3.cpp
    scummvm/trunk/engines/kyra/sound_digital.cpp
Modified: scummvm/trunk/engines/kyra/kyra3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-17 20:35:25 UTC (rev 22502)
+++ scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-17 20:54:51 UTC (rev 22503)
@@ -90,7 +90,7 @@
 			delayUntil(nextRun);
 		}
 	
-		for (int i = 64; i >= 29; --i) {
+		for (int i = 64; i > 29; --i) {
 			uint32 nextRun = _system->getMillis() + 3 * _tickLength;
 			logo->displayFrame(i);
 			_screen->updateScreen();

Modified: scummvm/trunk/engines/kyra/sound_digital.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_digital.cpp	2006-05-17 20:35:25 UTC (rev 22502)
+++ scummvm/trunk/engines/kyra/sound_digital.cpp	2006-05-17 20:54:51 UTC (rev 22503)
@@ -133,7 +133,9 @@
 
 	// if no bytes of the old chunk are left, read the next one
 	if (_bytesLeft <= 0) {
-		if (_processedSize > _totalSize) {
+		if (_processedSize >= _totalSize) {
+			// TODO: Eventually, we're probably going to need the
+			//       ability to loop the sound. Add this here?
 			_endOfData = true;
 			return 0;
 		}


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