[Scummvm-cvs-logs] SF.net SVN: scummvm:[54466] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Nov 25 03:21:07 CET 2010


Revision: 54466
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54466&view=rev
Author:   thebluegr
Date:     2010-11-25 02:21:07 +0000 (Thu, 25 Nov 2010)

Log Message:
-----------
SCI: Fixed digital audio at the beginning of KQ5CD and removed a hack for the Windows version

Modified Paths:
--------------
    scummvm/trunk/engines/sci/resource_audio.cpp
    scummvm/trunk/engines/sci/sound/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/resource_audio.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource_audio.cpp	2010-11-25 01:31:03 UTC (rev 54465)
+++ scummvm/trunk/engines/sci/resource_audio.cpp	2010-11-25 02:21:07 UTC (rev 54466)
@@ -563,10 +563,7 @@
 
 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 @@
 		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/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-11-25 01:31:03 UTC (rev 54465)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-11-25 02:21:07 UTC (rev 54466)
@@ -349,6 +349,12 @@
 }
 
 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
 }
 


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