aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-11 10:58:01 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commitfa4c1710d126b2d74cbdd784c59ea435cdc0d1e5 (patch)
tree50baa6cb6fb29b482fe1e75b53290d3ea08f52cf /engines
parent847b1c0a034a81b68568cd86598c5f8b8510bd8e (diff)
downloadscummvm-rg350-fa4c1710d126b2d74cbdd784c59ea435cdc0d1e5.tar.gz
scummvm-rg350-fa4c1710d126b2d74cbdd784c59ea435cdc0d1e5.tar.bz2
scummvm-rg350-fa4c1710d126b2d74cbdd784c59ea435cdc0d1e5.zip
DIRECTOR: Lingo: Smoother tests handling
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index fd9d0a56f0..7c7f51ed87 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -140,7 +140,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
begin = end + 1;
}
- _hadError = false;
+ _hadError = true; // HACK: This is for preventing test execution
parse(begin);
} else {
parse(code);
@@ -148,7 +148,7 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
code1(STOP);
}
- if (_currentScript->size())
+ if (_currentScript->size() && !_hadError)
Common::hexdump((byte *)&_currentScript->front(), _currentScript->size() * sizeof(inst));
}
@@ -158,6 +158,8 @@ void Lingo::executeScript(ScriptType type, uint16 id) {
return;
}
+ debug(2, "Executing script type: %d, id: %d", type, id);
+
_currentScript = _scripts[type][id];
_pc = 0;
_returning = false;
@@ -322,7 +324,7 @@ void Lingo::runTests() {
stream->read(script, size);
- warning("Executing file %s of size %d", m.getName().c_str(), size);
+ warning("Compiling file %s of size %d, id: %d", m.getName().c_str(), size, counter);
_hadError = false;
addCode(script, kMovieScript, counter);