[Scummvm-cvs-logs] SF.net SVN: scummvm:[54464] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Nov 25 02:19:45 CET 2010
Revision: 54464
http://scummvm.svn.sourceforge.net/scummvm/?rev=54464&view=rev
Author: thebluegr
Date: 2010-11-25 01:19:45 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/trunk/engines/sci/detection_tables.h
scummvm/trunk/engines/sci/resource_audio.cpp
scummvm/trunk/engines/sci/sound/drivers/midi.cpp
Modified: scummvm/trunk/engines/sci/detection_tables.h
===================================================================
--- scummvm/trunk/engines/sci/detection_tables.h 2010-11-24 21:32:34 UTC (rev 54463)
+++ scummvm/trunk/engines/sci/detection_tables.h 2010-11-25 01:19:45 UTC (rev 54464)
@@ -1128,6 +1128,18 @@
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ // King's Quest 5 - English DOS CD (from the King's Quest Collection)
+ // Executable scanning reports "x.yyy.zzz", VERSION file reports "1.000.052"
+ // SCI interpreter version 1.000.784
+ // Same entry as the DOS version above. This one is used for the alternate
+ // MIDI music tracks in the Windows version
+ {"kq5", "CD", {
+ {"resource.map", 0, "f68ba690e5920725dcf9328001b90e33", 13122},
+ {"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368},
+ {"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NONE },
+
// King's Quest 5 - English DOS Floppy
// SCI interpreter version 1.000.060
{"kq5", "", {
Modified: scummvm/trunk/engines/sci/resource_audio.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource_audio.cpp 2010-11-24 21:32:34 UTC (rev 54463)
+++ scummvm/trunk/engines/sci/resource_audio.cpp 2010-11-25 01:19:45 UTC (rev 54464)
@@ -562,6 +562,13 @@
}
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 @@
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;
}
Modified: scummvm/trunk/engines/sci/sound/drivers/midi.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/drivers/midi.cpp 2010-11-24 21:32:34 UTC (rev 54463)
+++ scummvm/trunk/engines/sci/sound/drivers/midi.cpp 2010-11-25 01:19:45 UTC (rev 54464)
@@ -840,6 +840,10 @@
_percussionVelocityScale[i] = 127;
}
+ // Don't do any mapping for the Windows version of KQ5CD
+ if (g_sci && g_sci->getGameId() == GID_KQ5 && g_sci->getPlatform() == Common::kPlatformWindows)
+ return 0;
+
Resource *res = NULL;
if (_isMt32) {
@@ -963,10 +967,15 @@
case SCI_VERSION_0_LATE:
return 0x01;
default:
- if (_isMt32)
+ if (_isMt32) {
return 0x0c;
- else
+ } else {
+ // Use the GM play mask for the Windows version of KQ5CD.
+ if (g_sci && g_sci->getGameId() == GID_KQ5 && g_sci->getPlatform() == Common::kPlatformWindows)
+ return 0x07;
+
return _useMT32Track ? 0x0c : 0x07;
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list