diff options
author | Jaromir Wysoglad | 2019-07-22 10:47:06 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | fc3ae4c9b955f6b7e702993f38c25f61d49b593c (patch) | |
tree | e510c636593f3f932e1ad6316ad9682180fcb68e /engines/supernova/supernova2/state.cpp | |
parent | c2177f84539472defe31c6fba80ad4a6f3357266 (diff) | |
download | scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.tar.gz scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.tar.bz2 scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.zip |
SUPERNOVA: Fix most of Codacy issues
* Fix mismatched delete in create_image.cpp
* Add shebangs to create_ms2_data.***.sh
* Reduce scopes of some variables
* Substitute bitwise and for logical and in
GamaManager2::passageConstruction
Diffstat (limited to 'engines/supernova/supernova2/state.cpp')
-rw-r--r-- | engines/supernova/supernova2/state.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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); |