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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Jun 22 20:33:19 CEST 2010


Revision: 50160
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50160&view=rev
Author:   thebluegr
Date:     2010-06-22 18:33:19 +0000 (Tue, 22 Jun 2010)

Log Message:
-----------
Fixed kMergePoly after discussing with waltervn so that it correctly returns a pointer to an empty (for now) polygon array. This means that you can walk over enemy bodies after killing them in QFG1VGA, but at least it fixes the crashes after killing monsters

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

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2010-06-22 18:33:17 UTC (rev 50159)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2010-06-22 18:33:19 UTC (rev 50160)
@@ -1739,14 +1739,9 @@
  * is in QFG1VGA, after killing any monster.
  */
 reg_t kMergePoly(EngineState *s, int argc, reg_t *argv) {
+#if 0
 	// 3 parameters: raw polygon data, polygon list, list size
 	reg_t polygonData = argv[0];
-
-	// TODO: actually merge the polygon
-	// In QFG1VGA, there are no immediately visible side-effects
-	// of this being a stub.
-
-#if 0
 	List *list = s->_segMan->lookupList(argv[1]);
 	Node *node = s->_segMan->lookupNode(list->first);
 	// List size is not needed
@@ -1765,9 +1760,14 @@
 	}
 #endif
 
+	// TODO: actually merge the polygon. We return an empty polygon for now.
+	// In QFG1VGA, you can walk over enemy bodies after killing them, since
+	// this is a stub.
+	reg_t output = allocateOutputArray(s->_segMan, 1);
+	SegmentRef arrayRef = s->_segMan->dereference(output);
+	writePoint(arrayRef, 0, Common::Point(POLY_LAST_POINT, POLY_LAST_POINT));
 	warning("Stub: kMergePoly");
-
-	return polygonData;
+	return output;
 }
 
 } // End of namespace Sci


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