aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/tests/macros.lingo
blob: 9167f1dffb5459b77b14499933fee97904abecf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--
macro SHIPX
global x, y
set x = Random(5)
if x = 1 then
go \"Zoom\"
exit
end if
if x >1 then
set y = 10
exit
end if
put 100

--
macro ZIPX
set x = Random(5)
if x = 1 then
go \"ZIP\"
exit
end if
if x >1 then
put x
exit
end if

--
macro check par1, par2
, par3
if par1 = 3 then
put -3
else
put 0
end if
if par2 = 2 then
put 2
else
put 0
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