[comp.lang.c] Changing default palette on 256 color VGA driver

brewster@mdtv.uucp (03/12/91)

Greetings, all:

Please feel free to re-direct me if this isn't the proper place; I chose this
group because this question, although graphics related, is related to some
specific library calls in Turbo-C++ (and Turbo-C).

I downloaded from Borland's BB the 256 color VGA graphics driver, VGA256.BGI.
While I can it to come up, and it does seem to have 256 colors, I can't change
the default palette.  I'm assuming that I want to use setrgbpalette, but the
structure it references seems to only recognize 16 colors.  The function
getmaxcolor (I think, the manual is at home...) says 256 colors are available,
and looping through 256 colors with setcolor seems to work.  But the function
to return the size of the palette says it only contains 16 colors.  Hmm...

Borland doesn't want to support this over the phone, and I currently don't have
access to CompuServe.  The Turbo-Pascal example included does change the 
default palette, but doesn't seem to use a standard library call.  I don't know
Pascal, but it seems it loads up an array, then does something to stuff it
directly into the driver.

Has anyone played with any of this stuff?  Also, can anyone point me to a 640
by 480 by 256 .BGI?  I don't currently have access to anonymous ftp.  There
appeared to be one on SIMTEL, but I got a message back saying the file doesn't
exist.

Any help would be greatly appreciated.  Replies by either e-mail or post.
Thanks in advance,

Andy

+------------------------------------------------------------------------------+
| Andy Brewster         | Voice: (508) 640 0940    Fax: (508) 640 0836         |
| Matra Datavision, Inc.| Internet:  a_brewster@mdtv.UUCP                      |
| 2 Highwood Drive      | UUCP:{decwrl!decvax,uunet!samsung}!mdtv!a_brewster   |
| Tewksbury, MA. 01876  | Easynet: decwrl::"decvax!mdtv!a_brewster"            |
+------------------------------------------------------------------------------+