Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>set_pal()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SET_PAL()
   Sets up the palette with the colors to be used when drawing.

   Syntax
         nColor = SET_PAL(nNumber [,nColor])

   Arguments
         nNumber     Sets the palette element.

         OPTIONAL PARAMETERS
         nColor      Puts the color or pen number into palette number.

           DEFAULT PALETTES:
               CGA          - 0,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3
               EGA          - 0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63
               B&W/HERCULES - 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

   Returns
         nColor      Returns the current color for the nNumber.

   Description
         Each plotting device has a 16 element array (called a palette) that
         will hold the color or pen number to be used when drawing. The CGA
         adapter can display only four colors on the screen. There are two
         different sets of four colors which can be selected with the FCOLOR()
         function. The EGA adapter can display 64 colors of which only 16 can
         be displayed on the screen at one time. The Hercules (mode 9) and
         High resolution CGA mode (mode 2) can only display black and white.

         The first element in the palette is the background color.

   Examples

               SET_PAL(1,2)    && set palette element 1 to color 2
               SET_PAL(0,1)    && set background color to dark blue

See Also: GRF_COLORS() SET_COLOR() SET_VGAPAL()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson