[Scummvm-cvs-logs] SF.net SVN: scummvm:[46030] scummvm/trunk/engines/sci/engine/state.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Nov 21 00:37:56 CET 2009


Revision: 46030
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46030&view=rev
Author:   thebluegr
Date:     2009-11-20 23:37:56 +0000 (Fri, 20 Nov 2009)

Log Message:
-----------
Fixed sound detection for Jones CD

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/state.cpp

Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp	2009-11-20 22:41:17 UTC (rev 46029)
+++ scummvm/trunk/engines/sci/engine/state.cpp	2009-11-20 23:37:56 UTC (rev 46030)
@@ -516,6 +516,21 @@
 			}
 		}
 
+		// Jones CD and perhaps others were in the middle of the transition from SCI1 old to SCI1 new
+		// sound code, and had some temporary selector methods in the Sound object. Check for these here,
+		// and set the doSound type to SCI1 new if they're found
+		if (getSciVersion() == SCI_VERSION_1_MIDDLE) {
+			reg_t tmp;
+			Selector slc = _kernel->findSelector("cue");
+			if (slc != -1) {
+				if (lookup_selector(_segMan, _segMan->findObjectByName("Sound"), slc, NULL, &tmp) == kSelectorMethod) {
+					// The Sound object has a temporary cue selector, therefore the game is using late
+					// SCI1 sound functions
+					_doSoundType = SCI_VERSION_1_LATE;
+				}
+			}
+		}
+
 		debugC(1, kDebugLevelSound, "Detected DoSound type: %s", getSciVersionDesc(_doSoundType).c_str());
 	}
 


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