/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 225)
/******************************************************************************/
(use "main")
(use "game")
(use "menubar")
(use "obj")
(use "cycle")
(use "user")
(use "controls")
(use "feature")
/******************************************************************************/
(instance public rm225 of Rm
	(properties
		picture 227
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(150 130)
					loop(1)
				)
			)
		)

		SetUpEgo()

	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)

	(method (doit)
		(super:doit())
		// code executed each game cycle
	)

	(method (handleEvent pEvent)
		(super:handleEvent(pEvent))
		// handle Said's, etc...
	(if( not (send pEvent:claimed) )
			(if( (== (send pEvent:type) evKEYBOARD) and (== (send pEvent:message) $3C00) )
				ToggleSound()
			)(else
                /******************************************
                 * If the title screen has music, fade it *
                 ******************************************/
				//(send gTheMusic:fade())

                // End the title screen, start the game
			(send gRoom:newRoom(INITROOMS_SCRIPT))
		    )
		)
	)
(method (changeState newState)
		(= state newState)
		(switch (newState)
			(case 0
				= seconds 1


			)
			(case 1
				= cycles 10
			(send (View:new()):view(225)loop(0)cel(0)posn(12 38)setPri(15)ignoreActors()addToPic())

			)
			(case 2
				= cycles 20
				(send (View:new()):view(225)loop(1)cel(0)posn(36 42)setPri(15)ignoreActors()addToPic())

			)
			(case 3
				= cycles 30
					(send (View:new()):view(225)loop(2)cel(0)posn(60 40)setPri(15)ignoreActors()addToPic())



			)
			(case 4
				= cycles 40
					(send (View:new()):view(225)loop(3)cel(0)posn(84 42)setPri(15)ignoreActors()addToPic())



			)
			(case 5
				= cycles 50
					(send (View:new()):view(225)loop(4)cel(0)posn(104 39)setPri(15)ignoreActors()addToPic())



			)
			(case 6
				= cycles 60
					(send (View:new()):view(225)loop(5)cel(0)posn(124 43)setPri(15)ignoreActors()addToPic())



			)
			(case 7
				= cycles 70
					(send (View:new()):view(225)loop(6)cel(0)posn(145 40)setPri(15)ignoreActors()addToPic())



			)
			(case 8
				= cycles 85
					(send (View:new()):view(225)loop(7)cel(0)posn(195 38)setPri(15)ignoreActors()addToPic())



			)
			(case 9
				= cycles 93
					(send (View:new()):view(225)loop(8)cel(0)posn(218 42)setPri(15)ignoreActors()addToPic())



			)
			(case 10
				= cycles 102
					(send (View:new()):view(225)loop(5)cel(0)posn(239 43)setPri(15)ignoreActors()addToPic())



			)
			(case 11
				= cycles 111
					(send (View:new()):view(225)loop(9)cel(0)posn(259 39)setPri(15)ignoreActors()addToPic())



			)
			(case 12
				= cycles 120
					(send (View:new()):view(225)loop(3)cel(0)posn(284 40)setPri(15)ignoreActors()addToPic())



			)
			(case 13
				= cycles 130
					(send (View:new()):view(225)loop(10)cel(0)posn(304 42)setPri(15)ignoreActors()addToPic())



			)
	)
)

)
/******************************************************************************/

