(version 2)
(include "sci.sh")
(exports
    0 actBreak
)
(use "Main")
(use "FPRoom")
(use "Timer")
(use "Obj")
(script 26)



(instance public actBreak of FPRoom
    (properties
        style $000a
    )

    (method (init)
        (send gIconBar:disable(0 1 2 3 4 5 6 7))
        (switch (global120)
            (case 1
                proc0_9(230)
                (send gGameMusic1:
                    number(global135)
                    loop(-1)
                    play()
                )
                = global119 1
                proc0_3(18)
                (self:picture(143))
                proc0_3(52)
            )
            (case 2
                proc0_9(250)
                (send gGameMusic2:
                    number(600)
                    loop(-1)
                    play()
                )
                = global119 8
                = global139 0
                = global138 0
                (send gEgo:
                    x(260)
                    y(106)
                    setHeading(180)
                    put(50)
                    stopUpd()
                )
                = global123 1
                proc0_3(34)
                proc0_4(87)
                proc0_4(84)
                (send (ScriptID(0 13)):setReal(ScriptID(0 13) 0 5))
                (self:picture(144))
                proc0_4(52)
            )
            (case 3
                proc0_9(630)
                (send gGameMusic1:
                    number(630)
                    loop(-1)
                    play()
                )
                = global138 0
                = global119 16
                proc0_4(87)
                proc0_3(105)
                (send gEgo:
                    x(148)
                    y(118)
                    setHeading(90)
                    stopUpd()
                )
                proc0_4(87)
                PalVary(pvUNINIT)
                (self:picture(145))
            )
            (case 4
                (if (<> gGNumber 630)
                    (send gGameMusic1:
                        number(638)
                        loop(-1)
                        play()
                    )
                )
                proc0_9(240)
                = global138 0
                = global119 20
                (send gEgo:
                    put(2)
                    put(6)
                    put(10)
                    put(38)
                    put(51)
                    put(52)
                    put(11)
                )
                (send gIconBar:enable())
                proc0_4(87)
                (self:picture(146))
            )
            (case 5
                proc0_4(1)
                (send gGameMusic1:
                    number(654)
                    loop(-1)
                    play()
                )
                (self:picture(147))
            )
        )
        (super:init())
        (send ((Timer:new())):setReal(self 5))
    )


    (method (cue)
        (switch (global120)
            (case 1
                (send gGameMusic1:fade(63 5 1 0))
                (send global2:newRoom(230))
            )
            (case 2
                (send gGameMusic2:fade(80 5 1 0))
                (send global2:newRoom(250))
            )
            (case 3
                (send gGameMusic2:fade(80 5 1 0))
                (send global2:newRoom(630))
            )
            (case 4
                (send global2:newRoom(240))
            )
            (case 5
                (send global2:setScript(sEpilogue))
            )
        )
    )

)
(instance sEpilogue of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                (send global2:drawPic(780))
                = cycles 10
            )
            (case 1
                (send gFpMessager:say(1 0 0 0 self))
            )
            (case 2
                (send gGameMusic1:fade(0 6 2 1))
                (send global2:newRoom(170))
                (self:dispose())
            )
        )
    )

)
