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

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow[] = {6,1,9,2,2,9,1,19,7,2,8,1};
  8.  
  9. void main()
  10. {
  11.    int old_mode;
  12.  
  13.    fg_initpm();
  14.    if (fg_testmode(4,1) == 0)
  15.    {
  16.       printf("This program requires a 320 ");
  17.       printf("x 200 CGA graphics mode.\n");
  18.       exit(1);
  19.    }
  20.  
  21.    old_mode = fg_getmode();
  22.    fg_setmode(4);
  23.    fg_setclip(0,15,0,199);
  24.  
  25.    fg_setcolor(3);
  26.    fg_rect(0,319,0,199);
  27.  
  28.    fg_move(10,10);
  29.    fg_drawmask(arrow,12,10);
  30.    fg_move(10,20);
  31.    fg_clipmask(arrow,12,10);
  32.    fg_move(10,30);
  33.    fg_revmask(arrow,12,10);
  34.    fg_move(10,40);
  35.    fg_flipmask(arrow,12,10);
  36.    fg_waitkey();
  37.  
  38.    fg_setmode(old_mode);
  39.    fg_reset();
  40. }
  41.