var x, y, a, b, countx, county, c, c2 : int
var xstar, ystar : int
setscreen ("graphics:max;max")
colourback (blue)
c := blue
c2:=5
countx := 10
county := 7
a := 465
b := 120
x := 1000
y := 300
var x1 : array 1 .. 4 of int := init (300, 450, 377, 250)
var y1 : array 1 .. 4 of int := init (250, 250, 350, 350)
cls
loop
View.Set ("offscreenonly")
drawfillbox (300, 100, 450, 250, 65) %The box of the house
drawfillbox (315, 190, 345, 220, white) %The left window
drawfillbox (400, 190, 430, 220, white) %The Right Window
Draw.FillPolygon (x1, y1, 3, red) %The roof of the house
drawfillbox (362, 280, 387, 305, white) % The window on the roof
drawfillbox (355, 100, 390, 150, 114) %The door
%Border of Left window
Draw.ThickLine (315, 190, 315, 220, 5, 114) %The right side
Draw.ThickLine (315, 190, 345, 190, 5, 114) %The low side
Draw.ThickLine (315, 220, 345, 220, 5, 114) %The high side
Draw.ThickLine (345, 220, 345, 190, 5, 114) %The left side
Draw.ThickLine (330, 220, 330, 190, 5, 114) %The middle
Draw.ThickLine (315, 205, 345, 205, 5, 114) %The middle
%The Chimney
drawfillbox (435, 250, 410, 330, red)
%Trees
Draw.FillMapleLeaf (170, 100, 135, 240, green)
%Border of Right Window
Draw.ThickLine (400, 190, 400, 220, 5, 114) %The right side
Draw.ThickLine (400, 190, 430, 190, 5, 114) %The low side
Draw.ThickLine (400, 220, 430, 220, 5, 114) %The high side
Draw.ThickLine (430, 220, 430, 190, 5, 114) %The left side
Draw.ThickLine (415, 220, 415, 190, 5, 114) %The middle
Draw.ThickLine (400, 205, 430, 205, 5, 114) %The middle
%The Roof Window
Draw.ThickLine (362, 280, 387, 280, 5, 114) %The low side
Draw.ThickLine (362, 280, 362, 305, 5, 114) %The left side
Draw.ThickLine (387, 280, 387, 305, 5, 114) %The Right Side
Draw.ThickLine (387, 305, 362, 305, 5, 114) %The top side
Draw.ThickLine (362, 293, 387, 293, 5, 114) %The middle
%Grass
drawfillbox (1, 1, 1100, 100, brightgreen)
%The driveway
drawfillbox(450,100,555,1,88)
%The Garage
drawfillbox (450, 185, 555, 100, 23)
drawfillbox (465, 170, 540, 100, 9)
drawfillbox (a, b, 540, 100, black)
a := a
b := b + 5
exit when b > 170
View.Update
delay (150)
cls
colourback (c)
drawfilloval (x, y, 20, 20, yellow)
x := x - countx
y := y + county
if b > 170
then
drawfillbox (475, 120, 480, 125, white)
drawfillbox (520, 120, 525, 125, white)
end if
end loop
loop
View.Set ("offscreenonly")
drawfillbox (300, 100, 450, 250, 65) %The box of the house
drawfillbox (315, 190, 345, 220, white) %The left window
drawfillbox (400, 190, 430, 220, white) %The Right Window
Draw.FillPolygon (x1, y1, 3, red) %The roof of the house
drawfillbox (362, 280, 387, 305, white) % The window on the roof
drawfillbox (355, 100, 390, 150, 114) %The door
%Border of Left window
Draw.ThickLine (315, 190, 315, 220, 5, 114) %The right side
Draw.ThickLine (315, 190, 345, 190, 5, 114) %The low side
Draw.ThickLine (315, 220, 345, 220, 5, 114) %The high side
Draw.ThickLine (345, 220, 345, 190, 5, 114) %The left side
Draw.ThickLine (330, 220, 330, 190, 5, 114) %The middle
Draw.ThickLine (315, 205, 345, 205, 5, 114) %The middle
%The Chimney
drawfillbox (435, 250, 410, 330, red)
%Trees
Draw.FillMapleLeaf (170, 100, 135, 240, green)
%Border of Right Window
Draw.ThickLine (400, 190, 400, 220, 5, 114) %The right side
Draw.ThickLine (400, 190, 430, 190, 5, 114) %The low side
Draw.ThickLine (400, 220, 430, 220, 5, 114) %The high side
Draw.ThickLine (430, 220, 430, 190, 5, 114) %The left side
Draw.ThickLine (415, 220, 415, 190, 5, 114) %The middle
Draw.ThickLine (400, 205, 430, 205, 5, 114) %The middle
%The Roof Window
Draw.ThickLine (362, 280, 387, 280, 5, 114) %The low side
Draw.ThickLine (362, 280, 362, 305, 5, 114) %The left side
Draw.ThickLine (387, 280, 387, 305, 5, 114) %The Right Side
Draw.ThickLine (387, 305, 362, 305, 5, 114) %The top side
Draw.ThickLine (362, 293, 387, 293, 5, 114) %The middle
%Grass
drawfillbox (1, 1, 1100, 100, brightgreen)
%The Garage
drawfillbox (450, 185, 555, 100, 23)
drawfillbox (465, 170, 540, 100, 9)
drawfillbox (a, b, 540, 100, black)
drawfillbox (475, 120, 480, 125, white)
drawfillbox (520, 120, 525, 125, white)
View.Update
delay (150)
colourback (c)
cls
drawfilloval (x, y, 20, 20, yellow)
exit when x = 0
x := x - countx
y := y + county
if y > 500 then
county := 0
if x < 250 then
county := -7
end if
end if
end loop
x := 2
y := 300
countx := 10
county := 7
loop
View.Set ("offscreenonly")
drawfillbox (300, 100, 450, 250, 65) %The box of the house
drawfillbox (315, 190, 345, 220, white) %The left window
drawfillbox (400, 190, 430, 220, white) %The Right Window
Draw.FillPolygon (x1, y1, 3, red) %The roof of the house
drawfillbox (362, 280, 387, 305, white) % The window on the roof
drawfillbox (355, 100, 390, 150, 114) %The door
%Border of Left window
Draw.ThickLine (315, 190, 315, 220, 5, 114) %The right side
Draw.ThickLine (315, 190, 345, 190, 5, 114) %The low side
Draw.ThickLine (315, 220, 345, 220, 5, 114) %The high side
Draw.ThickLine (345, 220, 345, 190, 5, 114) %The left side
Draw.ThickLine (330, 220, 330, 190, 5, 114) %The middle
Draw.ThickLine (315, 205, 345, 205, 5, 114) %The middle
%The Chimney
drawfillbox (435, 250, 410, 330, red)
%Trees
Draw.FillMapleLeaf (170, 100, 135, 240, green)
%Border of Right Window
Draw.ThickLine (400, 190, 400, 220, 5, 114) %The right side
Draw.ThickLine (400, 190, 430, 190, 5, 114) %The low side
Draw.ThickLine (400, 220, 430, 220, 5, 114) %The high side
Draw.ThickLine (430, 220, 430, 190, 5, 114) %The left side
Draw.ThickLine (415, 220, 415, 190, 5, 114) %The middle
Draw.ThickLine (400, 205, 430, 205, 5, 114) %The middle
%The Roof Window
Draw.ThickLine (362, 280, 387, 280, 5, 114) %The low side
Draw.ThickLine (362, 280, 362, 305, 5, 114) %The left side
Draw.ThickLine (387, 280, 387, 305, 5, 114) %The Right Side
Draw.ThickLine (387, 305, 362, 305, 5, 114) %The top side
Draw.ThickLine (362, 293, 387, 293, 5, 114) %The middle
%Grass
drawfillbox (1, 1, 1100, 100, brightgreen)
%The Garage
drawfillbox (450, 185, 555, 100, 23)
drawfillbox (465, 170, 540, 100, 9)
drawfillbox (a, b, 540, 100, black)
a := a
b := b - c
if b = 100 then
c := 0
end if
View.Update
delay (150)
colourback (black)
cls
drawfilloval (x, y, 20, 20, white)
exit when x > 1000
x := x + countx
y := y + county
if y > 500 then
county := 0
if x > 750 then
county := -7
end if
end if
end loop
|