home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / IYONIX / MANICMINER / SOURCE.ZIP / manicminer-1.6.3 / gfxlibs / libggi / c / init < prev    next >
Encoding:
Text File  |  2000-12-01  |  747 b   |  38 lines

  1. #include "../../manic.h"
  2. #include "common.h"
  3. #include "keyboard.h"
  4.  
  5. void
  6. mm_gfx_init (void)
  7. {
  8.   int counter;
  9.  
  10.   scrnwidth = 320;
  11.   scrnheight = 200;
  12.  
  13.  
  14.   if (ggiInit () != 0) {
  15.     printf ("Error Initialising GGI!\n");
  16.     exit (1);
  17.   }
  18.   if ((vis = ggiOpen (NULL)) == NULL) {
  19.     printf ("Error Opening GGI Visual\n");
  20.     ggiExit ();
  21.     exit (1);
  22.   }
  23.   ggiAddFlags (vis, GGIFLAG_ASYNC);
  24.   if (ggiSetGraphMode (vis,
  25.                scrnwidth, scrnheight,
  26.                scrnwidth, scrnheight, GT_8BIT)) {
  27.     printf ("Error setting graphics mode:\n"
  28.         "Try setting GGI_DISPLAY to palemu\n");
  29.     exit (1);
  30.   }
  31.  
  32.   for (counter = 1; counter < 127; counter++)
  33.     keytab[counter] = 0;
  34.  
  35.   xoffset = (scrnwidth - 256) / 2;
  36.   yoffset = (scrnheight - 192) / 2;
  37. }
  38.