[Scummvm-cvs-logs] scummvm master -> 27346f8a08d16d06abba754abdee4517b964c466

Strangerke Strangerke at scummvm.org
Sat May 11 17:52:09 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
27346f8a08 HOPKINS: Courtesy of SylvainTV - Fix long diagonals to bottom left and right


Commit: 27346f8a08d16d06abba754abdee4517b964c466
    https://github.com/scummvm/scummvm/commit/27346f8a08d16d06abba754abdee4517b964c466
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-05-11T08:50:42-07:00

Commit Message:
HOPKINS: Courtesy of SylvainTV - Fix long diagonals to bottom left and right

Changed paths:
    engines/hopkins/lines.cpp



diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index 60b9b48..791db42 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++;






More information about the Scummvm-git-logs mailing list