home *** CD-ROM | disk | FTP | other *** search
- #include "../../manic.h"
- #include "common.h"
- #include "keyboard.h"
-
- void
- mm_gfx_init (void)
- {
- int counter;
-
- scrnwidth = 320;
- scrnheight = 200;
-
-
- if (ggiInit () != 0) {
- printf ("Error Initialising GGI!\n");
- exit (1);
- }
- if ((vis = ggiOpen (NULL)) == NULL) {
- printf ("Error Opening GGI Visual\n");
- ggiExit ();
- exit (1);
- }
- ggiAddFlags (vis, GGIFLAG_ASYNC);
- if (ggiSetGraphMode (vis,
- scrnwidth, scrnheight,
- scrnwidth, scrnheight, GT_8BIT)) {
- printf ("Error setting graphics mode:\n"
- "Try setting GGI_DISPLAY to palemu\n");
- exit (1);
- }
-
- for (counter = 1; counter < 127; counter++)
- keytab[counter] = 0;
-
- xoffset = (scrnwidth - 256) / 2;
- yoffset = (scrnheight - 192) / 2;
- }
-