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

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