Вот код программы:
Uses crt,Graph;
Var Driver,Mode:integer;
top,clip:boolean;
size,x1,y1,R,Dx,Dy,Dm,Dn,z,g:integer;
p:pointer;
procedure myach(x1,y1,R:word);
Begin
{x1 i y1 - koordinaty centra myacha}
begin
x1:=GetMaxX div 2; y1:=GetMaxY-50; R:=10;
SetFillStyle(1,2);
FloodFill(5,100,2);
Circle(x1,y1,R);
end;
{ДВИЖЕНИЕ МЯЧА} {?????????????????????????????????}
begin
{koordinaty kvadrata v kotorom naxoditsya myach}
Dx:=x1-R; Dy:=y1-R; Dm:=x1+R; Dn:=y1+R;
ImageSize(Dx,Dy,Dm,Dn);
GetMem(p,size);
GetImage(Dx,Dy,Dm,Dn,p^);
{koordinati levogo verxnego ugla kvadrata, kuda peremestitsya myach}
z:=Dx+20; g:=Dy;
PutImage(z,g,p^,XorPut);
end;
readln;
Freemem(p,size);
End;
procedure kegli(top:boolean);
Begin
SetFillStyle(1,4);
top:=true;
Bar3D(320,20,330,50,2,top);
End;
BEGIN
{naxodim modul Graph}
Driver:=Detect;
InitGraph(Driver,Mode,'C:\pascal\pascal\minimal');
if GraphResult<>0 then
begin
writeln('!!!ne udalos nayti modul graph!!!');
exit;
end
{}
else
begin
clip:=true;
myach(x1,y1,R);
kegli(top);
end;
repeat until keypressed;
END.