aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2010-02-27 18:54:21 +0000
committerMatthew Hoops2010-02-27 18:54:21 +0000
commiteda17df00c2a9600757bfbf2b85c587587ab6e16 (patch)
tree631544f2c4cfaf6c5664e1d6250e3e35db83f68f /engines
parent22e5a557b73c7c4e25e7cc00bf7e10e7e2d530cc (diff)
downloadscummvm-rg350-eda17df00c2a9600757bfbf2b85c587587ab6e16.tar.gz
scummvm-rg350-eda17df00c2a9600757bfbf2b85c587587ab6e16.tar.bz2
scummvm-rg350-eda17df00c2a9600757bfbf2b85c587587ab6e16.zip
Check if we should quit on every opcode call instead of after every 500. Fixes bug #2960238.
svn-id: r48149
Diffstat (limited to 'engines')
-rw-r--r--engines/made/script.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index 91b932cc92..de196f30e0 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -145,7 +145,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {
_codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData();
_codeIp = _codeBase;
- while (true) {
+ while (!_vm->shouldQuit()) {
byte opcode = readByte();
if (opcode >= 1 && opcode <= _commandsMax) {
@@ -160,9 +160,6 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {
if (++opcodeSleepCounter > 500) {
_vm->_screen->updateScreenAndWait(5);
opcodeSleepCounter = 0;
- if (_vm->shouldQuit()) {
- break;
- }
}
}