diff options
author | Joseph-Eugene Winzer | 2017-08-22 23:24:24 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 01:47:01 +0000 |
commit | 2c0518e0babfea3c2b656f58af98aa373d3bf684 (patch) | |
tree | ed4ce4d1ede12dae67b17f8e5bccd024b2548395 | |
parent | cec70a4cb4ce1f5883dfb21f5a61508552b71f82 (diff) | |
download | scummvm-rg350-2c0518e0babfea3c2b656f58af98aa373d3bf684.tar.gz scummvm-rg350-2c0518e0babfea3c2b656f58af98aa373d3bf684.tar.bz2 scummvm-rg350-2c0518e0babfea3c2b656f58af98aa373d3bf684.zip |
SUPERNOVA: Removes redundant loops around edit()
-rw-r--r-- | engines/supernova/rooms.cpp | 6 | ||||
-rw-r--r-- | engines/supernova/state.cpp | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index dc30d40fb0..743a80b888 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2423,10 +2423,8 @@ bool AxacussOffice1::interact(Action verb, Object &obj1, Object &obj2) { !obj1.hasProperty(OPENED)) { _vm->renderMessage("Welche Zahlenkombination willst|du eingeben?"); _vm->renderBox(160, 70, 70, 10, kColorDarkBlue); - do - _gm->edit(input, 161, 71, 10); - while ((_gm->_key.keycode != Common::KEYCODE_ESCAPE) && - (_gm->_key.keycode != Common::KEYCODE_RETURN)); + _gm->edit(input, 161, 71, 10); + _vm->removeMessage(); if (_gm->_key.keycode != Common::KEYCODE_ESCAPE) { if (!input.equals("89814")) { diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 7cfd1b4e0e..98230c2fb8 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1256,10 +1256,8 @@ bool GameManager::genericInteract(Action verb, Object &obj1, Object &obj2) { // TODO: Adjust for msec time instead of ticks do { _vm->renderBox(91, 99, 138, 9, kColorDarkBlue); - do { - edit(input, 91, 100, 5); - } while ((_key.keycode != Common::KEYCODE_RETURN) && - (_key.keycode != Common::KEYCODE_ESCAPE)); + edit(input, 91, 100, 5); + f = false; if (t[0] == ':') { t[0] = 0; |