diff options
author | Strangerke | 2015-12-08 00:16:17 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:33:54 +0100 |
commit | fb86132314f7da2ea35d0f7c73b28102823a0049 (patch) | |
tree | 21c9d5f2c4c8fde75e4306c1bc63c76e923a76fa /engines/lab | |
parent | dcefb696eddb21120648ea5f8f9514ca368f958d (diff) | |
download | scummvm-rg350-fb86132314f7da2ea35d0f7c73b28102823a0049.tar.gz scummvm-rg350-fb86132314f7da2ea35d0f7c73b28102823a0049.tar.bz2 scummvm-rg350-fb86132314f7da2ea35d0f7c73b28102823a0049.zip |
LAB: Fix some coding style in tilepuzzle
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/tilepuzzle.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/lab/tilepuzzle.cpp b/engines/lab/tilepuzzle.cpp index 3b7d5ceb61..cdc6735de3 100644 --- a/engines/lab/tilepuzzle.cpp +++ b/engines/lab/tilepuzzle.cpp @@ -86,33 +86,33 @@ void LabEngine::changeTile(uint16 col, uint16 row) { int16 scrolltype = -1; if (row > 0) { - if (_curTile[col] [row - 1] == 0) { - _curTile[col] [row - 1] = _curTile[col] [row]; - _curTile[col] [row] = 0; + if (_curTile[col][row - 1] == 0) { + _curTile[col][row - 1] = _curTile[col][row]; + _curTile[col][row] = 0; scrolltype = DOWNSCROLL; } } if (col > 0) { - if (_curTile[col - 1] [row] == 0) { - _curTile[col - 1] [row] = _curTile[col] [row]; - _curTile[col] [row] = 0; + if (_curTile[col - 1][row] == 0) { + _curTile[col - 1][row] = _curTile[col][row]; + _curTile[col][row] = 0; scrolltype = RIGHTSCROLL; } } if (row < 3) { - if (_curTile[col] [row + 1] == 0) { - _curTile[col] [row + 1] = _curTile[col] [row]; - _curTile[col] [row] = 0; + if (_curTile[col][row + 1] == 0) { + _curTile[col][row + 1] = _curTile[col][row]; + _curTile[col][row] = 0; scrolltype = UPSCROLL; } } if (col < 3) { - if (_curTile[col + 1] [row] == 0) { - _curTile[col + 1] [row] = _curTile[col] [row]; - _curTile[col] [row] = 0; + if (_curTile[col + 1][row] == 0) { + _curTile[col + 1][row] = _curTile[col][row]; + _curTile[col][row] = 0; scrolltype = LEFTSCROLL; } } @@ -132,7 +132,7 @@ void LabEngine::changeTile(uint16 col, uint16 row) { while (row < 4) { while (col < 4) { - check = check && (_curTile[row] [col] == SOLUTION[row] [col]); + check &= (_curTile[row][col] == SOLUTION[row][col]); col++; } @@ -204,9 +204,9 @@ void LabEngine::doTile(bool showsolution) { while (row < 4) { while (col < 4) { if (showsolution) - num = SOLUTION[col] [row]; + num = SOLUTION[col][row]; else - num = _curTile[col] [row]; + num = _curTile[col][row]; if (showsolution || num) _tiles[num]->drawImage(cols + (col * colm), rows + (row * rowm)); @@ -316,7 +316,7 @@ void LabEngine::changeCombination(uint16 number) { } for (uint16 i = 0; i < 6; i++) - unlocked = (_combination[i] == solution[i]) && unlocked; + unlocked &= (_combination[i] == solution[i]); if (unlocked) _conditions->inclElement(COMBINATIONUNLOCKED); |