aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-26 03:24:39 +0000
committerFilippos Karapetis2007-08-26 03:24:39 +0000
commitc51fb71f05db52735e6133915a875de8d2f6e1b2 (patch)
tree900269fb2e462a1fef481661ccbd4c35b94ce249
parent5e8a4a1425f08388dd44787a50da445caf00301a (diff)
downloadscummvm-rg350-c51fb71f05db52735e6133915a875de8d2f6e1b2.tar.gz
scummvm-rg350-c51fb71f05db52735e6133915a875de8d2f6e1b2.tar.bz2
scummvm-rg350-c51fb71f05db52735e6133915a875de8d2f6e1b2.zip
The music table loaded for chapter 6 (final chapter) in IHNM is problematic, so don't load any music for that chapter until the cause is found
svn-id: r28743
-rw-r--r--engines/saga/sfuncs.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 01b54e7aaf..0135685bb0 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -1676,6 +1676,12 @@ void Script::sfPlayMusic(SCRIPTFUNC_PARAMS) {
warning("sfPlayMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen - 1);
} else {
_vm->_music->setVolume(_vm->_musicVolume == 10 ? -1 : _vm->_musicVolume * 25, 1);
+ // 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
+ if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 6)
+ return;
_vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP : MUSIC_NORMAL);
if (!_vm->_scene->haveChapterPointsChanged()) {
_vm->_scene->setCurrentMusicTrack(param1);