home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / svga256 / svga256.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-04  |  1017 b   |  34 lines

  1. /************************************************/
  2. /*                         */
  3. /*       SuperVGA 256 BGI driver defines    */
  4. /*        Copyright (c) 1991        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8.  
  9. #include <dos.h>
  10.  
  11. typedef unsigned char DacPalette256[256][3];
  12.  
  13. /* These are the currently supported modes */
  14. #define    SVGA320x200x256        0    /* 320x200x256 Standard VGA */
  15. #define    SVGA640x400x256        1    /* 640x400x256 Svga/VESA */
  16. #define    SVGA640x480x256        2    /* 640x480x256 Svga/VESA */
  17. #define    SVGA800x600x256        3    /* 800x600x256 Svga/VESA */
  18. #define SVGA1024x768x256    4    /* 1024x768x256 Svga/VESA */
  19.  
  20. /* Setvgapalette sets the entire 256 color palette */
  21. /* PalBuf contains RGB values for all 256 colors   */
  22. /* R,G,B values range from 0 to 63               */
  23. void setvgapalette(DacPalette256 *PalBuf)
  24. {
  25.   struct REGPACK reg;
  26.  
  27.   reg.r_ax = 0x1012;
  28.   reg.r_bx = 0;
  29.   reg.r_cx = 256;
  30.   reg.r_es = FP_SEG(PalBuf);
  31.   reg.r_dx = FP_OFF(PalBuf);
  32.   intr(0x10,®);
  33. }
  34.