home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
TPSPRITE.ZIP
/
DEMO2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-02-15
|
3KB
|
67 lines
(* ************************************************************ *)
(* *)
(* This program shows how rapidly a chemical structure may be *)
(* assembled from sprites and displayed. The entire structure *)
(* is assembled in the workbuffer and then displayed by trans- *)
(* ferring the workbuffer array to the colorbuffer. *)
(* *)
(* (c) Donald L. Pavia *)
(* Ver 2.0 Department of Chemistry *)
(* February 1986 Western Washington University *)
(* Bellingham, Washington 98225 *)
(* *)
(* ************************************************************ *)
program SpriteDemo2;
{----------------------------------------------------------------------------}
{$I Sprites.Lib}
{----------------------------------------------------------------------------}
BEGIN
clrscr;
GraphColorMode; GraphBackGround (1); Palette (0);
WorkBuffer := ColorBuffer;
TextColor (3);
gotoxy (5,5); write ('Display of Chemical Sprites');
TextColor (1);
gotoxy (5,21); write ('Donald Pavia, December 1985');
LoadTable ('Demo2.tab');
REPEAT
TextColor (2);
gotoxy (12,14); write ('Press <ENTER> ');
TextColor (3);
read (kbd,Wait); { procedure Spwrite is found in sprites.inc - }
{ passed vars are (spritenumber,xcoord,ycoord) }
{ - writes to workbuffer }
Spwrite (15,140,68); Spwrite (16,136,74);
Spwrite (14,140,82); Spwrite (2,140,96); Spwrite (11,120,100);
Spwrite (10,92,98); Spwrite (9,64,98); Spwrite (7,116,116);
Spwrite (20,148,94); Spwrite (18,168,98); Spwrite (20,180,94);
Spwrite (11,200,100); Spwrite (17,200,118); Spwrite (17,228,98);
Show; Delay (1200); { Show displays workbuffer }
gotoxy (8,5); write ('Repeat Again ? Y/N ? ');
repeat
read (Kbd,Again);
until UpCase(Again) in ['Y','N'];
FillChar (WorkBuffer,16383,0); { erase everything }
FillChar (ColorBuffer,16383,0);
UNTIL UpCase(Again) = 'N';
gotoxy (1,23);
TextMode (c80); clrscr; { exit gracefully }
END.