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

svn-id: r28744
This commit is contained in:
Filippos Karapetis 2007-08-26 03:32:18 +00:00
parent c51fb71f05
commit a6048447fc
2 changed files with 15 additions and 3 deletions

View File

@ -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

View File

@ -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);