home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 08-08.C < prev    next >
Text File  |  1995-01-20  |  858b  |  53 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.  
  11.    fg_initpm();
  12.    fg_svgainit(0);
  13.    if ((fg_svgastat() & 4) == 0)
  14.    {
  15.       printf("Extended pages are not supported.\n");
  16.       exit(1);
  17.    }
  18.    if (fg_memory() < 512)
  19.    {
  20.       printf("512K video memory required.\n");
  21.       exit(1);
  22.    }
  23.  
  24.    old_mode = fg_getmode();
  25.    fg_setmode(13);
  26.  
  27.    fg_setcolor(9);
  28.    fg_fillpage();
  29.    fg_setcolor(15);
  30.    fg_text("Page 0",6);
  31.  
  32.    fg_setpage(15);
  33.    fg_setcolor(10);
  34.    fg_fillpage();
  35.    fg_setcolor(15);
  36.    fg_locate(0,0);
  37.    fg_text("Page 15",7);
  38.    fg_waitkey();
  39.  
  40.    fg_setvpage(15);
  41.    fg_waitkey();
  42.  
  43.    fg_setvpage(0);
  44.    fg_waitkey();
  45.  
  46.    fg_defpages(15,0);
  47.    fg_copypage(15,0);
  48.    fg_waitkey();
  49.  
  50.    fg_setmode(old_mode);
  51.    fg_reset();
  52. }
  53.