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

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char triangle[] = {0xFF,0x80, 0x7F,0x00, 0x3E,0x00, 0x1C,0x00, 0x08,0x00};
  8.  
  9. void main()
  10. {
  11.    int old_mode;
  12.  
  13.    fg_initpm();
  14.    if (fg_testmode(6,1) == 0)
  15.    {
  16.       printf("This program requires a ");
  17.       printf("CGA graphics mode.\n");
  18.       exit(1);
  19.    }
  20.  
  21.    old_mode = fg_getmode();
  22.    fg_setmode(6);
  23.  
  24.    fg_move(316,101);
  25.    fg_drwimage(triangle,2,5);
  26.    fg_waitkey();
  27.  
  28.    fg_setmode(old_mode);
  29.    fg_reset();
  30. }
  31.