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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun Jun 13 23:43:13 CEST 2010


Revision: 49638
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49638&view=rev
Author:   thebluegr
Date:     2010-06-13 21:43:13 +0000 (Sun, 13 Jun 2010)

Log Message:
-----------
Fixed regression from commit #49251, and added an explanation. Calls to kNewNode with 1 parameter are handled properly again. Fixes the demo of Phantasmagoria 1. Thanks to lskovlun and waltervn for spotting this

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

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2010-06-13 21:09:52 UTC (rev 49637)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2010-06-13 21:43:13 UTC (rev 49638)
@@ -157,7 +157,9 @@
 
 reg_t kNewNode(EngineState *s, int argc, reg_t *argv) {
 	reg_t nodeValue = argv[0];
-	reg_t nodeKey = (argc == 2) ? argv[1] : NULL_REG;
+	// Some SCI32 games call this with 1 parameter (e.g. the demo of Phantasmagoria).
+	// Set the key to be the same as the value in this case
+	reg_t nodeKey = (argc == 2) ? argv[1] : argv[0];
 	s->r_acc = s->_segMan->newNode(nodeValue, nodeKey);
 
 	debugC(2, kDebugLevelNodes, "New nodebase at %04x:%04x", PRINT_REG(s->r_acc));


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