setscreen ("graphics:800,650")
drawfill (1, 1, black, red)
var x, y, x2, y2 : int
x2 := 600
y2 := 450
drawfillbox (maxx, 0, 0, 300, green)
for i : 1 .. 200
randint (x, 0, maxx)
randint (y, 300, maxy)
drawdot (x, y, white)
end for
% chimney
drawfillbox (130, 480, 165, 380, 23)
drawline (130, 480, 130, 410, grey) %left
drawline (155, 480, 155, 439, grey) %right
drawline (165, 450, 165, 480, grey) %far right
drawline (165, 480, 160, 495, grey)
% front of house
drawfillbox (120, 400, 320, 211, red)
% lines for roof
drawline (100, 380, 215, 500, grey) %left
drawline (340, 380, 215, 500, grey) %right
drawline (120, 400, 320, 400, grey) %bottom
drawline (420, 440, 300, 550, grey) %far right
drawline (215, 500, 300, 550, grey) %top
drawline (340, 380, 420, 440, grey) %ledge
drawfill (360, 460, 115, grey)
% lines for left and right side of house
drawline (120, 211, 120, 400, grey) %left
drawline (320, 211, 320, 400, grey) %right
% line for bottom of house
drawline (120, 210, 320, 210, grey)
% filled in front roof
drawfill (250, 410, 115, grey)
% right side of house
drawline (320, 210, 400, 290, grey) %bottom
drawline (400, 291, 400, 425, grey) %right
drawfill (340, 350, red, grey) %color
% door
drawfillbox (195, 212, 240, 280, brown)
% door border
drawline (195, 280, 195, 212, black)
drawline (240, 280, 240, 212, black)
drawline (195, 212, 240, 212, black)
drawline (195, 280, 240, 280, black)
% door knob
drawfilloval (199, 247, 2, 2, black)
% windows
drawfillbox (140, 320, 180, 360, black)
drawfillbox (250, 320, 290, 360, black)
% left window border
drawline (140, 360, 180, 360, white)
drawline (140, 320, 180, 320, white)
drawline (180, 320, 180, 360, white)
drawline (140, 320, 140, 360, white)
% right window border
drawline (250, 360, 290, 360, white)
drawline (250, 320, 290, 320, white)
drawline (290, 320, 290, 360, white)
drawline (250, 320, 250, 360, white)
% driveway
var house := Pic.New (0, 0, maxx, maxy)
% cloud 1
process cl1
loop
drawfilloval (120, 520, 20, 20, 23)
drawfilloval (130, 530, 15, 15, 22)
drawfilloval (110, 525, 15, 15, 21)
delay (500)
drawfilloval (120, 520, 20, 20, black)
drawfilloval (130, 530, 15, 15, black)
drawfilloval (110, 525, 15, 15, black)
delay (1000)
end loop
end cl1
% cloud 2
process cl2
delay (1000)
loop
drawfilloval (70, 540, 20, 20, 23)
drawfilloval (80, 550, 15, 15, 21)
drawfilloval (55, 555, 15, 15, 22)
delay (500)
drawfilloval (70, 540, 20, 20, black)
drawfilloval (80, 550, 15, 15, black)
drawfilloval (55, 555, 15, 15, black)
delay (1000)
end loop
end cl2
% cloud 3
process cl3
delay (500)
loop
drawfilloval (20, 577, 20, 20, 23)
drawfilloval (30, 588, 15, 15, 21)
drawfilloval (5, 585, 15, 15, 22)
delay (500)
drawfilloval (20, 577, 20, 20, black)
drawfilloval (30, 588, 15, 15, black)
drawfilloval (5, 585, 15, 15, black)
delay (1000)
end loop
end cl3
fork cl1
fork cl2
fork cl3
process mn
setscreen ("offscreenonly")
loop
Pic.Draw (house, 0, 0, picCopy)
drawfilloval (x2, y2 + 30, 50, 50, 30)
drawfilloval (x2 - 20, y2 + 10, 5, 5, 28)
drawfilloval (x2 - 11, y2 + 30, 5, 5, 26)
drawfilloval (x2 - 30, y2 + 29, 5, 4, 28)
drawfilloval (x2 - 4, y2, 4, 5, 27)
drawfilloval (x2 + 26, y2 + 40, 5, 2, 29)
delay (1000)
x2 -= 1
y2 += 1
exit when x2 = 148
View.Update
end loop
end mn
fork mn
% bricks
var xx := 320
var yy := 400
var xy, yx : int := 0
loop
drawline (xx, xy + 215, yy, yx + 295, grey)
xy += 5
yx += 5
exit when xy = 345
exit when yx = 135
end loop
drawline (xx, 350, 380, 410, grey)
drawline (xx, 355, 360, 395, grey)
drawline (xx, 360, 340, 380, grey)
drawline (xx, 365, 337, 382, grey)
drawline (xx, 370, 334, 384, grey)
drawline (xx, 375, 332, 387, grey)
drawline (xx, 380, 330, 390, grey)
drawline (xx, 385, 327, 392, grey)
drawline (xx, 390, 324, 394, grey)
|