5 * v0.0 2000-01-06T06:43:39Z
7 * set everything up and close everything down
19 #if defined(TARGET_X11)
29 boolean skip_menu = TRUE;
31 extern void tab_generate();
32 extern void ulaw_generate();
34 extern void game_menu_init();
38 /* pre-calculate some data */
42 progname = "emerald mine";
45 Error(ERR_EXIT, "em_open_all(): open_all() failed");
55 int em_main_init_game(int level_nr, char *filename)
59 em_game_status = EM_GAME_STATUS_PLAY;
60 if (game_play_init(level_nr, filename) != 0)
65 em_game_status = EM_GAME_STATUS_MENU;
72 int em_main_handle_game(byte action)
74 return game_loop(action);
77 /* massive kludge for buffer overflows
78 * i cant think of an elegant way to handle this situation.
79 * oh wait yes i can. dynamically allocate each string. oh well
81 void snprintf_overflow(char *description)
83 fprintf(stderr, "%s: %s\n", progname,
84 "buffer overflow; check EMERALD_BASE environment variable");
85 fprintf(stderr, "%s %s\n", "Fault occured while attempting to", description);
94 /* temporary dummy until X11->SDL conversion finished */