home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 678 / mcgalib.h < prev    next >
Text File  |  1993-11-29  |  2KB  |  75 lines

  1.  
  2. /*
  3.    MCGALIB
  4.    (c) 1993 D.G. Sureau
  5.  
  6.    These functions are for VGA 19,
  7.    320 x 200, 256 colors screen
  8. */
  9.  
  10.  
  11.  
  12. /* Graphic window variables */
  13.  
  14. extern int XL;           /* Default = 0   */
  15. extern int XR;           /* Default = 319 */
  16. extern int YB;           /* Default = 0   */
  17. extern int YT;           /* Default = 199 */
  18.  
  19. extern unsigned char COLOR256;  /* Color for pixels */
  20.  
  21. extern unsigned char TEXTCOLOR;     /* Color for text display */
  22.  
  23. extern unsigned long *SPVECTOR;     /* Pointer on sprites's adr. */
  24. extern char *SPCODE;                /* Pointer on sprites's code */
  25. extern unsigned int VGASCREEN;      /* Segment of VGA graphic screen */
  26.  
  27.  
  28. void window19(int xl,int yb,int xr,int yt); /* Defines graphic window */
  29. void cls19(int col);                        /* Clears graphic screen  */
  30. void outtext(int x,int y,char *txt);        /* Displays text at x,y   */
  31.                         /* with TEXTCOLOR color # */
  32.  
  33. void sprite256( int x,int y,char *ptr);
  34.  /* Puts spr. over background, in graphical window */
  35.  
  36. void csprite256(int x,int y,char *ptr);
  37.  /* Puts spr. erases background, without clipping */
  38.  
  39. void csprite256c(int x,int y,char *adr);
  40.  /* Puts spr. erases background, in graphical window */
  41.  
  42. void xsprite256(int x,int y,char *adr);
  43.   /* Display sprite in XOR mode */
  44.  
  45. void sprite(int number, int x,int y, unsigned char mode);
  46.                  /* Puts sprite number #nn,
  47.                 valid modes in sprlib are:
  48.                 0 = copy
  49.                 4 = over background
  50.                  */
  51.  
  52. /* Function for saving and restoring block of screen */
  53.  
  54. void putblock(int x,int y,char *ptr);
  55. void getblock(int lft,int bottom,int rght,int hight,char *ptr);
  56.  
  57. char *getspadr(int number);          /* Gets absolute adr in table */
  58.  
  59.  
  60. void icon19(int x,int y,char *ptr);  /* Put a 16 color icon on screen */
  61.  
  62. void writeRGB(char *adr);       /* Set 256 color palette from file */
  63. void writecolor(int colnum,int r,int g,int b); /* Create a color */
  64.  
  65. void setpix256(int x,int y,unsigned char color); /* Put a pixel */
  66. int getpix256(int x,int y);      /* Get color of pixel at x, y */
  67. void line256(int x,int y,int x2,int y2, unsigned char color);
  68.         /* Draw a line from x, y to x2, y2 */
  69. void fillblock(int l,int b,int r,int h,int color);
  70.             /* Fill a rectangle with a color among 256 */
  71.  
  72.  
  73.  
  74.  
  75.