aboutsummaryrefslogtreecommitdiff
path: root/sky/autoroute.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2004-12-16 05:27:10 +0000
committerRobert Göffringmann2004-12-16 05:27:10 +0000
commite7f44ab3db1e47f01c719cb01b7fe76301d45b0e (patch)
tree8e295115dd73504753bc4d38750ae50ecac39156 /sky/autoroute.cpp
parent8c5a1aa034edf6005aaf4e65a71c9fd5e2036dd3 (diff)
downloadscummvm-rg350-e7f44ab3db1e47f01c719cb01b7fe76301d45b0e.tar.gz
scummvm-rg350-e7f44ab3db1e47f01c719cb01b7fe76301d45b0e.tar.bz2
scummvm-rg350-e7f44ab3db1e47f01c719cb01b7fe76301d45b0e.zip
fix for bug #897777 (Foster walks on water...) and #788858 (Walk glitch)
svn-id: r16072
Diffstat (limited to 'sky/autoroute.cpp')
-rw-r--r--sky/autoroute.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp
index 45c0336632..664197b113 100644
--- a/sky/autoroute.cpp
+++ b/sky/autoroute.cpp
@@ -69,7 +69,7 @@ void AutoRoute::clipCoordX(uint16 x, uint8 &blkX, int16 &initX) {
initX = x - TOP_LEFT_X;
} else if (x >= TOP_LEFT_X + GAME_SCREEN_WIDTH) {
blkX = (GAME_SCREEN_WIDTH - 1) >> 3;
- initX = x - (TOP_LEFT_X + GAME_SCREEN_WIDTH);
+ initX = x - (TOP_LEFT_X + GAME_SCREEN_WIDTH - 1);
} else {
blkX = (x - TOP_LEFT_X) >> 3;
initX = 0;
@@ -82,7 +82,7 @@ void AutoRoute::clipCoordY(uint16 y, uint8 &blkY, int16 &initY) {
initY = y - TOP_LEFT_Y;
} else if (y >= TOP_LEFT_Y + GAME_SCREEN_HEIGHT) {
blkY = (GAME_SCREEN_HEIGHT - 1) >> 3;
- initY = y - (TOP_LEFT_Y + GAME_SCREEN_WIDTH);
+ initY = y - (TOP_LEFT_Y + GAME_SCREEN_HEIGHT);
} else {
blkY = (y - TOP_LEFT_Y) >> 3;
initY = 0;