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

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow[] =
  8. {
  9.    0x00,0x0C,0x00, 0x00,0x0F,0x00, 0xFF,0xFF,0xC0,
  10.    0xFF,0xFF,0xF0, 0xFF,0xFF,0xC0, 0x00,0x0F,0x00,
  11.    0x00,0x0C,0x00
  12. };
  13.  
  14. void main()
  15. {
  16.    int old_mode;
  17.  
  18.    fg_initpm();
  19.    if (fg_testmode(4,1) == 0)
  20.    {
  21.       printf("This program requires a 320 ");
  22.       printf("x 200 CGA graphics mode.\n");
  23.       exit(1);
  24.    }
  25.  
  26.    old_mode = fg_getmode();
  27.    fg_setmode(4);
  28.    fg_setcolor(1);
  29.    fg_fillpage();
  30.    fg_setclip(0,15,0,199);
  31.  
  32.    fg_move(10,10);
  33.    fg_drwimage(arrow,3,7);
  34.    fg_move(10,20);
  35.    fg_clpimage(arrow,3,7);
  36.    fg_move(8,30);
  37.    fg_revimage(arrow,3,7);
  38.    fg_move(8,40);
  39.    fg_flpimage(arrow,3,7);
  40.    fg_move(8,50);
  41.    fg_putimage(arrow,3,7);
  42.    fg_waitkey();
  43.  
  44.    fg_setmode(old_mode);
  45.    fg_reset();
  46. }
  47.