(include "sci.sh")
(use "Main")
(use "n940")
(use "Sound")
(use "Game")
(use "Obj")
(script 707)


(local
    local0

)
(class intro of Rgn
    (properties
        script 0
        number 0
        timer 0
        keep 0
        initialized 0
        lookStr 0
        iconBar 0
    )

    (method (init)
        (send gIconBar:disable())
        (super:init())
        (send gSq4KeyDownHandler:addToFront(self))
        (send gSq4MouseDownHandler:addToFront(self))
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:type) and (== gNumber gTheGNumber))
            (send pEvent:claimed(1))
            (Sound:pause(1))
            (switch (proc940_0("Would you like to skip\nthe introduction or\nwatch the whole thing?" 67 100 60 101 81 "Skip it" 0 101 81 "Watch it" 1 101 81 "Restore a Game" 2))
                (case 0
                    Palette(4 8 15 100)
                    (send global2:newRoom(59))
                )
                (case 1
                    (Sound:pause(0))
                )
                (case 2
                    Palette(4 8 15 100)
                    (Sound:pause(0))
                    (send gGame:restore())
                )
            )
        )
    )


    (method (newRoom param1)
        = keep proc999_5(param1 1 6 9 10 15 16 17 19 20 21)
        = initialized 0
        (if (not keep)
            (send gIconBar:enable())
        )
        (send gSq4KeyDownHandler:delete(self))
        (send gSq4MouseDownHandler:delete(self))
    )

)
