aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-14 13:11:58 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit7c0bb9e6a14cf6dc0874bbabd7e41ce2f212caeb (patch)
treea8147885344fe28088932933e2f2827118953a75 /engines/director
parenta84d8c44e4053aa4210bb18e7235199a3d91e45d (diff)
downloadscummvm-rg350-7c0bb9e6a14cf6dc0874bbabd7e41ce2f212caeb.tar.gz
scummvm-rg350-7c0bb9e6a14cf6dc0874bbabd7e41ce2f212caeb.tar.bz2
scummvm-rg350-7c0bb9e6a14cf6dc0874bbabd7e41ce2f212caeb.zip
DIRECTOR: Lingo: Added 'factory' keyword test
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/tests/factory.lingo66
1 files changed, 66 insertions, 0 deletions
diff --git a/engines/director/lingo/tests/factory.lingo b/engines/director/lingo/tests/factory.lingo
new file mode 100644
index 0000000000..d458ba4bff
--- /dev/null
+++ b/engines/director/lingo/tests/factory.lingo
@@ -0,0 +1,66 @@
+--
+macro AimGun2
+global aim1
+set aim1 = aim2(mNew)
+--
+factory aim2
+method mNew
+ dontpassevent
+ global aim1
+ set the locv of sprite 24 to 540
+method mMove x, y
+ set the locH of sprite 15 to x
+ set the locV of sprite 15 to y-250
+method mAtFrame
+ dontpassevent
+ me(mMove, the mouseH, the mouseV)
+method fire
+ global fire1, targeth, targetv
+ set fire1 = fire2(mNew)
+ set the perframehook to fire1
+ me(mDispose)
+method mExit
+ set the perframehook to false
+ postfire
+ me(mDispose)
+method mDispose
+ global aim1
+ set aim1 = 1
+ when keydown then nothing
+--
+factory fire2
+method mNew
+ dontpassevent
+ set the castnum of sprite 14 to f15
+method mAtFrame
+ Global StartH, StartV, targetv, stepH, stepV, bcast
+ dontpassevent
+ set the castnum of sprite 14 to bcast
+ set the LocV of sprite 14 to (startV-stepV)
+ if sprite 14 intersects 10 and (startV-6) <= targetV then
+ set the castnum of sprite 14 to f16
+ set the perframehook to false
+ me(hit)
+ exit
+ end if
+ if startV < targetV or bcast>g17 then
+ set the perframehook to false
+ set the locV of sprite 14 to 340
+ aimgun2
+ exit
+ end if
+ set startV to (startV-stepV)
+ set bcast = bcast + 1
+method hit
+ global KillLoc
+ set killloc to the loch of sprite 3
+ go "Death"
+ set the locV of sprite 14 to 400
+ aimgun2
+method mDispose
+ global fire1
+ set fire1 = 0
+--
+macro KillIt2
+global KillLoc
+set the locH of sprite 3 to KillLoc