home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FNTPAK32.ZIP / C.EXE / DEMOBRIT.C < prev    next >
C/C++ Source or Header  |  1995-08-16  |  2KB  |  101 lines

  1. /**********************************************************************
  2.  
  3.    DemoBrit.C                       Copyright 1994, Rob W. Smetana
  4.  
  5.    Turn Screen Swapping ON if appropriate.
  6.  
  7.    Demonstrate:   BrightBG       \     all in
  8.                   DefaultPalette  )
  9.                   DarkBlue       /     Video.Obj
  10.  
  11.    Not demonstrated:  GetMonitor
  12.  
  13.    NOTE:  All parameters are passed by VALUE -- EXCEPT Row and Column
  14.           in rsButtonPressed.
  15.  
  16.           Font_Pak.H declares/prototypes all Font Pak functions.
  17.  
  18.    REQUIRES:
  19.  
  20.           Graphics library may be required for:
  21.  
  22.           _setvideomode();
  23.           _settextcolor();
  24.           _outtext     ();
  25.  
  26.  
  27. **********************************************************************/
  28.  
  29. #include <font_pak.h>       /* for declarations -- PLEASE READ */
  30. #include <graph.h>
  31.  
  32. void PrintDemo (int Normal_Brite);
  33.  
  34. int main (void)
  35.  
  36. {
  37.     int Normal_Brite, WhichOption, Row, Col;
  38.  
  39.     _setvideomode(_TEXTC80);
  40.  
  41.     Normal_Brite = 0; PrintDemo (Normal_Brite);
  42.  
  43.     _outtext("\n");
  44.     Normal_Brite = 16; PrintDemo (Normal_Brite);
  45.  
  46.     printf("\nNormal colors.           Press <SPACE>.");
  47.     getch();
  48.  
  49.     printf("\nDemonstrate BrightBG.    Press <SPACE>.");
  50.     WhichOption = 1;
  51.     BRIGHTBG (WhichOption);
  52.     getch();
  53.  
  54.     printf("\n    and back to normal.  Press <SPACE>.");
  55.     WhichOption = 0;
  56.     BRIGHTBG (WhichOption);
  57.     getch();
  58.  
  59.     printf("\nDemonstrate Default Palette -- with BOTH blinking & bright bg.  Press <SPACE>.");
  60.     WhichOption = 2;
  61.     DEFAULTPALETTE (WhichOption);
  62.     getch();
  63.  
  64.     printf("\n    and back to normal.  Press <SPACE>.");
  65.     WhichOption = 0;
  66.     DEFAULTPALETTE (WhichOption);
  67.     getch();
  68.  
  69.     printf("\nDemonstrate Dark Blue (may be Grey in C).  Press <SPACE>.");
  70.     DARKBLUE();
  71.     getch();
  72.  
  73.     printf("\n    and back to normal.  Press <SPACE>.\n");
  74.     WhichOption = 0;
  75.     DEFAULTPALETTE (WhichOption);
  76.     getch();
  77.  
  78.     return (0);
  79. }
  80.  
  81. void PrintDemo (Normal_Brite)
  82.  
  83. {
  84.    short ForeColor;
  85.    long BKColor, normal;
  86.  
  87.    for (BKColor = 0; BKColor <8; BKColor ++)
  88.      {
  89.         _setbkcolor(BKColor);
  90.         _outtext("\n");
  91.         for (ForeColor = Normal_Brite; ForeColor <15+ Normal_Brite; ForeColor ++)
  92.             {
  93.               _settextcolor(ForeColor);
  94.              _outtext(" F~P ");
  95.  
  96.             }
  97.      }
  98.  
  99. }
  100.  
  101.