Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>fg_setcolornum</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
fg_setcolornum

Usage

   #include <fg.h>
   int far fg_setcolornum(old,new);

Description


   Change the definition of an FG_COLOR. As in

           fg_setcolornum(FG_WHITE, 3);

   If 3 actually produces green then whenever your program subsequently uses
   FG_WHITE, green will be the actual color output to the screen.

Example 

       .
       .
       .
       if (fg_init() == FG_NULL)
       {
           fputs("Unable to initialize graphics.", stderr);
           return 0;
       }

   /*
           If this board only has 2 colors map the red, green and

           blue colors used throughout the program to black and
           white.
   */
       if (fg.nsimulcolor == 2)
       {
           fg_setcolornum(FG_BLUE, FG_WHITE);
           fg_setcolornum(FG_RED, FG_WHITE);
           fg_setcolornum(FG_GREEN, FG_BLACK);
       }

   /*
           Code originally intended to require red green and blue
       will now have black and white functionality
           (dependent  on the use of the colors.
   */
       .
       .
       .






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