diff options
author | Strangerke | 2015-05-09 10:21:46 +0200 |
---|---|---|
committer | Strangerke | 2015-05-09 10:22:51 +0200 |
commit | e3e4354f880d5f9354706b8f20d204960c48bb97 (patch) | |
tree | 77c78782837c884bb36b2d9a4b6b79fe1eb4d465 | |
parent | 8d89bf9bc6c067af4deaf86d4ae8c3430d584851 (diff) | |
download | scummvm-rg350-e3e4354f880d5f9354706b8f20d204960c48bb97.tar.gz scummvm-rg350-e3e4354f880d5f9354706b8f20d204960c48bb97.tar.bz2 scummvm-rg350-e3e4354f880d5f9354706b8f20d204960c48bb97.zip |
SHERLOCK: Remove the use of ++ on boolean variables
-rw-r--r-- | engines/sherlock/objects.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/user_interface.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 488d1fcf83..35b270dd13 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -909,13 +909,13 @@ int Object::checkNameForCodes(const Common::String &name, const char *const mess } else if (name.hasPrefix("!")) { // Message attached to canimation int messageNum = atoi(name.c_str() + 1); - ui._infoFlag++; + ui._infoFlag = true; ui.clearInfo(); screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, messages[messageNum]); ui._menuCounter = 25; } else if (name.hasPrefix("@")) { // Message attached to canimation - ui._infoFlag++; + ui._infoFlag = true; ui.clearInfo(); screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, name.c_str() + 1); printed = true; @@ -1010,7 +1010,7 @@ int Object::pickUpObject(const char *const messages[]) { if (message > 50) message -= 50; - ++ui._infoFlag; + ui._infoFlag = true; ui.clearInfo(); screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, messages[message]); ui._menuCounter = 30; @@ -1056,7 +1056,7 @@ int Object::pickUpObject(const char *const messages[]) { numObjects = inv.putItemInInventory(*this); if (!printed) { - ui._infoFlag++; + ui._infoFlag = true; ui.clearInfo(); Common::String itemName = _description; diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp index f048e280a8..ce282aa2c2 100644 --- a/engines/sherlock/user_interface.cpp +++ b/engines/sherlock/user_interface.cpp @@ -428,7 +428,7 @@ void UserInterface::restoreButton(int num) { screen.slamArea(pt.x, pt.y, pt.x + frame.w, pt.y + frame.h); if (!_menuCounter) { - _infoFlag++; + _infoFlag = true; clearInfo(); } } @@ -515,7 +515,7 @@ void UserInterface::clearWindow() { void UserInterface::whileMenuCounter() { if (!(--_menuCounter) || _vm->_events->checkInput()) { _menuCounter = 0; - ++_infoFlag; + _infoFlag = true; clearInfo(); } } @@ -1259,7 +1259,7 @@ void UserInterface::doLookControl() { Screen &screen = *_vm->_screen; _key = _oldKey = -1; - _keyboardInput = _keycode != Common::KEYCODE_INVALID; + _keyboardInput = (_keycode != Common::KEYCODE_INVALID); if (events._released || events._rightReleased || _keyboardInput) { // Is an inventory object being looked at? @@ -1360,7 +1360,7 @@ void UserInterface::doMainControl() { // Check if the button being pointed to has changed if (_oldKey != _key && !_windowOpen) { // Clear the info line - _infoFlag++; + _infoFlag = true; clearInfo(); // If there was an old button selected, restore it @@ -2215,7 +2215,7 @@ void UserInterface::checkUseAction(const UseType *use, const Common::String &inv // Print "Done..." as an ending, unless flagged for leaving scene or otherwise flagged if (scene._goToScene != 1 && !printed && !talk._talkToAbort) { - _infoFlag++; + _infoFlag = true; clearInfo(); screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "Done..."); _menuCounter = 25; |