(version 2)
(include "sci.sh")
(exports
    0 rm001
)
(use "Main")
(use "Sound")
(use "Cycle")
(use "Game")
(use "Feature")
(use "Obj")
(script 1)


(local
    local0
    local1
    local2

)
(instance public rm001 of Rm
    (properties
        picture 1
    )

    (method (init)
        (var temp0[50])
        proc0_2()
        Load(132 72)
        Load(132 73)
        Load(132 87)
        Load(129 1)
        Load(129 150)
        Load(129 151)
        Load(129 152)
        Load(129 153)
        Load(129 154)
        Load(129 926)
        Load(128 1)
        Load(128 2)
        Load(128 3)
        Load(128 4)
        Load(128 5)
        Load(128 601)
        Load(128 926)
        (super:init())
        (self:setScript(openingScript))
    )


    (method (doit)
        (super:doit())
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed))
            return 
        )
        (if ((send pEvent:type))
            Display(1 0 108 local0)
            Display(1 0 108 local1)
            (send gLongSong:stop())
            (send global2:newRoom(2))
        )
    )

)
(instance openingScript of Script
    (properties)

    (method (doit)
        (if ((== (send gLongSong:prevSignal) -1) and (== local2 1))
            = local2 0
            (openingScript:cue())
        )
        (if ((== local2 2) and (== (beamSound:prevSignal) -1))
            = local2 0
            (send global2:newRoom(155))
        )
        (super:doit())
    )


    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = seconds 5
            )
            (case 1
                (send global2:overlay(926 3))
                = cycles 2
            )
            (case 2
                (drip1:init())
                (drip2:init())
                (drip3:init())
                (drip4:init())
                = seconds 3
            )
            (case 3
                = local0 Display(" 1989 Sierra On-Line, Inc." 106 250 100 35 180 101 1 105 300 102 14 107)
                = seconds 7
            )
            (case 4
                (drip1:dispose())
                (drip2:dispose())
                (drip3:dispose())
                (drip4:dispose())
                Display(1 0 108 local0)
                (send global2:drawPic(150 5))
                = cycles 2
            )
            (case 5
                (Mark:
                    init()
                    setCycle(End)
                    setMotion(MoveTo 52 37 self)
                )
            )
            (case 6
                (Mark:stopUpd())
                (Scott:
                    init()
                    setCycle(End)
                    setMotion(MoveTo 268 37 self)
                )
            )
            (case 7
                = cycles 2
            )
            (case 8
                (Scott:stopUpd())
                = local0 Display("Created and Written by" 106 250 100 30 90 101 1 105 300 102 14 107)
                = local1 Display("Mark Crowe and Scott Murphy" 106 250 100 30 105 101 1 105 300 102 15 107)
                = seconds 7
            )
            (case 9
                (Scott:dispose())
                (Mark:dispose())
                Display(1 0 108 local0)
                Display(1 0 108 local1)
                proc0_10()
                = local1 Display("Programmed by\n\n\nGraphics by\n\nGame Development System by\n\n\nMusic by\n\nSound Effects & Music Editing by" 106 250 100 30 25 101 0 105 300 102 14 107)
                proc0_10()
                = local0 Display("\nScott Murphy, Doug Oldfield,\nKen Koch, Chris Smith\n\nMark Crowe\n\nJeff Stephenson, Bob Heitman,\nPablo Ghenis, Stuart Goldstein\n\nBob Siebenberg\n\nMark Seibert" 106 250 100 80 25 101 0 105 300 102 15 107)
                = seconds 12
            )
            (case 10
                Display(1 0 108 local0)
                Display(1 0 108 local1)
                proc0_10()
                = local0 Display("It has been an indeterminate amount\nof time since Roger Wilco rocketed\naway from Vohaul's burning space\nfortress. Time stands still for our\nhero in suspended animation." 106 250 100 35 65 101 1 105 300 102 14 107)
                = seconds 12
            )
            (case 11
                Display(1 0 108 local0)
                = cycles 2
            )
            (case 12
                = local0 Display("Its engines long spent, the small\nescape pod drifts aimlessly through\nunfamiliar star fields, its course\naltered many times by small asteroids\nand space debris. Inside, Roger lies\nundisturbed in his sleep chamber....\n...but not for long." 106 250 100 35 65 101 1 105 300 102 14 107)
                = seconds 13
            )
            (case 13
                = local2 1
            )
            (case 14
                Display(1 0 108 local0)
                proc0_10()
                (send gLongSong:
                    number(72)
                    play()
                )
                (pod:
                    init()
                    setMotion(MoveTo 129 97 self)
                )
            )
            (case 15
                (send gLongSong:
                    number(73)
                    loop(-1)
                    play()
                )
                (send global2:overlay(151 6))
                (podOutline:
                    init()
                    setCycle(Fwd)
                )
                (pod:setMotion(MoveTo -54 97 self))
            )
            (case 16
                (podOutline:dispose())
                (pod:dispose())
                = global17 8
                (send global2:drawPic(150))
                = cycles 3
            )
            (case 17
                (send global2:overlay(152))
                = cycles 7
            )
            (case 18
                (podImage:
                    init()
                    setCycle(End self)
                )
            )
            (case 19
                = cycles 2
            )
            (case 20
                (podImage:stopUpd())
                (scanner:
                    init()
                    setCycle(Fwd)
                )
                = seconds 3
            )
            (case 21
                (lifeForm:
                    init()
                    setCycle(Fwd)
                )
                = seconds 5
            )
            (case 22
                (scanner:dispose())
                (alienWord:init())
                = seconds 3
            )
            (case 23
                (alienText:
                    init()
                    setMotion(MoveTo 221 127 self)
                )
            )
            (case 24
                (alienText:
                    posn(221 127)
                    stopUpd()
                )
                (alienWord:
                    setCel(1)
                    stopUpd()
                )
                = cycles 15
            )
            (case 25
                (send global5:eachElementDo(91))
                = global17 0
                (send global2:drawPic(153))
                (pod3:
                    init()
                    setMotion(MoveTo 87 156 self)
                )
                (light:init())
                (hand:init())
            )
            (case 26
                (send global5:eachElementDo(91))
                (send global2:drawPic(154 3))
                (pod2:
                    init()
                    setMotion(MoveTo 184 169 self)
                )
                (hatch:init())
            )
            (case 27
                (beamSound:play())
                (pod2:
                    setStep(1 1)
                    setMotion(MoveTo 137 169 self)
                )
                = cycles 2
            )
            (case 28
                (beam:
                    init()
                    stopUpd()
                )
                (send gLongSong:stop())
            )
            (case 29
                = cycles 20
            )
            (case 30
                (pod2:setMotion(MoveTo 137 80 self))
            )
            (case 31
                = cycles 2
            )
            (case 32
                (beam:dispose())
                (self:setScript(closeHatchScript self))
            )
            (case 33
                (pod2:dispose())
                = seconds 2
            )
            (case 34
                Display(1 1 106 250 101 1 100 35 120 105 300 102 14)
                = seconds 12
            )
            (case 35
                = local2 2
            )
        )
    )

)
(instance openHatchScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (hatch:stopUpd())
                = seconds 5
            )
            (case 1
                (hatch:setCycle(End self))
            )
            (case 2
                (hatch:stopUpd())
            )
            (case 3
                (self:dispose())
            )
        )
    )

)
(instance closeHatchScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (hatch:
                    setPri(8)
                    setCycle(Beg self)
                )
            )
            (case 1
                (hatch:stopUpd())
                (self:dispose())
            )
        )
    )

)
(instance handScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                = cycles 2
            )
            (case 1
                (hand:
                    setLoop(1)
                    setCel(0)
                    setCycle(0)
                    setMotion(MoveTo 121 191 self)
                )
            )
            (case 2
                (hand:setCycle(End self))
            )
            (case 3
                (light:setCycle(Fwd))
                = seconds 2
            )
            (case 4
                (hand:
                    setCel(0)
                    setMotion(MoveTo 169 191 self)
                )
            )
            (case 5
                = cycles 15
            )
            (case 6
                (hand:setCycle(End self))
            )
            (case 7
                (hand:
                    setCel(0)
                    setMotion(MoveTo 121 223)
                )
            )
        )
    )

)
(instance podOutline of Prop
    (properties
        view 1
        cel 1
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(1)
            setCel(1)
            setPri(5)
            posn(127 97)
        )
    )

)
(instance lifeForm of Prop
    (properties
        view 2
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(2)
            setPri(5)
            posn(152 86)
        )
    )

)
(instance scanner of Prop
    (properties
        view 2
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(3)
            setPri(5)
            posn(105 111)
        )
    )

)
(instance podImage of Prop
    (properties
        view 2
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(1)
            setPri(5)
            posn(111 97)
            cycleSpeed(1)
        )
    )

)
(instance hatch of Act
    (properties
        view 3
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors()
            setLoop(0)
            setCel(0)
            setPri(5)
            posn(108 102)
            setScript(openHatchScript)
        )
    )

)
(instance hand of Act
    (properties
        view 5
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors()
            posn(121 223)
            setLoop(1)
            setCel(0)
            setPri(6)
            setStep(8 8)
            setCycle(0)
            setScript(handScript)
        )
    )

)
(instance Scott of Act
    (properties
        view 601
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            ignoreActors(1)
            posn(160 100)
            setPri(4)
            setStep(12 12)
        )
    )

)
(instance Mark of Act
    (properties
        view 601
    )

    (method (init)
        (super:init())
        (self:
            setLoop(1)
            ignoreActors(1)
            posn(160 100)
            setPri(4)
            setStep(12 12)
        )
    )

)
(instance drip1 of Prop
    (properties
        view 926
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            setCel(0)
            posn(141 112)
            setPri(15)
            setCycle(Fwd)
        )
    )

)
(instance drip2 of Prop
    (properties
        view 926
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            setCel(9)
            posn(163 152)
            setPri(15)
            setCycle(Fwd)
        )
    )

)
(instance drip3 of Prop
    (properties
        view 926
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            setCel(2)
            posn(216 148)
            setPri(15)
            setCycle(Fwd)
        )
    )

)
(instance drip4 of Prop
    (properties
        view 926
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            setCel(4)
            posn(270 143)
            setPri(15)
            setCycle(Fwd)
        )
    )

)
(instance drip5 of Prop
    (properties
        view 926
    )

    (method (init)
        (super:init())
        (self:
            setLoop(0)
            setCel(6)
            posn(34 145)
            setPri(15)
            setCycle(Fwd)
        )
    )

)
(instance pod3 of Act
    (properties
        view 5
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors()
            setLoop(2)
            setPri(4)
            posn(191 52)
            setStep(5 2)
        )
    )

)
(instance light of Prop
    (properties
        view 5
        priority 6
    )

    (method (init)
        (super:init())
        (self:ignoreActors(1))
    )

)
(instance beam of View
    (properties
        view 4
    )

    (method (init)
        (super:init())
        (self:
            posn(110 189)
            setPri(6)
        )
    )

)
(instance pod2 of Act
    (properties
        view 3
    )

    (method (init)
        (super:init())
        (self:
            setLoop(1)
            ignoreActors(1)
            illegalBits(0)
            posn(320 169)
            setPri(7)
            setStep(2 1)
        )
    )

)
(instance pod of Act
    (properties
        view 1
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(0)
            setCel(0)
            setPri(4)
            posn(363 97)
            setStep(2)
        )
    )

)
(instance alienWord of Prop
    (properties
        view 2
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(4)
            setPri(6)
            posn(226 144)
            setCycle(Fwd)
        )
    )

)
(instance alienText of Act
    (properties
        view 2
    )

    (method (init)
        (super:init())
        (self:
            ignoreActors(1)
            setLoop(0)
            setPri(4)
            posn(221 205)
            setStep(-1 6)
        )
    )

)
(instance beamSound of Sound
    (properties
        number 87
        priority 5
    )
)
