diff options
author | Strangerke | 2013-09-07 21:46:01 +0200 |
---|---|---|
committer | Strangerke | 2013-09-07 21:46:01 +0200 |
commit | c158abc3139de4e746e5a1ea09c7cdca0baa93fe (patch) | |
tree | 15c259dce5925fe9d17ea6736eee8ebdcd1d1831 | |
parent | f1e699199b194dcb15f991c6a2a6805f153a985a (diff) | |
download | scummvm-rg350-c158abc3139de4e746e5a1ea09c7cdca0baa93fe.tar.gz scummvm-rg350-c158abc3139de4e746e5a1ea09c7cdca0baa93fe.tar.bz2 scummvm-rg350-c158abc3139de4e746e5a1ea09c7cdca0baa93fe.zip |
AVALANCHE: Add some missing brackets in Lucerna
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index b51632e4c0..653d3ca477 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -117,18 +117,21 @@ Lucerna::Lucerna(AvalancheEngine *vm) : _fxHidden(false), _clock(vm) { } Lucerna::~Lucerna() { - for (byte i = 0; i < 31; i++) - for (byte j = 0; j < 2; j++) + for (byte i = 0; i < 31; i++) { + for (byte j = 0; j < 2; j++) { if (_vm->_gyro->_also[i][j] != 0) { delete _vm->_gyro->_also[i][j]; _vm->_gyro->_also[i][j] = 0; } + } + } } void Lucerna::init() { - for (byte i = 0; i < 31; i++) + for (byte i = 0; i < 31; i++) { for (byte j = 0; j < 2; j++) _vm->_gyro->_also[i][j] = 0; + } #if 0 if (_vm->_enhanced->atbios) @@ -188,22 +191,25 @@ void Lucerna::scram(Common::String &str) { } void Lucerna::unScramble() { - for (byte i = 0; i < 31; i++) - for (byte j = 0; j < 2; j++) + for (byte i = 0; i < 31; i++) { + for (byte j = 0; j < 2; j++) { if (_vm->_gyro->_also[i][j] != 0) scram(*_vm->_gyro->_also[i][j]); + } + } scram(_vm->_gyro->_listen); scram(_vm->_gyro->_flags); } void Lucerna::loadAlso(byte num) { - for (byte i = 0; i < 31; i++) - for (byte j = 0; j < 2; j++) + for (byte i = 0; i < 31; i++) { + for (byte j = 0; j < 2; j++) { if (_vm->_gyro->_also[i][j] != 0) { delete _vm->_gyro->_also[i][j]; _vm->_gyro->_also[i][j] = 0; } - + } + } Common::String filename; filename = filename.format("also%d.avd", num); if (!file.open(filename)) { @@ -936,9 +942,10 @@ void Lucerna::drawScore() { CursorMan.showMouse(false); - for (byte fv = 0; fv < 3; fv++) + for (byte fv = 0; fv < 3; fv++) { if (_vm->_gyro->_scoreToDisplay[fv] != numbers[fv]) _vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->_digits[numbers[fv]], 250 + (fv + 1) * 15, 177); + } CursorMan.showMouse(true); @@ -1005,11 +1012,13 @@ void Lucerna::refreshObjectList() { _vm->_gyro->_dna._carryNum = 0; if (_vm->_gyro->_thinkThing && !_vm->_gyro->_dna._objects[_vm->_gyro->_thinks - 1]) thinkAbout(_vm->_gyro->kObjectMoney, Gyro::kThing); // you always have money - for (byte i = 0; i < kObjectNum; i++) + + for (byte i = 0; i < kObjectNum; i++) { if (_vm->_gyro->_dna._objects[i]) { _vm->_gyro->_dna._carryNum++; _vm->_gyro->_objectList[_vm->_gyro->_dna._carryNum] = i + 1; } + } } void Lucerna::guideAvvy(Common::Point cursorPos) { |