[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.155,1.156

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Aug 30 05:26:14 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29948

Modified Files:
	sfuncs.cpp 
Log Message:
The intro asks to play song number 0. I'm almost sure that the music that
is supposed to play at this point has resource number 32. _songTable[0]
contains the value 32 at this point, so song 0 is probably a valid music
request, and not a request to stop the music.

At the other end of the list, I believe the song number has to be *less*
than _songTableLen, not less or equal to it.

But feel free to revert this change if I'm messing things up. 


Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- sfuncs.cpp	30 Aug 2005 11:16:11 -0000	1.155
+++ sfuncs.cpp	30 Aug 2005 12:25:15 -0000	1.156
@@ -1643,13 +1643,13 @@
 		int16 param1 = thread->pop();
 		int16 param2 = thread->pop();
 
-		if (param1 < 1) {
+		if (param1 < 0) {
 			_vm->_music->stop();
 			return;
 		}
 
-		if (param1 > _vm->_music->_songTableLen) {
-			warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen);
+		if (param1 >= _vm->_music->_songTableLen) {
+			warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen - 1);
 		} else {
 			_vm->_music->setVolume(-1, 1);
 			_vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP: MUSIC_NORMAL);





More information about the Scummvm-git-logs mailing list