aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-08-26 05:03:59 +0000
committerFilippos Karapetis2007-08-26 05:03:59 +0000
commit6358d6bb07e12a7f16b2fa9eae7d7a706d638859 (patch)
tree4d34b22a53f447b03feaeff0f99361c560a4945d
parenta6048447fc29cd271f8ea3b0a3e209c77786aa78 (diff)
downloadscummvm-rg350-6358d6bb07e12a7f16b2fa9eae7d7a706d638859.tar.gz
scummvm-rg350-6358d6bb07e12a7f16b2fa9eae7d7a706d638859.tar.bz2
scummvm-rg350-6358d6bb07e12a7f16b2fa9eae7d7a706d638859.zip
One more place where music for chapter 6 shouldn't be played for now
svn-id: r28745
-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 {