diff options
-rw-r--r-- | engines/saga/saveload.cpp | 17 | ||||
-rw-r--r-- | engines/saga/sfuncs.cpp | 1 |
2 files changed, 15 insertions, 3 deletions
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index 434cfffda1..04fa6c4a95 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -269,10 +269,21 @@ void SagaEngine::load(const char *fileName) { _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 diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 0135685bb0..5edbb5f96e 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1680,6 +1680,7 @@ void Script::sfPlayMusic(SCRIPTFUNC_PARAMS) { // 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); |