diff options
author | Max Horn | 2009-07-01 20:51:34 +0000 |
---|---|---|
committer | Max Horn | 2009-07-01 20:51:34 +0000 |
commit | c4f629533082b065d8399a38822cd9cce08ccce8 (patch) | |
tree | 01ba5c8ae296ef1eec7a9bd089284cf921777d1b /engines/agos/feeble.cpp | |
parent | a6b57dc3a986f749ca8f915b461b184d48390757 (diff) | |
download | scummvm-rg350-c4f629533082b065d8399a38822cd9cce08ccce8.tar.gz scummvm-rg350-c4f629533082b065d8399a38822cd9cce08ccce8.tar.bz2 scummvm-rg350-c4f629533082b065d8399a38822cd9cce08ccce8.zip |
Fixed some more warnings observed on buildbot
svn-id: r42010
Diffstat (limited to 'engines/agos/feeble.cpp')
-rw-r--r-- | engines/agos/feeble.cpp | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/engines/agos/feeble.cpp b/engines/agos/feeble.cpp index 492d855614..89b6f6da27 100644 --- a/engines/agos/feeble.cpp +++ b/engines/agos/feeble.cpp @@ -161,21 +161,16 @@ void AGOSEngine_FeebleDemo::exitMenu() { playVideo("fbye1.smk", true); HitArea *ha; - while (!shouldQuit()) { + do { _lastHitArea = NULL; _lastHitArea3 = NULL; - while (!shouldQuit()) { - if (_lastHitArea3 != 0) - break; + while (!shouldQuit() && _lastHitArea3 == 0) { delay(1); } ha = _lastHitArea; - - if (ha != NULL && ha->id == 21) - break; - } + } while (!shouldQuit() && !(ha != NULL && ha->id == 21)); playVideo("fbye2.smk"); quitGame(); @@ -202,9 +197,7 @@ void AGOSEngine_FeebleDemo::filmMenu() { _lastHitArea = NULL; _lastHitArea3 = NULL; - while (!shouldQuit()) { - if (_lastHitArea3 != 0) - break; + while (!shouldQuit() && _lastHitArea3 == 0) { handleWobble(); delay(1); } @@ -287,25 +280,23 @@ void AGOSEngine_FeebleDemo::mainMenu() { startInteractiveVideo("mainmenu.smk"); - HitArea *ha; - while (!shouldQuit()) { + HitArea *ha = 0; + do { _lastHitArea = NULL; _lastHitArea3 = NULL; - while (!shouldQuit()) { - if (_lastHitArea3 != 0) - break; + while (_lastHitArea3 == 0) { + if (shouldQuit()) + return; handleText(); delay(1); } ha = _lastHitArea; + } while (ha == NULL || !(ha->id >= 1 && ha->id <= 6)); - if (ha == NULL) { - } else if (ha->id >= 1 && ha->id <= 6) { - break; - } - } + if (shouldQuit()) + return; stopInteractiveVideo(); @@ -384,11 +375,9 @@ void AGOSEngine_FeebleDemo::waitForSpace() { windowPutChar(_textWindow, *message); mouseOff(); - while (!shouldQuit()) { + do { delay(1); - if (_keyPressed.keycode == Common::KEYCODE_SPACE) - break; - } + } while (!shouldQuit() && (_keyPressed.keycode != Common::KEYCODE_SPACE)); _keyPressed.reset(); mouseOn(); } |