[Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.6,1.7 grid.cpp,1.3,1.4

Robert G?ffringmann lavosspawn at users.sourceforge.net
Tue Apr 29 06:07:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv27870/sky

Modified Files:
	autoroute.cpp grid.cpp 
Log Message:
fixed pathfinding problems (hopefully) :)

Index: autoroute.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- autoroute.cpp	28 Apr 2003 01:05:55 -0000	1.6
+++ autoroute.cpp	29 Apr 2003 13:06:01 -0000	1.7
@@ -63,8 +63,10 @@
 	if (!cpt->extCompact)
 		error("SkyAutoRoute::autoRoute: fatal error. cpt->extCompact == NULL!\n");
 	uint16* routeData = (uint16*)cpt->extCompact->animScratch;
-	uint8* screenGrid = _grid->giveGrid(cpt->screen) - 4;
-	// ^^ this is actually a pointer to the last dword of the grid
+	uint8* screenGrid = _grid->giveGrid(cpt->screen);
+	screenGrid += GRID_SIZE-4; // all arrays are processed from behind, so make
+	// screenGrid point to the last element of our grid.
+
 	uint16 *routeCalc = _routeGrid + (ROUTE_GRID_SIZE >> 1) - 1;	
 	
 	uint8 stretch1, stretch2; // bl / bh

Index: grid.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/grid.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- grid.cpp	27 Apr 2003 15:02:51 -0000	1.3
+++ grid.cpp	29 Apr 2003 13:06:01 -0000	1.4
@@ -26,6 +26,7 @@
 
 int8 SkyGrid::_gridConvertTable[] = {
 
+	0,	//0
 	1,	//1
 	2,	//2
 	3,	//3





More information about the Scummvm-git-logs mailing list