home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / sprite / demo8.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-18  |  3.8 KB  |  73 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.     (*                        SpriteDemo8                               *)
  12.     (*                                                                  *)
  13.     (*  This short program shows you how to use the include files that  *)
  14.     (*  can be generated by designer.com. These files allow you to      *)
  15.     (*  "hard-code" the sprites directly in your program. This avoids   *)
  16.     (*  any need for external disk files and disk access.               *)
  17.     (*                                                                  *)
  18.     (*                              (c) Donald L. Pavia                 *)
  19.     (*      Ver 1.0                 Department of Chemistry             *)
  20.     (*    February 1986             Western Washington University       *)
  21.     (*                              Bellingham, Washington  98225       *)
  22.     (*                                                                  *)
  23.     (* **************************************************************** *)
  24.  
  25.                                            { this sprite constant was copied }
  26. program Demo8;                             { from santa.inc using the ^KR    }
  27.                                            { editor directive - that is, the }
  28.                                            { file santa.inc was directly     }
  29.                                            { included into the code          }
  30.  
  31. uses
  32.   Crt,
  33.   turbo3,
  34.   Graph3;
  35.  
  36. const  santa : array[1..128] of byte =
  37.      ( 9,0,5,0,0,0,2,170,0,0,0,0,170,170,170,0,
  38.        0,10,170,170,160,63,0,255,255,255,255,0,0,12,0,0,
  39.        48,0,0,48,196,19,12,0,0,255,242,143,255,0,0,0,
  40.        63,252,0,0,170,175,242,143,250,170,170,163,255,255,202,170,
  41.        0,0,42,170,160,0,0,2,170,170,170,191,0,255,255,255,
  42.        255,63,0,255,255,255,255,0,0,48,84,21,12,0,3,0,
  43.        0,0,0,192,0,15,194,131,240,0,0,15,200,35,240,0,
  44.        170,143,252,63,242,170,170,168,255,255,42,170,0,0,0,0 );
  45.  
  46. {----------------------------------------------------------------------------}
  47. {$I Dragon.inc}
  48. {----------------------------------------------------------------------------}
  49.                                            { Dragon.inc is a sprite file on  }
  50.                                            { on the disk - it has the same   }
  51.                                            { form as the typed constant above}
  52. {----------------------------------------------------------------------------}
  53. {$I Sprites.Lib}
  54. {----------------------------------------------------------------------------}
  55.                                             { Sprites.Lib contains the       }
  56.                                             { essential definitions and the  }
  57. BEGIN                                       { necessary driver routines      }
  58.      clrscr;
  59.      GraphColorMode; GraphBackGround (1); Palette (2);
  60.  
  61.      move (Santa,Sprite,128);               { move is used since it ignores  }
  62.      PutSPriteC (100,100);                  { the fact that Santa and Sprite }
  63.                                             { technically do not agree as to }
  64.      move (Dragon,Sprite,128);              { their type                     }
  65.      PutSpriteC (220,100);
  66.  
  67.      gotoxy (10,22); write ('Press <ENTER> to Quit');
  68.      read (Kbd,Wait);
  69. {! 4. Kbd e^rfordert das Unit Turbo3 - verwenden Sie ReadKey (im Unit Crt)}
  70.      TextMode (c80);                                       { exit gracefully }
  71.  
  72. END.
  73.