[Scummvm-cvs-logs] SF.net SVN: scummvm:[52222] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Aug 20 11:35:20 CEST 2010
Revision: 52222
http://scummvm.svn.sourceforge.net/scummvm/?rev=52222&view=rev
Author: thebluegr
Date: 2010-08-20 09:35:20 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
SCI: Fixed the GM detection introduced in rev #52211 to check the first available track, instead of track 1 (which doesn't always exist, e.g. in Pharkas). Also, added a comment inside applyPatch()
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=52211&view=rev
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/script_patches.cpp
scummvm/trunk/engines/sci/resource_audio.cpp
Modified: scummvm/trunk/engines/sci/engine/script_patches.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script_patches.cpp 2010-08-20 07:59:23 UTC (rev 52221)
+++ scummvm/trunk/engines/sci/engine/script_patches.cpp 2010-08-20 09:35:20 UTC (rev 52222)
@@ -542,6 +542,7 @@
offset += patchWord & ~PATCH_ADDTOOFFSET;
} else if (patchWord & PATCH_GETORIGINALBYTE) {
// TODO: implement this
+ // Can be used to patch in some bytes from the original script into another location
} else {
scriptData[offset] = patchWord & 0xFF;
offset++;
Modified: scummvm/trunk/engines/sci/resource_audio.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource_audio.cpp 2010-08-20 07:59:23 UTC (rev 52221)
+++ scummvm/trunk/engines/sci/resource_audio.cpp 2010-08-20 09:35:20 UTC (rev 52222)
@@ -531,9 +531,15 @@
// For the leftover games, we can safely use SCI_VERSION_1_EARLY for the soundVersion
const SciVersion soundVersion = SCI_VERSION_1_EARLY;
- // Read song 1 and check if it has a GM track
+ // Read the first song and check if it has a GM track
bool result = false;
- SoundResource *song1 = new SoundResource(1, this, soundVersion);
+ Common::List<ResourceId> *resources = listResources(kResourceTypeSound, -1);
+ Common::sort(resources->begin(), resources->end());
+ Common::List<ResourceId>::iterator itr = resources->begin();
+ int firstSongId = itr->getNumber();
+ delete resources;
+
+ SoundResource *song1 = new SoundResource(firstSongId, this, soundVersion);
if (!song1) {
warning("ResourceManager::isGMTrackIncluded: track 1 not found");
return false;
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