Skip to content

Commit

Permalink
DIRECTOR: Lingo: Make 'global' accept list of variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent c53e4b5 commit d70a76f
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 192 deletions.
7 changes: 5 additions & 2 deletions engines/director/director.cpp
Expand Up @@ -105,13 +105,14 @@ _lingo->executeScript(kMovieScript, 2);

_lingo->addCode("--\n\
macro SHIPX\n\
global x\n\
global x, y\n\
set x = 5\n\
if x = 1 then\n\
go \"Zoom\"\n\
exit\n\
end if\n\
if x >1 then\n\
set y = 10\n\
exit\n\
end if\n\
put 100\n\
Expand All @@ -138,11 +139,13 @@ end if\n\
", kMovieScript, 1);

_lingo->addCode("check(2, 3)\n\
global x\n\
global x, y\n\
set y = 8\n\
shipx\n\
put x\n\
zipx\n\
put x\n\
put y\n\
", kMovieScript, 2);

_lingo->executeScript(kMovieScript, 2);
Expand Down

0 comments on commit d70a76f

Please sign in to comment.