diff options
author | Strangerke | 2014-05-25 23:29:03 +0200 |
---|---|---|
committer | Strangerke | 2014-05-25 23:29:03 +0200 |
commit | f01a402694dcd6934b4dee3b936f1b9dd1d2978b (patch) | |
tree | 8d754d8183505ad72a3dc2e2146c5962e4905740 /engines/touche | |
parent | 2eee236c8dc4f4209d4bf21aa8cab3355f25b5da (diff) | |
download | scummvm-rg350-f01a402694dcd6934b4dee3b936f1b9dd1d2978b.tar.gz scummvm-rg350-f01a402694dcd6934b4dee3b936f1b9dd1d2978b.tar.bz2 scummvm-rg350-f01a402694dcd6934b4dee3b936f1b9dd1d2978b.zip |
TOUCHE: Reduce the scope of a variable
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/touche.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index 7b70b4a9ee..ff4f41f44d 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -3114,12 +3114,12 @@ void ToucheEngine::buildWalkPath(int dstPosX, int dstPosY, int keyChar) { for (uint i = 0; i < _programWalkTable.size(); ++i) { const ProgramWalkData *pwd = &_programWalkTable[i]; if ((pwd->point1 & 0x4000) == 0) { - int distance = 32000; ProgramPointData *pts1 = &_programPointsTable[pwd->point1]; ProgramPointData *pts2 = &_programPointsTable[pwd->point2]; if (pts1->order != 0) { int dx = pts2->x - pts1->x; int dy = pts2->y - pts1->y; + int distance = 32000; if (dx == 0) { if (dstPosY > MIN(pts2->y, pts1->y) && dstPosY < MAX(pts2->y, pts1->y)) { int d = ABS(dstPosX - pts1->x); |