home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / sprite / demo2.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-18  |  3.0 KB  |  82 lines

  1. {$R-}    {Bereichsprüfung aus}
  2. {$B+}    {vollständige Auswertung boolscher Ausdrücke}
  3. {$S+}    {Stackprüfung an}
  4. {$I+}    {I/O-Prüfung an}
  5. {$N-}    {kein numerischer Coprozessor}
  6. {$M 65500,16384,655360} {3.0-Standardvorgaben für Stack&Heap}
  7.  
  8.  
  9.     (* ************************************************************ *)
  10.     (*                                                              *)
  11.     (*  This program shows how rapidly a chemical structure may be  *)
  12.     (*  assembled from sprites and displayed. The entire structure  *)
  13.     (*  is assembled in the workbuffer and then displayed by trans- *)
  14.     (*  ferring the workbuffer array to the colorbuffer.            *)
  15.     (*                                                              *)
  16.     (*                          (c) Donald L. Pavia                 *)
  17.     (*    Ver 2.0               Department of Chemistry             *)
  18.     (*    February 1986         Western Washington University       *)
  19.     (*                          Bellingham, Washington 98225        *)
  20.     (*                                                              *)
  21.     (* ************************************************************ *)
  22.  
  23.  
  24. program SpriteDemo2;
  25.  
  26. {----------------------------------------------------------------------------}
  27.  
  28. uses
  29.   Crt,
  30.   turbo3,
  31.   Graph3;
  32.  
  33. {$I Sprites.Lib}
  34. {----------------------------------------------------------------------------}
  35.  
  36. BEGIN
  37.      clrscr;
  38.      GraphColorMode; GraphBackGround (1); Palette (0);
  39.  
  40.      WorkBuffer := ColorBuffer;
  41.      TextColor (3);
  42.      gotoxy  (5,5); write ('Display of Chemical Sprites');
  43.      TextColor (1);
  44.      gotoxy (5,21); write ('Donald Pavia, December 1985');
  45.  
  46.      LoadTable ('Demo2.tab');
  47.  
  48. REPEAT
  49.  
  50.      TextColor (2);
  51.      gotoxy (12,14); write ('Press <ENTER> ');
  52.      TextColor (3);
  53.      read (kbd,Wait);       { procedure Spwrite is found in sprites.inc -  }
  54. {! 4. Kbd e^rfordert das Unit Turbo3 - verwenden Sie ReadKey (im Unit Crt)}
  55.                             { passed vars are (spritenumber,xcoord,ycoord) }
  56.                             { - writes to workbuffer                       }
  57.  
  58.           Spwrite (15,140,68);  Spwrite (16,136,74);
  59.           Spwrite (14,140,82);  Spwrite (2,140,96);   Spwrite (11,120,100);
  60.           Spwrite (10,92,98);   Spwrite (9,64,98);    Spwrite (7,116,116);
  61.           Spwrite (20,148,94);  Spwrite (18,168,98);  Spwrite (20,180,94);
  62.           Spwrite (11,200,100); Spwrite (17,200,118); Spwrite (17,228,98);
  63.  
  64.           Show; Delay (1200);                   { Show displays workbuffer }
  65.  
  66.      gotoxy (8,5); write ('Repeat Again ? Y/N ?  ');
  67.      repeat
  68.           read (Kbd,Again);
  69. {! 5. Kbd erford^ert das Unit Turbo3 - verwenden Sie ReadKey (im Unit Crt)}
  70.      until UpCase(Again) in ['Y','N'];
  71.  
  72.  
  73.      FillChar (WorkBuffer,16383,0);                    { erase everything }
  74.      FillChar (ColorBuffer,16383,0);
  75.  
  76. UNTIL UpCase(Again) = 'N';
  77.  
  78.      gotoxy (1,23);
  79.      TextMode (c80); clrscr;                             { exit gracefully }
  80.  
  81. END.
  82.