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

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. short solid[]  = {0xE03F,0xE03F,0xE03F,0x0007,0x0007,0x0007,0x0007,0x0007,
  8.                   0x0007,0x0007,0xE03F,0xE03F,0xE03F,0xFFFF,0xFFFF,0xFFFF,
  9.                   0x0000,0x0F80,0x0F80,0x0F80,0x7FF0,0x7FF0,0x7FF0,0x7FF0,
  10.                   0x7FF0,0x0F80,0x0F80,0x0F80,0x0000,0x0000,0x0000,0x0000};
  11.  
  12. short hollow[] = {0xE03F,0xEFBF,0xEFBF,0x0F87,0x7FF7,0x7FF7,0x7FF7,0x7FF7,
  13.                   0x7FF7,0x0F87,0xEFBF,0xEFBF,0xE03F,0xFFFF,0xFFFF,0xFFFF,
  14.                   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0200,0x0000,
  15.                   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000};
  16.  
  17. void main()
  18. {
  19.    int old_mode;
  20.    int column, row, last_row;
  21.  
  22.    fg_initpm();
  23.    old_mode = fg_getmode();
  24.    fg_setmode(fg_automode());
  25.  
  26.    if (fg_mouseini() < 0)
  27.    {
  28.       fg_setmode(old_mode);
  29.       fg_reset();
  30.       exit(1);
  31.    }
  32.  
  33.    fg_setcolor(15);
  34.    fg_rect(0,fg_getmaxx(),0,fg_getmaxy());
  35.  
  36.    fg_setcolor(12);
  37.    column = fg_xalpha(fg_getmaxx()/2) - 6;
  38.    last_row = fg_yalpha(fg_getmaxy()) + 1;
  39.  
  40.    for (row = 0; row < last_row; row++)
  41.    {
  42.       fg_locate(row,column);
  43.       fg_text("example 14-10",13);
  44.    }
  45.  
  46.    fg_mousevis(1);
  47.    fg_waitkey();
  48.    fg_mouseptr(solid,6,6);
  49.    fg_waitkey();
  50.    fg_mouseptr(hollow,6,6);
  51.    fg_waitkey();
  52.  
  53.    fg_setmode(old_mode);
  54.    fg_reset();
  55. }
  56.