diff options
Diffstat (limited to 'engines/lure/surface.cpp')
-rw-r--r-- | engines/lure/surface.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp index 23cc9043cf..64394545d1 100644 --- a/engines/lure/surface.cpp +++ b/engines/lure/surface.cpp @@ -506,7 +506,6 @@ Surface *Surface::getScreen(uint16 resourceId) { bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool varLength, int16 x, int16 y) { OSystem &system = *g_system; - LureEngine &engine = LureEngine::getReference(); Mouse &mouse = Mouse::getReference(); Events &events = Events::getReference(); Screen &screen = Screen::getReference(); @@ -534,7 +533,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool // Loop until the input string changes refreshFlag = false; while (!refreshFlag && !abortFlag) { - abortFlag = engine.quit(); + abortFlag = events.quitFlag; if (abortFlag) break; while (events.pollEvent()) { @@ -976,7 +975,7 @@ bool SaveRestoreDialog::show(bool saveDialog) { // Provide highlighting of lines to select a save slot while (!abortFlag && !(mouse.lButton() && (selectedLine != -1)) && !mouse.rButton() && !mouse.mButton()) { - abortFlag = engine.quit(); + abortFlag = events.quitFlag; if (abortFlag) break; while (events.pollEvent()) { @@ -1179,7 +1178,7 @@ bool RestartRestoreDialog::show() { // Event loop for making selection bool buttonPressed = false; - while (!engine.quit()) { + while (!events.quitFlag) { // Handle events while (events.pollEvent()) { if ((events.type() == Common::EVENT_LBUTTONDOWN) && (highlightedButton != -1)) { @@ -1231,7 +1230,7 @@ bool RestartRestoreDialog::show() { Sound.killSounds(); - if (!restartFlag && !engine.quit()) { + if (!restartFlag && !events.quitFlag) { // Need to show Restore game dialog if (!SaveRestoreDialog::show(false)) // User cancelled, so fall back on Restart @@ -1300,7 +1299,6 @@ bool CopyProtectionDialog::show() { Screen &screen = Screen::getReference(); Events &events = Events::getReference(); Common::RandomSource rnd; - LureEngine &engine = LureEngine::getReference(); screen.setPaletteEmpty(); Palette p(COPY_PROTECTION_RESOURCE_ID - 1); @@ -1351,7 +1349,7 @@ bool CopyProtectionDialog::show() { // Clear any prior try _charIndex = 0; - while (!engine.quit()) { + while (!events.quitFlag) { while (events.pollEvent() && (_charIndex < 4)) { if (events.type() == Common::EVENT_KEYDOWN) { if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) { @@ -1385,7 +1383,7 @@ bool CopyProtectionDialog::show() { break; } - if (engine.quit()) + if (events.quitFlag) return false; // At this point, two page numbers have been entered - validate them |