Commit patch #1869749 "KYRA: HoF Towns Audio fix".

svn-id: r30438
This commit is contained in:
Johannes Schickel 2008-01-12 08:04:00 +00:00
parent afd8743465
commit 4f8cf19292

View File

@ -469,6 +469,7 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
// XXX
//}
if (_flags.platform == Common::kPlatformPC) {
assert(command*2+1 < _trackMapSize);
if (_curMusicTheme != _trackMap[command*2]) {
if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2)
@ -483,6 +484,17 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
} else {
_sound->beginFadeOut();
}
} else if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
if (command == -1) {
_sound->haltTrack();
} else {
assert(command*2+1 < _trackMapSize);
if (_trackMap[command*2] != -2 && command != _lastMusicCommand) {
_sound->haltTrack();
_sound->playTrack(command);
}
}
}
_lastMusicCommand = command;
}