diff options
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/animation.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 16 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 3 | ||||
-rw-r--r-- | engines/drascula/objects.cpp | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 2e70b0f6ad..b48060a104 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1230,7 +1230,7 @@ void DrasculaEngine::animation_1_5() { talk(438); roomX = 120; roomY = 157; - walkToObject = 1; + _walkToObject = true; trackFinal = 1; startWalking(); talk_bj(21); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b6d508400e..e442681099 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -102,7 +102,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam lowerLimit = 0; upperLimit = 0; trackFinal = 0; - walkToObject = 0; + _walkToObject = false; objExit = 0; _startTime = 0; hasAnswer = 0; @@ -295,7 +295,7 @@ Common::Error DrasculaEngine::run() { _characterVisible = true; checkFlags = 1; doBreak = 0; - walkToObject = 0; + _walkToObject = false; stepX = STEP_X; stepY = STEP_Y; @@ -538,9 +538,9 @@ bool DrasculaEngine::runCurrentChapter() { stepX = STEP_X; stepY = STEP_Y; } - if (!_characterMoved && walkToObject == 1) { + if (!_characterMoved && _walkToObject) { trackProtagonist = trackFinal; - walkToObject = 0; + _walkToObject = false; } if (currentChapter == 2) { @@ -554,10 +554,10 @@ bool DrasculaEngine::runCurrentChapter() { gotoObject(178, 121); gotoObject(169, 135); } else if (_roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) { - walkToObject = 1; + _walkToObject = true; gotoObject(190, 130); } else if (_roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) { - walkToObject = 1; + _walkToObject = true; gotoObject(190, 130); } } @@ -765,7 +765,7 @@ bool DrasculaEngine::verify1() { roomY = roomObjY[l]; trackFinal = trackObj[l]; doBreak = 1; - walkToObject = 1; + _walkToObject = true; startWalking(); } } @@ -796,7 +796,7 @@ bool DrasculaEngine::verify2() { if (_mouseX > _objectX1[l] && _mouseY > _objectY1[l] && _mouseX < _objectX2[l] && _mouseY < _objectY2[l] && visible[l] == 1) { trackFinal = trackObj[l]; - walkToObject = 1; + _walkToObject = true; gotoObject(roomObjX[l], roomObjY[l]); if (checkAction(objectNum[l])) return true; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 9129e52126..be27ae6e32 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -443,7 +443,8 @@ public: int curHeight, curWidth, feetHeight; int floorX1, floorY1, floorX2, floorY2; int lowerLimit, upperLimit; - int trackFinal, walkToObject; + int trackFinal; + bool _walkToObject; int objExit; int _startTime; int hasAnswer; diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index 33d3674a45..300d477347 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -84,8 +84,8 @@ void DrasculaEngine::gotoObject(int pointX, int pointY) { pause(3); } - if (walkToObject == 1) { - walkToObject = 0; + if (_walkToObject) { + _walkToObject = false; trackProtagonist = trackFinal; } updateRoom(); |