diff options
author | Filippos Karapetis | 2017-11-03 09:19:21 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-11-11 17:14:36 +0200 |
commit | 51cd9b488856dea791079ca6681c16c64d9d14d8 (patch) | |
tree | ae050aeaad810e12556f28c448e6c3fceb8cb565 | |
parent | 1c2a9d2e122304b1f6b8ca78b96e34b2a2ed53c8 (diff) | |
download | scummvm-rg350-51cd9b488856dea791079ca6681c16c64d9d14d8.tar.gz scummvm-rg350-51cd9b488856dea791079ca6681c16c64d9d14d8.tar.bz2 scummvm-rg350-51cd9b488856dea791079ca6681c16c64d9d14d8.zip |
DRASCULA: Remove superfluous variable
-rw-r--r-- | engines/drascula/objects.cpp | 14 | ||||
-rw-r--r-- | engines/drascula/saveload.cpp | 3 |
2 files changed, 6 insertions, 11 deletions
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index 4087eee11b..33d3674a45 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -97,7 +97,9 @@ void DrasculaEngine::gotoObject(int pointX, int pointY) { } void DrasculaEngine::checkObjects() { - int l, veo = 0; + int l; + + _hasName = false; for (l = 0; l < numRoomObjs; l++) { if (_mouseX > _objectX1[l] && _mouseY > _objectY1[l] @@ -105,21 +107,16 @@ void DrasculaEngine::checkObjects() { && visible[l] == 1 && isDoor[l] == 0) { strcpy(textName, objName[l]); _hasName = true; - veo = 1; } } if (_mouseX > curX + 2 && _mouseY > curY + 2 && _mouseX < curX + curWidth - 2 && _mouseY < curY + curHeight - 2) { - if (currentChapter == 2 || veo == 0) { + if (currentChapter == 2 || !_hasName) { strcpy(textName, "hacker"); _hasName = true; - veo = 1; } } - - if (veo == 0) - _hasName = false; } /** @@ -265,9 +262,8 @@ void DrasculaEngine::updateVisible() { } if (_roomNumber == 22 && flags[27] == 1) visible[3] = 0; - if (_roomNumber == 26 && flags[21] == 0) { + if (_roomNumber == 26 && flags[21] == 0) Common::strlcpy(objName[2], _textmisc[0], 20); - } if (_roomNumber == 26 && flags[18] == 1) visible[2] = 0; if (_roomNumber == 26 && flags[12] == 1) diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 01c7ab7ee7..d54c3370e2 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -317,9 +317,8 @@ bool DrasculaEngine::loadGame(int slot) { takeObject = in->readSint32LE(); pickedObject = in->readSint32LE(); _loadedDifferentChapter = false; - if (!sscanf(currentData, "%d.ald", &roomNum)) { + if (!sscanf(currentData, "%d.ald", &roomNum)) error("Bad save format"); - } // When loading room 102 while being attached below the pendulum Some variables // are not correctly set and can cause random crashes when calling enterRoom below. |