diff options
author | Filippos Karapetis | 2010-11-25 01:19:45 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-25 01:19:45 +0000 |
commit | 75082609544bc64e3cb8d72e424f1fd81ff4126f (patch) | |
tree | 4d2baaed802ec9df15664488da0488ea76a4ea47 /engines/sci/resource_audio.cpp | |
parent | 169c6be32b99e898a3a52ba394ea6c025642e561 (diff) | |
download | scummvm-rg350-75082609544bc64e3cb8d72e424f1fd81ff4126f.tar.gz scummvm-rg350-75082609544bc64e3cb8d72e424f1fd81ff4126f.tar.bz2 scummvm-rg350-75082609544bc64e3cb8d72e424f1fd81ff4126f.zip |
SCI: Added support for the alternative GM tracks of the Windows version of KQ5CD (bug #3041239)
Note that the empty GM track for the Sierra logo makes the game hang, so the
MT-32 track is used, which sounds awful
svn-id: r54464
Diffstat (limited to 'engines/sci/resource_audio.cpp')
-rw-r--r-- | engines/sci/resource_audio.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp index 9949373852..a61c1f6ce7 100644 --- a/engines/sci/resource_audio.cpp +++ b/engines/sci/resource_audio.cpp @@ -562,6 +562,13 @@ bool ResourceManager::isGMTrackIncluded() { } SoundResource::SoundResource(uint32 resourceNr, ResourceManager *resMan, SciVersion soundVersion) : _resMan(resMan), _soundVersion(soundVersion) { + // Modify the resourceId for the Windows version of KQ5, like SSCI did. + // FIXME: For some reason, song 1500 (the Sierra theme) doesn't work + // correctly, and the game hangs. A relevant hack because of this exists + // in getTrackByType() + if (g_sci->getGameId() == GID_KQ5 && g_sci->getPlatform() == Common::kPlatformWindows && resourceNr != 500) + resourceNr += 1000; + Resource *resource = _resMan->findResource(ResourceId(kResourceTypeSound, resourceNr), true); int trackNr, channelNr; if (!resource) @@ -734,6 +741,16 @@ SoundResource::Track *SoundResource::getTrackByType(byte type) { if (_tracks[trackNr].type == type) return &_tracks[trackNr]; } + + // HACK for the Sierra theme (song 500) in KQ5CD Windows. Because the + // associated GM track (1500) hangs, we fall back to the MT-32 track + // for that one inside SoundResource(). Thus, use the appropriate + // MT-32 play mask for that song, too. + if (g_sci->getGameId() == GID_KQ5 && g_sci->getPlatform() == Common::kPlatformWindows && _innerResource->getNumber() == 500) { + warning("KQ5CD Windows: falling back to the MT-32 track for the Sierra logo screen"); // because this will sound awful without mapping... + return getTrackByType(0x0c); + } + return NULL; } |