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

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Sat May 9 03:23:53 CEST 2009


Revision: 40398
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40398&view=rev
Author:   waltervn
Date:     2009-05-09 01:23:52 +0000 (Sat, 09 May 2009)

Log Message:
-----------
SCI: AvoidPath: No longer excludes edges on screen borders for pathfinding, as
only the earlier games seem to do this. We may need to add a SCI version check
here if this change breaks anything in earlier games.

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

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-09 00:32:05 UTC (rev 40397)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-05-09 01:23:52 UTC (rev 40398)
@@ -258,7 +258,7 @@
 
 static Vertex *vertex_cur;	// FIXME
 
-// Temporary hack to deal with points in reg_ts
+// FIXME: Temporary hack to deal with points in reg_ts
 static bool polygon_is_reg_t(const byte *list, int size) {
 	// Check the first three reg_ts
 	for (int i = 0; i < (size < 3 ? size : 3); i++)
@@ -1556,10 +1556,13 @@
 			uint32 new_dist;
 			Vertex *vertex = *it;
 
+			// Early pathfinding-enabled games exclude edges on screen borders.
+// FIXME: Enable this selectively for those games that need it.
+#if 0
 			// Avoid plotting path along screen edge
 			if ((vertex != s->vertex_end) && point_on_screen_border(vertex->v))
 				continue;
-
+#endif
 			new_dist = vertex_min->dist + (uint32)sqrt((float)vertex_min->v.sqrDist(vertex->v));
 			if (new_dist < vertex->dist) {
 				vertex->dist = new_dist;


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