scummvm/engines/director/lingo/tests/the.lingo
Roland van Laar f6654b8b1f DIRECTOR: LINGO: Reset lingo parameters
Reset a few lingo the keywords on goto events.

    the beepOn, 0
    the keyDownScript, ""
    the mouseDownScript, ""
    the mouseUpScript, ""

Director 4 Lingo Dictionary  p.102

Fixes the menu on the clock in hhouse.
Hhouse set some scripts to "dontPassEvent" and relied on Director
to reset their values when 'go' was called.
2023-02-05 12:21:27 +01:00

95 lines
2.5 KiB
Text

put 1.0 / 3
set the floatPrecision to 6
put 1.0 / 3
put the loch of sprite 4
set the loch of sprite 5 to 10
set the castnum of sprite 8 to the number of cast "A Blank Castmember"
put the time
put the abbrev time
put the long time
put the date
put the short date
put the abbrev date
put the long date
set a = 5
set gravityConst = the value of ( QUOTE & the text of cast 1 & QUOTE )
set the hilite of cast 1 to (a = 3)
set the text of cast 1 = string( gravityConst )
-- This is object setting. D4+
set BlastWindow to window "Media Blast"
set the filename of BlastWindow to "blastwin"
set the titleVisible of BlastWindow to true
set the modal of BlastWindow to true
set the windowtype of BlastWindow to 5
set the bottom of sprite 1 to originV + (the number of lines in someText) * 16
set the bottom of sprite 1 to originV + (the number of words in someText) * 16
put the number of words of field 1 into field 2
set pSprite to 1
set pChangeH to 10
set h = the locH of sprite pSprite + pChangeH
set the volume of sound 1 to 255
put the volume of sound 1 into field 1
set the checkMark of menuItem "Horizontal" of menu "The Ball" to False
put the number of castMembers into field 2
put the number of menuItems of menu "sam" into field 2
put abs( the locH of sprite 2 - the mouseH) into field 2
set the castNum of sprite the clickon = the number of cast 1
-- set castname = the name of cast(the castnum of sprite 1)
set res = the soundBusy of 1
put the sqrt of 9
put 5 into field the number of cast "MasterList"
set the text of field 1 = "Hello"
-- The next statement is valid lingo, however it's hard to parse.
-- We have no indication that this one off type of code is used.
-- set the text of field 0 + 1 = "Hello"
set h to "Hello"
set gMarkerName = the length of h + 2
scummvmAssertEqual(0, the length of 123)
-- test the itemDelimiter
set save = the itemDelimiter
scummvmAssert(save=",")
set the itemDelimiter = ":"
scummvmAssert(the itemDelimiter=":")
set the itemDelimiter = ":,"
scummvmAssert(the itemDelimiter=":")
set the itemDelimiter = ""
scummvmAssert(the itemDelimiter="")
set the itemDelimiter = save
-- test number of items
set chunkExpr to "one:two:three"
scummvmAssertEqual(the number of items in chunkExpr, 1)
set the itemDelimiter to ":"
scummvmAssertEqual(the number of items in chunkExpr, 3)
set the itemDelimiter to save
-- test initialisation
scummvmAssertEqual(the beepOn, 0)
scummvmAssertEqual(the keyDownScript, "")
scummvmAssertEqual(the mouseDownScript, "")
scummvmAssertEqual(the mouseUpScript, "")