home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / VOGLE / DRIVERS / IBMPC / VEGA_COL.C < prev    next >
C/C++ Source or Header  |  2000-02-11  |  467b  |  29 lines

  1. #include <dos.h>
  2.  
  3. union REGS inregs, outregs;
  4.  
  5. static    unsigned        pal[17] = {0, 4, 2, 14, 1, 5, 3, 7,
  6.                                12, 10, 6, 9, 11, 13, 14, 15, 0};
  7.  
  8. extern    unsigned    int    _cur_color;
  9.  
  10. void
  11. vega_color(i)
  12.     int    i;
  13. {
  14.     _cur_color = (unsigned)i;
  15. }
  16.  
  17. vega_setpal()
  18. {
  19.     unsigned    i;
  20.  
  21.     for (i = 0; i < 16; i++) {
  22.         inregs.h.ah = 0x10;
  23.         inregs.h.al = 0;
  24.         inregs.h.bl = i;
  25.         inregs.h.bh = pal[i];
  26.         int86(0x10, &inregs, &outregs);
  27.     }
  28. }
  29.