/******************************************************************************
 SCI Template Game
 By Brian Provinciano
 ******************************************************************************
 titlescreen.sc
 Contains the title screen room.
 ******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 803)
/******************************************************************************/
(use "main")
(use "game")
(use "menubar")
(use "obj")
(use "cycle")
(use "user")
(use "controls")
(use "feature")
(local
ready2
clicked
)
/******************************************************************************/
(instance public TitleScreen of Rm
	(properties
		picture 80
	)
	(method (init)
        // Set up the title screen
		ProgramControl()
		= gProgramControl FALSE
		(send gGame:setSpeed(1))
		(SL:disable())
		(TheMenuBar:hide())

		(super:init())
		(self:setScript(RoomScript))

		(send gEgo:
			init()
			hide()
         )
        /**************************************************
         * Add the rest of your initialization stuff here *
         **************************************************/
     = gTimeSeconds 9

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

    (method (changeState newState)

  = state newState
  (switch (state)
    (case 0
   (send gGame:setSpeed(5))
    (aShip: init() setMotion(MoveTo 16 140 RoomScript))
    )
    (case 1
     Display("Myon Bysa, yhes Shitdoka 3BX. Eraquiste" dsCOORD 15 5 dsCOLOUR clNAVY dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("andranda pigty." dsCOORD 15 15 dsCOLOUR clNAVY dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("Moon Base, this is Shuttle 3BX. Requesting" dsCOORD 15 165 dsCOLOUR clNAVY dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("landing clearance." dsCOORD 15 175 dsCOLOUR clNAVY dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("Myon Bysa, yhes Shitdoka 3BX. Eraquiste" dsCOORD 14 4 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("andranda pigty." dsCOORD 14 14 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("Moon Base, this is Shuttle 3BX. Requesting" dsCOORD 14 164 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("landing clearance." dsCOORD 14 174 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
    (aShip: init() setMotion(MoveTo 160 140 RoomScript))
    )
    (case 2
    DrawPic(80)
    (aShip: init() setMotion(MoveTo 295 140 RoomScript))
     Display("Shitdoka 3BX, eta Myon Bysa. Re yted" dsCOORD 15 5 dsCOLOUR clNAVY dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("kangy tevar 3." dsCOORD 15 15 dsCOLOUR clNAVY  dsBACKGROUND clTRANSPARENT dsFONT 900)
    Display("Shuttle 3BX, this is Moon Base. You may" dsCOORD 15 165 dsCOLOUR clNAVY  dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("use tower 3." dsCOORD 15 175 dsCOLOUR clNAVY  dsBACKGROUND clTRANSPARENT dsFONT 900)

     Display("Shitdoka 3BX, eta Myon Bysa. Re yted" dsCOORD 14 4 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("kangy tevar 3." dsCOORD 14 14 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
    Display("Shuttle 3BX, this is Moon Base. You may" dsCOORD 14 164 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
     Display("use tower 3." dsCOORD 14 174 dsCOLOUR clBLUE dsBACKGROUND clTRANSPARENT dsFONT 900)
    )
    (case 3
    DrawPic(80)
    (aShip: init() setMotion(MoveTo 320 140 RoomScript))
    )
    (case 4
   (send gRoom:newRoom(804))
      )
    )
    )

	(method (handleEvent pEvent)
      (var button2)
        (super:handleEvent(pEvent))
        (if( not (send pEvent:claimed) )
			(if( (== (send pEvent:type) evKEYBOARD))
                /******************************************
                 * If the title screen has music, fade it *
                 ******************************************/
				//(send gTheMusic:fade())

                // End the title screen, start the game

        = button2 Print(
  "Are you sure you want to cancel the intro. It includes some useful clues."
  #title "Make your selection:"
  #font 999
  #button " No " 1
  #button " Yes " 0
)
(if(== button2 0)
 (send gRoom:newRoom(INITROOMS_SCRIPT))
 return
)(else
return

))))

(method(doit)
(if(== gTimeSeconds 7)
= clicked 0
)
)
)

(instance aShip of Act
(properties
view 333
x 1
y 140
))


