home *** CD-ROM | disk | FTP | other *** search
- global gsCRLF, gsExchData, gbDebug, gbAnimation, gbGoto, gsGoFrame, gbSldOpen, giBlinkCast, gbDoBlink, gBlink, gbDoTheMouse, giDownFlag, gbInitFrame, gbISDN, gbIsPC, gbQuitWait, gb1u1Logo, gsIniFile, gsExtension, gsMoviePath, glParamList, glSpriteRoll, glCastOfSprite, glOrigOfSprite, glHideSprite, glAction, glStatus, glBsListe, glgotoListe, glBsFrame, glActiveRoll, giDummySliderId, giDummySliderHomeId, giLastSprite, giBsIndex, giSliderID, giMovieNr, gsLastMovie, giExtraAction, gsApp
-
- on InitAll
- InitVars()
- InitSystem()
- InitPath()
- InitParams()
- InitScreen()
- InitTheMac()
- end
-
- on InitVars
- set gsCRLF to numToChar(13) & numToChar(10)
- set gsIniFile to "1u1.ini"
- set gbSldOpen to 0
- set gbDoBlink to 1
- set gbDoTheMouse to 0
- set gBlink to 0
- set giDownFlag to 0
- set giLastSprite to 0
- set gsExtension to ".dir"
- set gbAnimation to 0
- set giBsIndex to 1
- set gbGoto to 0
- set gbDebug to 0
- set gsGoFrame to EMPTY
- set giMovieNr to 0
- set gbInitFrame to 0
- set gbIsPC to 1
- set giExtraAction to 0
- set gbQuitWait to 0
- set gb1u1Logo to 0
- set gsApp to EMPTY
- set glSpriteRoll to []
- set glCastOfSprite to []
- set glOrigOfSprite to []
- set glAction to []
- set glStatus to []
- set glBsListe to []
- set glgotoListe to []
- set glActiveRoll to []
- set gbIsPC to the machineType > 255
- set gbISDN to 0
- set giBlinkCast to 358
- if the moviePath contains "ISDN" then
- set gbISDN to 1
- set giBlinkCast to 420
- end if
- end
-
- on InitScreen
- set giDummySliderId to 47
- set giDummySliderHomeId to 40
- if gbISDN = 1 then
- preLoadCast(316, 400)
- else
- preLoadCast(400, 450)
- end if
- repeat with i = 26 to 46
- puppetSprite(i, 1)
- end repeat
- updateStage()
- set glHideSprite to [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 45]
- repeat with i = 1 to count(glHideSprite)
- set the visible of sprite getAt(glHideSprite, i) to 0
- end repeat
- updateStage()
- set glSpriteRoll to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set glCastOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- if gbISDN = 0 then
- set glOrigOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, 319, 322, 391, 311, 312, 313, 314, 331, 334, 340, 337, 349, 385, 358, 364, 370, 376, 396, 399, 327, 0, 0]
- else
- set glOrigOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 410, 413, 416, 391, 0, 401, 402, 403, 0, 404, 340, 337, 349, 385, 0, 420, 426, 432, 447, 450, 407, 0, 0]
- end if
- repeat with i = 1 to 48
- set x to getAt(glOrigOfSprite, i)
- setAt(glCastOfSprite, i, x)
- end repeat
- setAt(glSpriteRoll, 26, 1)
- setAt(glSpriteRoll, 27, 1)
- setAt(glSpriteRoll, 28, 1)
- setAt(glSpriteRoll, 34, 1)
- setAt(glSpriteRoll, 35, 1)
- setAt(glSpriteRoll, 36, 1)
- setAt(glSpriteRoll, 37, 1)
- setAt(glSpriteRoll, 38, 1)
- setAt(glSpriteRoll, 39, 1)
- set the constraint of sprite 39 to 29
- if gbISDN = 0 then
- setAt(glSpriteRoll, 40, 2)
- end if
- setAt(glSpriteRoll, 41, 2)
- setAt(glSpriteRoll, 42, 2)
- setAt(glSpriteRoll, 43, 2)
- setAt(glSpriteRoll, 44, 1)
- setAt(glSpriteRoll, 45, 1)
- setAt(glSpriteRoll, 46, 1)
- repeat with i = 1 to 4
- append(glStatus, 0)
- end repeat
- set giSliderID to 0
- repeat with i = 1 to 48
- append(glAction, "DummyAction")
- end repeat
- setAt(glAction, 25, "Check")
- setAt(glAction, 26, "GoPrev")
- setAt(glAction, 27, "GoNext")
- setAt(glAction, 28, "GoMenu")
- setAt(glAction, 34, "Install")
- setAt(glAction, 35, "Antrag")
- setAt(glAction, 36, "SetAutoNein")
- setAt(glAction, 37, "SetAutoJa")
- setAt(glAction, 38, "SetSound")
- setAt(glAction, 39, "SetSndLevel")
- if gbISDN = 0 then
- setAt(glAction, 40, "escInst")
- end if
- setAt(glAction, 41, "escAntrag")
- setAt(glAction, 42, "escAuto")
- setAt(glAction, 43, "escSound")
- setAt(glAction, 46, "Finished")
- set ok to not (the movieName contains "MENU")
- if (the castNum of sprite 48 > 0) and ok then
- puppetSprite(48, 1)
- set the visible of sprite 48 to 0
- updateStage()
- end if
- end
-
- on ResetScreen
- if count(glOrigOfSprite) > 47 then
- repeat with i = 26 to 46
- set x to getAt(glOrigOfSprite, i)
- set the castNum of sprite i to x
- end repeat
- updateStage()
- end if
- repeat with i = 26 to 46
- if the puppet of sprite i = 1 then
- puppetSprite(i, 0)
- end if
- end repeat
- unLoad()
- sound stop 1
- set the volume of sound 1 to 255
- sound stop 2
- set the volume of sound 2 to 255
- puppetSound(0)
- ClearSystem()
- ResetTheMac()
- end
-
- on InitBsFrame
- global glBsListe, glBsFrame, gbAnimation, gbInitFrame
- set glBsFrame to []
- repeat with i = 1 to count(glBsListe)
- set x to getAt(glBsListe, i)
- append(glBsFrame, label(x))
- end repeat
- set gbInitFrame to 1
- end
-
- on SetData x
- set gsData to x
- end
-
- on GetData
- return(gsData)
- end
-
- on InitPath
- global gsSoundPath
- repeat with i = 1 to the number of castMembers
- set ty to the castType of cast i
- if ty = #sound then
- set x to the fileName of cast i
- set y to ExtractFile(x)
- set y to gsMoviePath & "sound\" & y & ".aif"
- set the fileName of cast i to y
- end if
- if ty = #digitalVideo then
- set x to the fileName of cast i
- set y to ExtractFile(x)
- set y to gsMoviePath & "video\" & y
- set the fileName of cast i to y
- end if
- end repeat
- end
-
- on ExtractFile x
- set p to 0
- set y to EMPTY
- repeat with i = 1 to length(x)
- if (char i of x = "\") or (char i of x = ":") then
- set p to i
- end if
- end repeat
- set j to 0
- repeat with i = p + 1 to length(x)
- set j to j + 1
- put char i of x into char j of y
- end repeat
- return y
- end
-
- on CheckBsIni
- global gsLastMovie
- set ok to 0
- if gsLastMovie = the movieName then
- set ok to 1
- else
- set gsLastMovie to the movieName
- end if
- return ok
- end
-