From: <ave...@us...> - 2003-12-19 22:03:44
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv16887 Modified Files: PathFinder.h PathFinder.cpp Log Message: Fix: signed/unsigned problem in Pathfinder Index: PathFinder.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/PathFinder.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PathFinder.h 4 Dec 2003 21:51:04 -0000 1.4 --- PathFinder.h 19 Dec 2003 22:03:41 -0000 1.5 *************** *** 39,43 **** private: void Leveldown(unsigned int px, unsigned int py, unsigned int &level, unsigned int &nx, unsigned int &ny, unsigned int &diff); ! void SetupNode(unsigned int x,unsigned int y, int Cost); //maybe this is unneeded and orientation could be calculated on the fly unsigned char GetOrient(short sX, short sY, short dX, short dY); --- 39,43 ---- private: void Leveldown(unsigned int px, unsigned int py, unsigned int &level, unsigned int &nx, unsigned int &ny, unsigned int &diff); ! void SetupNode(unsigned int x,unsigned int y, unsigned int Cost); //maybe this is unneeded and orientation could be calculated on the fly unsigned char GetOrient(short sX, short sY, short dX, short dY); Index: PathFinder.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/PathFinder.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PathFinder.cpp 18 Dec 2003 15:05:21 -0000 1.13 --- PathFinder.cpp 19 Dec 2003 22:03:41 -0000 1.14 *************** *** 51,55 **** static int Passable[16]={0,1,1,1,1,1,1,1,0,1,0,0,0,0,1,1}; ! void PathFinder::SetupNode(unsigned int x,unsigned int y, int Cost) { unsigned int pos; --- 51,55 ---- static int Passable[16]={0,1,1,1,1,1,1,1,0,1,0,0,0,0,1,1}; ! void PathFinder::SetupNode(unsigned int x,unsigned int y, unsigned int Cost) { unsigned int pos; *************** *** 91,95 **** break; } ! int Cost = MapSet[y*Width+x]+NormalCost; if(Cost>65500) { //printf("Path not found!\n"); --- 91,95 ---- break; } ! unsigned int Cost = MapSet[y*Width+x]+NormalCost; if(Cost>65500) { //printf("Path not found!\n"); |