home *** CD-ROM | disk | FTP | other *** search
- {$R-} {Bereichsprüfung aus}
- {$B+} {vollständige Auswertung boolscher Ausdrücke}
- {$S+} {Stackprüfung an}
- {$I+} {I/O-Prüfung an}
- {$N-} {kein numerischer Coprozessor}
- {$M 65500,16384,655360} {3.0-Standardvorgaben für Stack&Heap}
-
-
- (* ************************************************************ *)
- (* *)
- (* DEMO7.PAS *)
- (* *)
- (* This program provides an example of "zone-clearing." The *)
- (* The sprite is designed with trailing blanks which erase *)
- (* the previous image at the same time the new sprite is *)
- (* being placed on the screen at an advanced position. With *)
- (* this method neither Xor nor page-flipping is required for *)
- (* animation. Since it is simple it is also quite fast. *)
- (* *)
- (* Notice how increasing delays affect the result. You might *)
- (* also see how increases or decreases in the size of the *)
- (* zone of trailing blanks affect the resultant animation. *)
- (* Take a look at the sprite (zone.spr) using the sprite *)
- (* editor (Designer.com). *)
- (* *)
- (* (c) Donald L. Pavia *)
- (* Ver 1.0 Department of Chemistry *)
- (* February 1986 Western Washington University *)
- (* Bellingham, Washington 98225 *)
- (* *)
- (* ************************************************************ *)
-
-
- program SpriteDemo7;
- { Try changing j to 25 and k to 12 from }
-
- uses
- Crt,
- turbo3,
- Graph3;
-
- const j = 75; k = 4; { 75 and 4, respectively. Then change }
- { zone1.spr to zone2.spr }
- var i : integer;
-
- {----------------------------------------------------------------------------}
- {$I Sprites.Lib}
- {----------------------------------------------------------------------------}
-
- BEGIN
- clrscr;
- GraphColorMode; GraphBackGround (1); Palette (2);
-
- LoadSprite ('Zone1.spr'); { loads sprite into var TempSprite }
-
- gotoxy (2,1); write ('Press <ENTER> ');
- read (Kbd,Wait);
- {! 4. Kbd e^rfordert das Unit Turbo3 - verwenden Sie ReadKey (im Unit Crt)}
- gotoxy (2,1); write (' ');
-
- Sprite := TempSprite; { assign TempSprite as active sprite }
-
- for i := 1 to j do begin
- PutSpriteC (k*i,50); Delay (0); end;
- for i := 1 to j do begin
- PutSpriteC (k*i,75); Delay (25); end;
- for i := 1 to j do begin
- PutSpriteC (k*i,100); Delay (50); end;
- for i := 1 to j do begin
- PutSpriteC (k*i,125); Delay (100); end;
- for i := 1 to j do begin
- PutSpriteC (k*i,150); Delay (150); end;
-
- read (Kbd,Wait);
- {! 5. Kbd e^rfordert das Unit Turbo3 - verwenden Sie ReadKey (im Unit Crt)}
- TextMode (c80);
-
- END.