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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jun 17 16:05:06 CEST 2010


Revision: 49931
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49931&view=rev
Author:   thebluegr
Date:     2010-06-17 14:05:05 +0000 (Thu, 17 Jun 2010)

Log Message:
-----------
Fixed kLoad and kUnload (the resource type was incorrect)

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

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-06-17 13:56:03 UTC (rev 49930)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-06-17 14:05:05 UTC (rev 49931)
@@ -36,7 +36,7 @@
 // Loads arbitrary resources of type 'restype' with resource numbers 'resnrs'
 // This implementation ignores all resource numbers except the first one.
 reg_t kLoad(EngineState *s, int argc, reg_t *argv) {
-	int restype = argv[0].toUint16();
+	ResourceType restype = (ResourceType)(argv[0].toUint16() & 0x7f);
 	int resnr = argv[1].toUint16();
 
 	// Request to dynamically allocate hunk memory for later use
@@ -76,7 +76,7 @@
 // Unloads an arbitrary resource of type 'restype' with resource numbber 'resnr'
 reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) {
 	if (argc >= 2) {
-		int restype = argv[0].toUint16();
+		ResourceType restype = (ResourceType)(argv[0].toUint16() & 0x7f);
 		reg_t resnr = argv[1];
 
 		if (restype == kResourceTypeMemory)


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