aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-02-16 00:04:55 +1100
committerPaul Gilbert2011-02-16 00:04:55 +1100
commit2f3d3d3d9cf2a5e87f056a3539560dd0807d017b (patch)
treea6182306a189f5fe4ca63c21f971b7e97c92c68e
parentf9423570adc45f512586171abe3bdc3c7286273c (diff)
downloadscummvm-rg350-2f3d3d3d9cf2a5e87f056a3539560dd0807d017b.tar.gz
scummvm-rg350-2f3d3d3d9cf2a5e87f056a3539560dd0807d017b.tar.bz2
scummvm-rg350-2f3d3d3d9cf2a5e87f056a3539560dd0807d017b.zip
TSAGE: Another pathfinding bugfix
-rw-r--r--engines/tsage/core.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 30cd0c76b1..8906da3194 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -532,12 +532,12 @@ void PlayerMover::setDest(const Common::Point &destPos) {
setup(_routeList[0]);
}
-#define BREAK_LIST_SIZE 20
+#define REGION_LIST_SIZE 20
void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Common::Point destPos, RouteEnds routeEnds) {
List<int> regionIndexes;
RouteEnds tempRouteEnds;
- int routeRegions[BREAK_LIST_SIZE];
+ int routeRegions[REGION_LIST_SIZE];
Common::Point objPos;
// Get the region the source is in
@@ -604,7 +604,7 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo
_globals->_walkRegions._field18[1]._pt1 = destPos;
_globals->_walkRegions._field18[1]._pt2 = destPos;
- int tempList[20];
+ int tempList[REGION_LIST_SIZE];
tempList[0] = 0;
int endIndex = 0;
int idx = 1;
@@ -614,7 +614,7 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo
int breakEntry2 = routeRegions[idx + 1];
int listIndex = 0;
- while (_globals->_walkRegions._idxList[_globals->_walkRegions[breakEntry]._idxListIndex + listIndex] ==
+ while (_globals->_walkRegions._idxList[_globals->_walkRegions[breakEntry]._idxListIndex + listIndex] !=
breakEntry2)
++listIndex;
@@ -842,12 +842,12 @@ void PlayerMover::checkMovement2(const Common::Point &srcPos, const Common::Poin
}
int PlayerMover::proc1(int *routeList, int srcRegion, int destRegion, int &v) {
- int tempList[BREAK_LIST_SIZE];
+ int tempList[REGION_LIST_SIZE];
v = 0;
for (int idx = 0; idx <= *routeList; ++idx)
tempList[idx] = routeList[idx];
- if (*routeList == BREAK_LIST_SIZE)
+ if (*routeList == REGION_LIST_SIZE)
// Sequence too long
return 32000;