home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 03-04.C < prev    next >
Text File  |  1995-01-20  |  527b  |  33 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int old_mode;
  10.    int new_mode;
  11.  
  12.    fg_initpm();
  13.    old_mode = fg_getmode();
  14.    new_mode = fg_bestmode(80,25,1);
  15.  
  16.    if (new_mode < 0)
  17.    {
  18.       printf("This program requires\n");
  19.       printf("an 80-column display.\n");
  20.       exit(1);
  21.    }
  22.  
  23.    fg_setmode(new_mode);
  24.    fg_cursor(0);
  25.  
  26.    fg_setcolor(15);
  27.    fg_text("Hello, world.",13);
  28.    fg_waitkey();
  29.  
  30.    fg_setmode(old_mode);
  31.    fg_reset();
  32. }
  33.