home *** CD-ROM | disk | FTP | other *** search
- {$iturble.pas}
- {$iturble2.pas}
- {$ipaint.pas}
- {$igetput.pas}
-
- Var
- Bee : Storage;
- TX, TY, Counter : Integer;
- InBeeName : String[14];
- OutBeeName : String[14];
- Ch : Char;
-
- Procedure Startup; {Turn on graphics mode and move to start. }
- begin
- Mode(CMR);
- Pencolor(None);
- MoveTo(65,50);
- PenColor(on);
- TX := StartX; TY := StartY;
- end;
-
- Function ExistBee : Boolean; {See if file exists and set filenames. }
- Var
- OK : Boolean;
- BeeFile : File;
-
- begin
- InBeeName := 'BEE.FIG';
- OutBeeName := '';
- Assign(BeeFile,InBeeName);
- {$I-} Reset(BeeFile) {$I+};
- OK := (IOResult = 0);
- If not OK then
- begin
- InBeeName := '';
- OutBeeName := 'BEE.FIG';
- ExistBee := False;
- end
- else ExistBee := True;
- end;
-
- Procedure DrawCircles; {Draw the circles. }
- begin
- Circle(21);
- RCircle(26);
- LCircle(26);
- CCircle(40);
- end;
-
- Procedure PaintCircles; {Paint them. }
- begin
- TX := StartX; TY := StartY;
- Paint(TX + 2,TY,1,1);
- Paint(TX - 2,TY,1,1);
- Paint(TX,TY - 16,1,3);
- Paint(TX,TY + 16,1,3);
- Paint(TX + 23,TY,1,2);
- Paint(TX - 23,TY,1,2);
- Paint(TX + 48,TY,1,3);
- Paint(TX - 48,TY,1,3);
- end;
-
- Procedure DrillEyes; {Draw and paint blank circles in center. }
- begin
- Pencolor(None);
- Turn(-90);
- Go(10);
- Pencolor(2);
- Circle(6);
- Pencolor(None);
- Go(-20);
- Pencolor(2);
- Circle(6);
- PenColor(None);
- Go(10);
- PenColor(2);
- Paint(TX - 6,TY,2,0);
- Paint(TX + 6,TY,2,0);
- end;
-
- Procedure MakeBee; {Make the Bee and save it to a file. }
- begin
- DrawCircles;
- PaintCircles;
- DrillEyes;
- TX := TX - 60; TY := TY - 45;
- Get(TX,TY,120,90,Bee,OutBeeName);
- Read(Kbd,Ch);
- end;
-
- Procedure MoveFast; {Move fast down using... }
- begin {...BLANK and EQUAL operators. }
- For Counter := 1 to 35 do
- begin
- TX := TX + 5; TY := TY + 4;
- Put(Bee,TX,TY,e,'');
- Put(Bee,TX,TY,b,'');
- end;
- Put(Bee,TX + 5,TY + 4,e,'');
- Read(Kbd,Ch);
- end;
-
- Procedure MoveSlow; {Move slow back up using XOR operator. }
- begin
- For Counter := 1 to 6 do
- begin
- TX := TX - 15; TY := TY - 12;
- Put(Bee,TX,TY,x,'');
- Put(Bee,TX,TY,x,'');
- end;
- Put(Bee,TX + 5,TY + 4,x,'');
- Read(Kbd,Ch);
- end;
-
- begin
- Startup;
- If not ExistBee then MakeBee; {Make and save the bee if it doesn't exist.}
- Put(Bee,TX,TY,b,InBeeName); {Put it down from file it if does. }
- MoveFast;
- Put(Bee,TX + 5,TY + 4,x,'');
- MoveSlow;
- Mode(bw80);
- end.
-