%beginning
procedure CentreFont (s : string, x, y, f, clr : int)
var w : int := Font.Width (s, f)
Font.Draw (s, x - w div 2, y, f, clr)
end CentreFont
var announceFont : int := Font.New ("courier:20:bold")
var crazy : string
for t : 16 .. 31
locate (6, 7)
color (t)
put chr (4), " A Ben & Duncan Production", chr (4)
delay (50)
locate (8, 12)
color (t)
end for
delay (200)
color (green)
locate (8, 14)
crazy := "YEE OLD ICE CREAM SHOP!"
for p : 1 .. 23
put crazy (p) ..
delay (90)
end for
cls
%sky
drawfillbox (0,0, 640, 400)
% ground
drawfillbox (0, 0, 640, 100, 19)
drawbox (0, 0, 640, 100, grey)
drawfillbox (250, 150, 550, 300, black)
drawbox (250, 150, 550, 300, grey)
%shop
colorback (7)
drawfillbox (200, 50, 600, 350, yellow)
drawbox (200, 50, 600, 350, grey)
drawfillbox (250, 150, 550, 300, black)
drawbox (250, 150, 550, 300, grey)
drawline (200, 350, 210, 355, grey)
drawfill (201, 353, yellow, black)
drawline (590, 360, 610, 360, grey)
drawline (610, 360, 600, 350, grey)
drawline (610, 360, 610, 70, grey)
drawline (610, 70, 600, 50, grey)
drawline (250, 150, 260, 160, grey)
drawline (260, 160, 550, 160, grey)
drawfillbox (590, 350, 210, 390, purple)
drawbox (590, 350, 210, 390, grey)
CentreFont ("B & D ICE CREAM CENTRAL", maxx div 1.6, maxy div 1.1, announceFont, yellow)
% Person
drawfillbox (395, 230, 405, 225, 44)
drawbox (395, 230, 405, 225, grey)
drawfilloval (400, 250, 15, 20, 44)
drawoval (400, 250, 15, 20, grey)
drawfillbox (375, 185, 425, 225, 127)
drawbox (375, 185, 425, 225, grey)
drawfillbox (375, 220, 335, 210, 127)
drawbox (375, 220, 335, 210, grey)
drawfillbox (335, 210, 335, 240, 127)
drawbox (335, 210, 335, 240, grey)
delay (3000)
%question1....asks the user if they want to come to the ice cream shop.
colorback (7)
var ans1 : string
put "Do you want to proceed to the ice cream shop? y/n?"
get ans1
if ans1 = "n" then
cls
elsif ans1 = "y" then
cls
drawfillbox (25, 25, 615, 375, yellow)
else
cls
put "invalid answer please press the [x] on the top-right corner of your screen and try again"
end if
|