forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Remapping Palette Functions
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The remappalette function assigns the color index <index> a new
     color value of <color>. The remapallpalette function remaps all of
     the color indexes simultaneously to the colors given in the
     <colors> array. Both functions affect the current display.
 
     Both functions work in all graphics modes, but only with EGA, MCGA,
     or VGA hardware. An error results if either function is called
     while using any other hardware configuration, including Olivetti or
     Hercules.
 
     For remapallpalette, only the first <n> elements of the <colors>
     array are used, where <n> is the number of colors supported by the
     current video mode. The number <n> can be found as the <numcolors>
     element of the videoconfig structure.
 
     For the default color assignments of the color indexes, and an
     explanation of specifying a color with a long value, see
     Graphic Mode Colors
 
     Return Value
 
     If successful, remapallpalette returns 0 and _remappalette returns
     the color value previously assigned to <index>. Either function
     returns -1 if the hardware configuration is incorrect (not VGA,
     MCGA, or EGA). The remappalette function will also return -1 if
     <index> is out of range.
 
     Note that remapallpalette returns an INTEGER*2 value and
     remappalette returns an INTEGER*4 value.
                                    -♦-