aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorTravis Howell2006-04-20 10:45:51 +0000
committerTravis Howell2006-04-20 10:45:51 +0000
commitc07f314b1f99390c27ee2f1d99e4b77fda8cd89b (patch)
tree85ee2cc3cb786218eee92dbb3fc31ebeba5daea9 /engines/simon
parent948301faaf5ec5d7b1863539531af90b57fa55d7 (diff)
downloadscummvm-rg350-c07f314b1f99390c27ee2f1d99e4b77fda8cd89b.tar.gz
scummvm-rg350-c07f314b1f99390c27ee2f1d99e4b77fda8cd89b.tar.bz2
scummvm-rg350-c07f314b1f99390c27ee2f1d99e4b77fda8cd89b.zip
getPathPosn script opcode needs to use int16 to get correct position, fixes entering teleporter in village in FF
svn-id: r22055
Diffstat (limited to 'engines/simon')
-rw-r--r--engines/simon/items.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp
index 2a612b059b..a76f367ada 100644
--- a/engines/simon/items.cpp
+++ b/engines/simon/items.cpp
@@ -1457,8 +1457,8 @@ void SimonEngine::o_getPathPosn() {
if (!p)
continue;
for (j = 0; readUint16Wrapper(&p[0]) != end; j++, p += 2) {
- x_diff = abs((int)(readUint16Wrapper(&p[0]) - x));
- y_diff = abs((int)(readUint16Wrapper(&p[1]) - 12 - y));
+ x_diff = abs((int16)(readUint16Wrapper(&p[0]) - x));
+ y_diff = abs((int16)(readUint16Wrapper(&p[1]) - 12 - y));
if (x_diff < y_diff) {
x_diff /= 4;