diff options
author | Johannes Schickel | 2008-01-12 08:04:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-01-12 08:04:00 +0000 |
commit | 4f8cf19292ed5d76b0e67a77331ae7d5a2112955 (patch) | |
tree | 680ad24c37bed2f8082a3acb81c94eab48fdbfb2 | |
parent | afd8743465ced91b0dae6544b169bdcab848745b (diff) | |
download | scummvm-rg350-4f8cf19292ed5d76b0e67a77331ae7d5a2112955.tar.gz scummvm-rg350-4f8cf19292ed5d76b0e67a77331ae7d5a2112955.tar.bz2 scummvm-rg350-4f8cf19292ed5d76b0e67a77331ae7d5a2112955.zip |
Commit patch #1869749 "KYRA: HoF Towns Audio fix".
svn-id: r30438
-rw-r--r-- | engines/kyra/sound.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 5571e4631a..4a62671df3 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -469,20 +469,32 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) { // XXX //} - assert(command*2+1 < _trackMapSize); - if (_curMusicTheme != _trackMap[command*2]) { - if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2) - snd_playTheme(_trackMap[command*2]); - } + if (_flags.platform == Common::kPlatformPC) { + assert(command*2+1 < _trackMapSize); + if (_curMusicTheme != _trackMap[command*2]) { + if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2) + snd_playTheme(_trackMap[command*2]); + } - if (command != 1) { - if (_lastMusicCommand != command) { + if (command != 1) { + if (_lastMusicCommand != command) { + _sound->haltTrack(); + _sound->playTrack(_trackMap[command*2+1]); + } + } else { + _sound->beginFadeOut(); + } + } else if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + if (command == -1) { _sound->haltTrack(); - _sound->playTrack(_trackMap[command*2+1]); + } else { + assert(command*2+1 < _trackMapSize); + if (_trackMap[command*2] != -2 && command != _lastMusicCommand) { + _sound->haltTrack(); + _sound->playTrack(command); + } } - } else { - _sound->beginFadeOut(); - } + } _lastMusicCommand = command; } |