home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / exc.arj / TEMP / 10-09.C < prev    next >
Text File  |  1995-01-20  |  948b  |  51 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,0x00,0x00,0xF0,0x00,
  10.    0x00,0x00,0x00,0xFF,0x00,
  11.    0xFF,0xFF,0xFF,0xFF,0xF0,
  12.    0xFF,0xFF,0xFF,0xFF,0xFF,
  13.    0xFF,0xFF,0xFF,0xFF,0xF0,
  14.    0x00,0x00,0x00,0xFF,0x00,
  15.    0x00,0x00,0x00,0xF0,0x00
  16. };
  17.  
  18. void main()
  19. {
  20.    int old_mode;
  21.  
  22.    fg_initpm();
  23.    if (fg_testmode(13,1) == 0)
  24.    {
  25.       printf("This program requires a 320 ");
  26.       printf("x 200 EGA graphics mode.\n");
  27.       exit(1);
  28.    }
  29.  
  30.    old_mode = fg_getmode();
  31.    fg_setmode(13);
  32.    fg_setcolor(1);
  33.    fg_fillpage();
  34.    fg_setclip(0,15,0,199);
  35.  
  36.    fg_move(10,10);
  37.    fg_drwimage(arrow,5,7);
  38.    fg_move(10,20);
  39.    fg_clpimage(arrow,5,7);
  40.    fg_move(8,30);
  41.    fg_revimage(arrow,5,7);
  42.    fg_move(8,40);
  43.    fg_flpimage(arrow,5,7);
  44.    fg_move(8,50);
  45.    fg_putimage(arrow,5,7);
  46.    fg_waitkey();
  47.  
  48.    fg_setmode(old_mode);
  49.    fg_reset();
  50. }
  51.