home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / USCX / TPSPRITE.ZIP / DEMO8.PAS < prev    next >
Pascal/Delphi Source File  |  1986-02-15  |  3KB  |  59 lines

  1.  
  2.     (* **************************************************************** *)
  3.     (*                                                                  *)
  4.     (*                        SpriteDemo8                               *)
  5.     (*                                                                  *)
  6.     (*  This short program shows you how to use the include files that  *)
  7.     (*  can be generated by designer.com. These files allow you to      *)
  8.     (*  "hard-code" the sprites directly in your program. This avoids   *)
  9.     (*  any need for external disk files and disk access.               *)
  10.     (*                                                                  *)
  11.     (*                              (c) Donald L. Pavia                 *)
  12.     (*      Ver 1.0                 Department of Chemistry             *)
  13.     (*    February 1986             Western Washington University       *)
  14.     (*                              Bellingham, Washington  98225       *)
  15.     (*                                                                  *)
  16.     (* **************************************************************** *)
  17.  
  18.                                            { this sprite constant was copied }
  19. program Demo8;                             { from santa.inc using the ^KR    }
  20.                                            { editor directive - that is, the }
  21.                                            { file santa.inc was directly     }
  22.                                            { included into the code          }
  23.  const  santa : array[1..128] of byte =
  24.      ( 9,0,5,0,0,0,2,170,0,0,0,0,170,170,170,0,
  25.        0,10,170,170,160,63,0,255,255,255,255,0,0,12,0,0,
  26.        48,0,0,48,196,19,12,0,0,255,242,143,255,0,0,0,
  27.        63,252,0,0,170,175,242,143,250,170,170,163,255,255,202,170,
  28.        0,0,42,170,160,0,0,2,170,170,170,191,0,255,255,255,
  29.        255,63,0,255,255,255,255,0,0,48,84,21,12,0,3,0,
  30.        0,0,0,192,0,15,194,131,240,0,0,15,200,35,240,0,
  31.        170,143,252,63,242,170,170,168,255,255,42,170,0,0,0,0 );
  32.  
  33. {----------------------------------------------------------------------------}
  34. {$I Dragon.inc}
  35. {----------------------------------------------------------------------------}
  36.                                            { Dragon.inc is a sprite file on  }
  37.                                            { on the disk - it has the same   }
  38.                                            { form as the typed constant above}
  39. {----------------------------------------------------------------------------}
  40. {$I Sprites.Lib}
  41. {----------------------------------------------------------------------------}
  42.                                             { Sprites.Lib contains the       }
  43.                                             { essential definitions and the  }
  44. BEGIN                                       { necessary driver routines      }
  45.      clrscr;
  46.      GraphColorMode; GraphBackGround (1); Palette (2);
  47.  
  48.      move (Santa,Sprite,128);               { move is used since it ignores  }
  49.      PutSPriteC (100,100);                  { the fact that Santa and Sprite }
  50.                                             { technically do not agree as to }
  51.      move (Dragon,Sprite,128);              { their type                     }
  52.      PutSpriteC (220,100);
  53.  
  54.      gotoxy (10,22); write ('Press <ENTER> to Quit');
  55.      read (Kbd,Wait);
  56.      TextMode (c80);                                       { exit gracefully }
  57.  
  58. END.
  59.