aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/saga/saveload.cpp3
-rw-r--r--engines/saga/sfuncs.cpp12
2 files changed, 13 insertions, 2 deletions
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 04fa6c4a95..f3b6c3947a 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -274,7 +274,8 @@ void SagaEngine::load(const char *fileName) {
// 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
+ // Note that when this hack is removed, remove it from Script::sfPlayMusic and
+ // Script::sfQueueMusic as well
if (getGameType() == GType_IHNM && _scene->currentChapterNumber() == 6) {
// do nothing
} else {
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 5edbb5f96e..6ab643e03b 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -1680,7 +1680,8 @@ 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
+ // Note that when this hack is removed, remove it from SagaEngine::load and
+ // Script::sfQueueMusic as well
if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 6)
return;
_vm->_music->play(_vm->_music->_songTable[param1], param2 ? MUSIC_LOOP : MUSIC_NORMAL);
@@ -2149,6 +2150,15 @@ void Script::sfQueueMusic(SCRIPTFUNC_PARAMS) {
return;
}
+ // 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 SagaEngine::load and
+ // Script::sfPlayMusic as well
+ if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 6)
+ return;
+
if (param1 >= _vm->_music->_songTableLen) {
warning("sfQueueMusic: Wrong song number (%d > %d)", param1, _vm->_music->_songTableLen - 1);
} else {