static int _qdgdfv_startup(void) { vga_init(); _qdgdfv_scale = 1; /* only 320x200 supported by now */ _qdgdfv_screen_x_size = 320; _qdgdfv_screen_y_size = 200; vga_setmode(G320x200x256); _qdgdfv_set_palette(); keyboard_init(); keyboard_translatekeys(TRANSLATE_CURSORKEYS); _qdgdfv_virtual_screen = (unsigned char *) qdgdfv_malloc(_qdgdfv_screen_x_size * _qdgdfv_screen_y_size); qdgdfv_clear_virtual_screen(); /* svgalib runs always fullscreen */ _qdgdfv_full_screen = 1; qdgdfv_logger("qdgdfv_startup", "SVGALIB driver startup"); return 1; }
void GameShutdown(void) /* cierra todo en una sesi?n de juego */ { _fade_edges = 0; qdgdfv_logger(_game_name, qdgdfv_sprintf("Shutdown - Frames per sec.: %d / %d", _avg_frames_per_sec, _max_frames_per_sec)); }
/** * qdgdfv_bang - Bangs on unrecoverable problems. * @where: caller function name * @msg: message * * Logs the @message to the logger and returns to the system. * [Support Functions] */ void qdgdfv_bang(char *where, char *msg) { qdgdfv_logger(where, msg); printf("\nBANG! %s: %s\n", where, msg); fflush(stdout); exit(1); }