[Scummvm-cvs-logs] SF.net SVN: scummvm: [28744] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Aug 26 05:32:18 CEST 2007


Revision: 28744
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28744&view=rev
Author:   thebluegr
Date:     2007-08-25 20:32:18 -0700 (Sat, 25 Aug 2007)

Log Message:
-----------
Don't play a music track when loading a saved game from chapter 6 in IHNM for now either, until the cause for the incorrect music table for that chapter is found

Modified Paths:
--------------
    scummvm/trunk/engines/saga/saveload.cpp
    scummvm/trunk/engines/saga/sfuncs.cpp

Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp	2007-08-26 03:24:39 UTC (rev 28743)
+++ scummvm/trunk/engines/saga/saveload.cpp	2007-08-26 03:32:18 UTC (rev 28744)
@@ -269,10 +269,21 @@
 		_music->stop();
 		if (_scene->currentChapterNumber() == 8)
 			_interface->setMode(kPanelChapterSelection);
-		if (getGameId() != GID_IHNM_DEMO)
-			_music->play(_music->_songTable[_scene->getCurrentMusicTrack()], _scene->getCurrentMusicRepeat() ? MUSIC_LOOP : MUSIC_NORMAL);			
-		else
+		if (getGameId() != GID_IHNM_DEMO) {
+			// HACK for chapter 6 (last chapter) in IHNM. For some reason, the songtable loaded is
+			// incorrect, and the game crashes here when trying to load a music track there. For now,
+			// just don't change the music track for chapter 6
+			// FIXME: Figure out what's wrong with the loaded music track and remove this hack
+			// Note that when this hack is removed, remove it from Script::sfPlayMusic as well
+			if (getGameType() == GType_IHNM && _scene->currentChapterNumber() == 6) {
+				// do nothing
+			} else {
+				_music->play(_music->_songTable[_scene->getCurrentMusicTrack()], _scene->getCurrentMusicRepeat() ? MUSIC_LOOP : MUSIC_NORMAL);			
+			}
+			//_music->play(_music->_songTable[_scene->getCurrentMusicTrack()], _scene->getCurrentMusicRepeat() ? MUSIC_LOOP : MUSIC_NORMAL);			
+		} else {
 			_music->play(3, MUSIC_LOOP);
+		}
 	}
 
 	// Inset scene

Modified: scummvm/trunk/engines/saga/sfuncs.cpp
===================================================================
--- scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-26 03:24:39 UTC (rev 28743)
+++ scummvm/trunk/engines/saga/sfuncs.cpp	2007-08-26 03:32:18 UTC (rev 28744)
@@ -1680,6 +1680,7 @@
 			// incorrect, and the game crashes here when trying to load a music track there. For now,
 			// just don't change the music track for chapter 6
 			// FIXME: Figure out what's wrong with the loaded music track and remove this hack
+			// Note that when this hack is removed, remove it from SagaEngine::load as well
 			if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 6)
 				return;
 			_vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP : MUSIC_NORMAL);


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