aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-05-11 17:50:42 +0200
committerStrangerke2013-05-11 17:50:42 +0200
commit27346f8a08d16d06abba754abdee4517b964c466 (patch)
tree64d772fe82346538544c890a65fd226272137a29 /engines/hopkins
parentbdd131450f415c4871452078f876baa5f8baeea5 (diff)
downloadscummvm-rg350-27346f8a08d16d06abba754abdee4517b964c466.tar.gz
scummvm-rg350-27346f8a08d16d06abba754abdee4517b964c466.tar.bz2
scummvm-rg350-27346f8a08d16d06abba754abdee4517b964c466.zip
HOPKINS: Courtesy of SylvainTV - Fix long diagonals to bottom left and right
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/lines.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 60b9b48880..791db4267a 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -2220,10 +2220,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) {
realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize);
realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize);
}
+ int oldY = curY;
for (int i = 0; i < realSpeedX; i++) {
--curX;
_smoothRoute[smoothIdx]._posX = curX;
- if (curY != curY + realSpeedY)
+ if (curY != oldY + realSpeedY)
curY++;
_smoothRoute[smoothIdx]._posY = curY;
smoothIdx++;
@@ -2254,10 +2255,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) {
realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize);
realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize);
}
+ int oldY = curY;
for (int i = 0; i < realSpeedX; i++) {
++curX;
_smoothRoute[smoothIdx]._posX = curX;
- if (curY != curY + realSpeedY)
+ if (curY != oldY + realSpeedY)
curY++;
_smoothRoute[smoothIdx]._posY = curY;
smoothIdx++;