diff options
author | Filippos Karapetis | 2010-11-25 02:21:07 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-25 02:21:07 +0000 |
commit | 52898b6336e11c19b1c215898481aac60a0ccced (patch) | |
tree | eada968bfd5c8b3ffd1da8e7e4e06b156d4f6c40 /engines | |
parent | ff58eea2ce7a00660dba3f3c6325a0709450c6e0 (diff) | |
download | scummvm-rg350-52898b6336e11c19b1c215898481aac60a0ccced.tar.gz scummvm-rg350-52898b6336e11c19b1c215898481aac60a0ccced.tar.bz2 scummvm-rg350-52898b6336e11c19b1c215898481aac60a0ccced.zip |
SCI: Fixed digital audio at the beginning of KQ5CD and removed a hack for the Windows version
svn-id: r54466
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/resource_audio.cpp | 15 | ||||
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 6 |
2 files changed, 7 insertions, 14 deletions
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp index a61c1f6ce7..f17bc75ef0 100644 --- a/engines/sci/resource_audio.cpp +++ b/engines/sci/resource_audio.cpp @@ -563,10 +563,7 @@ 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) + if (g_sci->getGameId() == GID_KQ5 && g_sci->getPlatform() == Common::kPlatformWindows) resourceNr += 1000; Resource *resource = _resMan->findResource(ResourceId(kResourceTypeSound, resourceNr), true); @@ -741,16 +738,6 @@ 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; } diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 3327fcfcfe..1e918be30d 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -349,6 +349,12 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) { } reg_t SoundCommandParser::kDoSoundGetPolyphony(int argc, reg_t *argv, reg_t acc) { + // KQ5CD uses this to determine if it should play digital audio or not. + // For Adlib cards, digital audio is played, whereas MIDI is played for GM cards. + // Thus, tell it that we're using an Adlib in room 119 (Sierra logo screen), + // so that the digital audio is always preferred. + if (g_sci->getGameId() == GID_KQ5 && g_sci->getEngineState()->currentRoomNumber() == 119) + return make_reg(0, 9); // Adlib, i.e. digital music return make_reg(0, _music->soundGetVoices()); // Get the number of voices } |