diff options
-rw-r--r-- | engines/lab/anim.cpp | 2 | ||||
-rw-r--r-- | engines/lab/detection.cpp | 2 | ||||
-rw-r--r-- | engines/lab/engine.cpp | 8 | ||||
-rw-r--r-- | engines/lab/image.cpp | 2 | ||||
-rw-r--r-- | engines/lab/interface.cpp | 4 | ||||
-rw-r--r-- | engines/lab/map.cpp | 4 | ||||
-rw-r--r-- | engines/lab/music.cpp | 2 | ||||
-rw-r--r-- | engines/lab/resource.cpp | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index 532b242544..db5e3b313b 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -118,7 +118,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { _frameNum++; - if ((_frameNum == 1) && (_continuous || (!_playOnce))) + if ((_frameNum == 1) && (_continuous || !_playOnce)) _diffFileStart = _diffFile; _isAnim = (_frameNum >= 3) && (!_playOnce); diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp index 4a01414118..52d284562e 100644 --- a/engines/lab/detection.cpp +++ b/engines/lab/detection.cpp @@ -180,7 +180,7 @@ SaveStateList LabMetaEngine::listSaves(const char *target) const { // Obtain the last 3 digits of the filename, since they correspond to the save slot int slotNum = atoi(file->c_str() + file->size() - 3); - if (slotNum >= 0 && slotNum <= 999) { + if ((slotNum >= 0) && (slotNum <= 999)) { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { if (Lab::readSaveGameHeader(in, header)) diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 251595fae4..83beb03760 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -638,7 +638,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo if (g_engine->shouldQuit()) return false; - if ((msgClass == RAWKEY) && (!_graphics->_longWinInFront)) { + if ((msgClass == RAWKEY) && !_graphics->_longWinInFront) { if (!processKey(curMsg, msgClass, qualifier, curPos, curInv, forceDraw, code)) return false; } @@ -990,9 +990,9 @@ void LabEngine::processMainButton(CloseDataPtr wrkClosePtr, uint16 &curInv, uint } else if (_roomNum == oldRoomNum) { // didn't get there? _followingCrumbs = false; } - } else if (_droppingCrumbs && oldRoomNum != _roomNum) { + } else if (_droppingCrumbs && (oldRoomNum != _roomNum)) { // If in surreal maze, turn off DroppingCrumbs. - if (_roomNum >= 245 && _roomNum <= 280) { + if ((_roomNum >= 245) && (_roomNum <= 280)) { _followingCrumbs = false; _droppingCrumbs = false; _numCrumbs = 0; @@ -1091,7 +1091,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI if ((curInv == 0) || (curInv > _numInv)) { curInv = 1; - while ((curInv <= _numInv) && (!_conditions->in(curInv))) + while ((curInv <= _numInv) && !_conditions->in(curInv)) curInv++; } diff --git a/engines/lab/image.cpp b/engines/lab/image.cpp index 1a0383f9dd..6ace005f9f 100644 --- a/engines/lab/image.cpp +++ b/engines/lab/image.cpp @@ -70,7 +70,7 @@ void Image::blitBitmap(uint16 xs, uint16 ys, Image *imDest, if (yd + h > destHeight) h = destHeight - yd; - if (w > 0 && h > 0) { + if ((w > 0) && (h > 0)) { byte *s = _imageData + ys * _width + xs; byte *d = destBuffer + yd * destWidth + xd; diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp index f4901880e6..c52933d230 100644 --- a/engines/lab/interface.cpp +++ b/engines/lab/interface.cpp @@ -117,8 +117,8 @@ Button *EventManager::checkNumButtonHit(ButtonList *buttonList, uint16 key) { for (ButtonList::iterator buttonItr = buttonList->begin(); buttonItr != buttonList->end(); ++buttonItr) { Button *button = *buttonItr; - if ((gkey - 1 == button->_buttonID || (gkey == 0 && button->_buttonID == 9) || - (button->_keyEquiv != 0 && makeButtonKeyEquiv(key) == button->_keyEquiv)) + if (((gkey - 1 == button->_buttonID) || ((gkey == 0) && (button->_buttonID == 9)) + || ((button->_keyEquiv != 0) && (makeButtonKeyEquiv(key) == button->_keyEquiv))) && button->_isEnabled) { mouseHide(); button->_altImage->drawImage(button->_x, button->_y); diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 927bfd037a..1222e1ad8c 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -324,7 +324,7 @@ bool LabEngine::floorVisited(uint16 floorNum) { * Note: The original did not show all the visited floors, but we do */ uint16 LabEngine::getUpperFloor(uint16 floorNum) { - if (floorNum == kFloorCarnival || floorNum == kFloorNone) + if ((floorNum == kFloorCarnival) || (floorNum == kFloorNone)) return kFloorNone; for (uint16 i = floorNum; i < kFloorCarnival; i++) @@ -339,7 +339,7 @@ uint16 LabEngine::getUpperFloor(uint16 floorNum) { * Note: The original did not show all the visited floors, but we do */ uint16 LabEngine::getLowerFloor(uint16 floorNum) { - if (floorNum == kFloorLower || floorNum == kFloorNone) + if ((floorNum == kFloorLower) || (floorNum == kFloorNone)) return kFloorNone; for (uint16 i = floorNum; i > kFloorLower; i--) diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp index 34b70049fd..61d9fd0f4e 100644 --- a/engines/lab/music.cpp +++ b/engines/lab/music.cpp @@ -71,7 +71,7 @@ void Music::updateMusic() { _vm->_event->processInput(); _vm->_event->updateMouse(); - if (_musicOn && getPlayingBufferCount() < MAXBUFFERS) { + if (_musicOn && (getPlayingBufferCount() < MAXBUFFERS)) { // NOTE: We need to use malloc(), cause this will be freed with free() // by the music code byte *musicBuffer = (byte *)malloc(MUSICBUFSIZE); diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp index 932ed8c4f5..668b31b6d2 100644 --- a/engines/lab/resource.cpp +++ b/engines/lab/resource.cpp @@ -82,7 +82,7 @@ char *Resource::getText(const char *fileName) { byte *text = buffer; dataFile->read(buffer, count); - while (text && *text != '\0') + while (text && (*text != '\0')) *text++ -= (byte)95; delete dataFile; |