diff options
-rw-r--r-- | engines/director/lingo/lingo.cpp | 11 | ||||
-rw-r--r-- | engines/director/lingo/tests/macros.lingo | 13 | ||||
-rw-r--r-- | engines/director/lingo/tests/macros2.lingo | 11 |
3 files changed, 22 insertions, 13 deletions
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index b9a7488952..dd3d0cde19 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -309,7 +309,18 @@ void Lingo::runTests() { if (stream) { uint size = stream->size(); + char *script = (char *)calloc(size + 1, 1); + + stream->read(script, size); + warning("Executing file %s of size %d", m.getName().c_str(), size); + + addCode(script, kMovieScript, counter); + executeScript(kMovieScript, counter); + + free(script); + + counter++; } inFile.close(); diff --git a/engines/director/lingo/tests/macros.lingo b/engines/director/lingo/tests/macros.lingo index 9167f1dffb..a75dc4c8f9 100644 --- a/engines/director/lingo/tests/macros.lingo +++ b/engines/director/lingo/tests/macros.lingo @@ -40,16 +40,3 @@ end if put par1 put par2 put par3 -", kMovieScript, 1); - -_lingo->addCode("check(2, 3) -global x, y -set y = 8 -shipx -put x -zipx -put x -put y -check(1, 2, 3) -check 4, 5, 6 -check 7, 8 diff --git a/engines/director/lingo/tests/macros2.lingo b/engines/director/lingo/tests/macros2.lingo new file mode 100644 index 0000000000..b587ae421c --- /dev/null +++ b/engines/director/lingo/tests/macros2.lingo @@ -0,0 +1,11 @@ +check(2, 3) +global x, y +set y = 8 +shipx +put x +zipx +put x +put y +check(1, 2, 3) +check 4, 5, 6 +check 7, 8 |