aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/scott
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-17 21:41:15 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit41a437816999c913f30f3ef2c1c751f646399c91 (patch)
tree26809d73851f630eb3e1096ddd2d5c0613248ddc /engines/glk/scott
parent88b0e5d52fa26f64b089f1b8d406ada46434e6d3 (diff)
downloadscummvm-rg350-41a437816999c913f30f3ef2c1c751f646399c91.tar.gz
scummvm-rg350-41a437816999c913f30f3ef2c1c751f646399c91.tar.bz2
scummvm-rg350-41a437816999c913f30f3ef2c1c751f646399c91.zip
GLK: SCOTT: Don't show another line prompt when game is exiting
Diffstat (limited to 'engines/glk/scott')
-rw-r--r--engines/glk/scott/scott.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index cbc5886130..dc0ae0b939 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -102,6 +102,8 @@ void Scott::runGame(Common::SeekableReadStream *gameFile) {
default:
break;
}
+ if (shouldQuit())
+ return;
// Brian Howarth games seem to use -1 for forever
if (_items[LIGHT_SOURCE]._location != DESTROYED && _gameHeader._lightTime != -1) {
@@ -789,7 +791,7 @@ int Scott::performLine(int ct) {
doneit:
output("The game is now over.\n");
glk_exit();
- break;
+ return 0;
case 64:
break;
case 65: {
@@ -1022,6 +1024,9 @@ int Scott::performActions(int vb, int no) {
if (vb != 0 && doagain == 0)
return 0;
}
+
+ if (shouldQuit())
+ return 0;
}
}
ct++;