home *** CD-ROM | disk | FTP | other *** search
- program rimbey;
- var
- xr,px,py,x,y,r,xi,yi,k:integer;
- const
- xm=639;
- ym=199;
- procedure fast(a,b,c,d,e:integer);external 'fastest.bin';
- procedure fastarc(x,y,color:integer);
- var i,j,k:integer;
- {$I fastarc.inc}
- begin
- for i:=sdata to edata do
- with data[i] do
-
- {if y+i>=0 then if y+i<=ym then} {vertical clipping code commented out}
-
- {if (x+x1<0) or (x+x2>xm) then
- begin
- j:=x+x1;if j<0 then j:=0;
- k:=x+x2;if k>xm then k:=xm;
- if j<=k then fast(j,y+i,k,y+i,color)
- end
- else} {horizontal clipping code commented out}
-
- fast(x+x1,y+i,x+x2,y+i,color)
- end;
- begin
- HiRes;
- x:=round(xm/2); y:=round(ym/2);
- xi:=6; yi:=7; r:=10;xr:=23; {use 23 instead of 10 due to aspect ratio}
- while not keypressed do begin
- fastarc(x,y,1); {draws it}
- px:=x;py:=y;
- x:=x+xi; y:=y+yi;
- if x>xm-xr then begin x:=xm-xr; xi:=-xi; end;
- if x<xr then begin x:=xr; xi:=-xi; end;
- if y>ym-r then begin y:=ym-r; yi:=-yi; end;
- if y<r then begin y:=r; yi:=-yi; end;
- {delay(50);} {add in your own delay, if needed, to have image last}
- fastarc(px,py,0); {wipes it out}
- end;
- textmode;
- end.
-