All pastes #244255 Raw Edit

trivia

public text v1 · immutable
#244255 ·published 2006-11-09 15:37 UTC
rendered paste body
View.Set ("graphics:max,max")

var frontscreen : int := Pic.FileNew ("frontscreen.jpg")
var mx, my, mb : int
var instructions : int := Pic.FileNew ("instructions.jpg")
var level1 : int := Pic.FileNew ("level1.jpg")
var level2:int:=Pic.FileNew("level2.jpg")
var level3:int:= Pic.FileNew ("level3.jpg")
var level4:int:= Pic.FileNew ("level4.jpg")
var score :int :=0
var answer:string




proc up
  loop
        mousewhere (mx, my, mb)
            exit when mb = 0
        end loop


end up



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%drawbox (590, 100, 850, 30, red)


loop
    Pic.Draw (frontscreen, 0, -50, picCopy)
    mousewhere (mx, my, mb)
    if mb = 1 and mx > 175 and my > 30 and mx < 270 and my < 100 then
        Pic.Draw (level1, 0, -50, picCopy)
      up
      
        exit
    
    elsif mb = 1 and mx > 590 and my > 30 and mx < 850 and my < 100 then
        cls
up
        Pic.Draw (instructions, 0, -50, picCopy)
        loop
        mousewhere (mx, my, mb)
            exit when mb = 1
        end loop
up
    end if
end loop
%%level1%%%%%%%%%%
loop

get answer
if answer = "b" then
score:=score+1
exit
else 
score:=score+0
exit
end if

end loop
%%level2%%%%%%%%%
Pic.Draw (level2, 0, -50, picCopy)

loop

get answer
if answer = "d" then
score:=score+1
exit
else 
score:=score+0
exit
end if

end loop
cls 
put score