(include "sci.sh")
(use "Main")
(use "SQRoom")
(use "n958")
(use "User")
(use "Obj")
(script 1)


(local
    local0
    local1

)
(instance public rm001 of SQRoom
    (properties
        picture 106
    )

    (method (init)
        (super:init())
        Load(rsPIC 1)
        proc958_0(135 68 69)
        (self:
            setScript(rmScript)
            setRegions(707)
        )
    )

)
(instance rmScript of Script
    (properties)

    (method (doit)
        (super:doit())
        (if ((== state 1) and (== (send gLongSong:prevSignal) 10))
            (self:cue())
        )
    )


    (method (changeState newState)
        (var temp0[3])
        (switch (= state newState)
            (case 0
                (send gLongSong:
                    loop(-1)
                    playBed()
                )
                = cycles 2
            )
            (case 1
            )
            (case 2
                (send global2:drawPic(1))
                = register 200
                = cycles 2
            )
            (case 3
                Animate((send global5:elements) 0)
                (while (--register and (== global13 global11))
                    (if (== register 150)
                        = local1 proc0_12(" 1991 Sierra On-Line, Inc." 67 1 177 70 316 28 proc0_18(global157 global156) 29 global129 30 1 33 68)
                    )
                    (User:doit())
                    Palette(6 160 191 -1)
                    Palette(6 128 159 -1)
                )
                (send global2:drawPic(803 30))
                (if (== global11 global13)
                    (send global2:newRoom(6))
                )
            )
        )
    )

)
