diff options
Diffstat (limited to 'engines/supernova')
-rw-r--r-- | engines/supernova/supernova.cpp | 3 | ||||
-rw-r--r-- | engines/supernova/supernova1/state.cpp | 2 | ||||
-rw-r--r-- | engines/supernova/supernova2/state.cpp | 14 |
3 files changed, 9 insertions, 10 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index 431438eb6d..8a7210720d 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -468,10 +468,9 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String return nullptr; } - int part; uint32 gameBlockSize; while (!f.eos()) { - part = f.readByte(); + int part = f.readByte(); gameBlockSize = f.readUint32LE(); if (f.eos()){ GUIErrorMessageFormat(_("Unable to find block for part %d"), _MSPart); diff --git a/engines/supernova/supernova1/state.cpp b/engines/supernova/supernova1/state.cpp index ee1fe46aa0..8130b2bb5a 100644 --- a/engines/supernova/supernova1/state.cpp +++ b/engines/supernova/supernova1/state.cpp @@ -1040,8 +1040,8 @@ void GameManager1::shock() { void GameManager1::drawMapExits() { _vm->renderBox(281, 161, 39, 39, kColorWhite25); - int idx; for (int i = 0; i < 25; i++) { + int idx; if ((idx = _exitList[i]) != -1) { byte r = _currentRoom->getObject(idx)->_direction; int x = 284 + 7 * (r % 5); diff --git a/engines/supernova/supernova2/state.cpp b/engines/supernova/supernova2/state.cpp index 26f83ffb4d..8c94f1e518 100644 --- a/engines/supernova/supernova2/state.cpp +++ b/engines/supernova/supernova2/state.cpp @@ -431,8 +431,8 @@ void GameManager2::drawMapExits() { (_currentRoom->getId() >= FLOORDOOR && _currentRoom->getId() <= BST_DOOR)) compass(); else { - int idx; for (int i = 0; i < 25; i++) { + int idx; if ((idx = _exitList[i]) != -1) { byte r = _currentRoom->getObject(idx)->_direction; int x = 284 + 7 * (r % 5); @@ -1068,16 +1068,16 @@ void GameManager2::passageConstruction() { } } _rooms[PYR_ENTRANCE]->setSectionVisible(9, - _rooms[PYR_ENTRANCE]->isSectionVisible(7) & + _rooms[PYR_ENTRANCE]->isSectionVisible(7) && !_rooms[PYR_ENTRANCE]->isSectionVisible(1)); _rooms[PYR_ENTRANCE]->setSectionVisible(10, - _rooms[PYR_ENTRANCE]->isSectionVisible(7) & + _rooms[PYR_ENTRANCE]->isSectionVisible(7) && !_rooms[PYR_ENTRANCE]->isSectionVisible(2)); _rooms[PYR_ENTRANCE]->setSectionVisible(11, - _rooms[PYR_ENTRANCE]->isSectionVisible(8) & + _rooms[PYR_ENTRANCE]->isSectionVisible(8) && !_rooms[PYR_ENTRANCE]->isSectionVisible(3)); _rooms[PYR_ENTRANCE]->setSectionVisible(12, - _rooms[PYR_ENTRANCE]->isSectionVisible(8) & + _rooms[PYR_ENTRANCE]->isSectionVisible(8) && !_rooms[PYR_ENTRANCE]->isSectionVisible(4)); } @@ -1141,8 +1141,8 @@ byte GameManager2::wall(int s, int z, int direction, int stepsForward, int steps {0,0,0,0,0,0,0,0,0,0,0,0} } }; - int newR; if (stepsRight) { + int newR; if (stepsRight > 0) newR = (direction + 1) & 3; else { @@ -1337,9 +1337,9 @@ void GameManager2::crack(int time) { _cracking = true; _vm->_screen->changeCursor(ResourceManager::kCursorWait); int t = 0; - int z; int zv = 0; do { + int z; do { wait(1); } while ((z = (g_system->getMillis() - _state._startTime) / 600) == zv); |