home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rat's Nest 1
/
ratsnest1.iso
/
incoming
/
pas_sors.arj
/
KRU$H02.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-12-17
|
4KB
|
82 lines
program bullshit_bouncy;
uses graph, crt;
var max, may, x, y, a, b, count, old : integer;
{ This is version 0.01ßeta of Bull$hit_Bouncy, }
{ and is brought to you by Kru$H Productions. }
{ It is a very simple piece of Pascal. }
{ You may distribute this program as much as }
{ you wish, although I would appreciate it if }
{ you would not distribute it after it has been }
{ modified. -Kru$H }
procedure initialize; {This procedure initializes }
var GDriv : integer; {the Graphics mode }
GMode : integer; {... }
begin {... }
clrscr; randomize; {... }
GDriv := Detect; {... }
InitGraph (Gdriv, Gmode, ''); {... }
end;
procedure draw_screen;
var oldx : array [0..500] of integer;
oldy : array [0..500] of integer;
begin
max:= GetMaxX;
may:= GetMaxY;
x:= (GetMaxX div 2);
y:= (GetMaxY div 2);
count:= 0;
repeat
{ oldx[500] := x ; oldy[500] := y; } {Use this if you want to clear }
{ for old := 0 to 499 do begin } {old ellipses. It takes in all }
{ oldx[old] := oldx[(old+1)]; } {of the old coordinates and }
{ oldy[old] := oldy[(old+1)]; } {moves them one step towards }
{ end; {the number zero. }
SetColor (random(GetMaxColor)); {Set a new color. }
Ellipse (x,y, 0, 360, 30, 30); {Draw next ellipse. }
OutTextXY (25,10,' Circle Magic '); {Type all "necessary" text, }
OutTextXY ((max-190),(may-20), {in current color. }
'by: Kru$H Productions'); {... }
MoveTo ( 15, 30); {Draw borders, }
LineTo ((max-15), 30); {also in current color }
LineTo ((max-15),(may-30)); {... }
LineTo ( 15,(may-30)); {... }
LineTo ( 15, 30); {... }
{ SetColor (Black); } {Use this if you want to clear }
{ SetFillStyle(SolidFill, Black); } {old ellipses. It makes a new }
{ FillEllipse(oldx[1],oldy[1],30,30); } {black ellipse over the old 1. }
x := x-5+ (random(11)); {New coordinates for the }
y := y-5+ (random(11)); {next ellipse. }
if x<55 then x:=55; {Stop ellipses from going past }
if x>(max-55) then x :=(max-55); {the borders of the screen. }
if y<75 then y:=75; {... }
if y>(may-75) then y :=(may-75); {... }
{ count:=count+1 } {Add one to counter.}
{ if count> 25000 then begin } {Use this if you want to clear }
{ ClearViewPort; } {the screen at intervals }
{ count:=0; } {... }
{ end; } {... }
until KeyPressed; {Stop procedure. }
end;
begin {main program }
initialize;
draw_screen;
closegraph;
end.