static void InitNetworkServer(void);
static void InitSound(void);
static void InitSoundServer(void);
+static void InitDisplay(void);
static void InitGfx(void);
static void InitGfxBackground(void);
static void LoadGfx(int, struct PictureFileInfo *);
signal(SIGINT, CloseAllAndExit);
signal(SIGTERM, CloseAllAndExit);
- InitBufferedDisplay(&backbuffer, &window);
+ InitDisplay();
InitEventFilter(FilterMouseMotionEvents);
InitGfx();
#endif /* !TARGET_SDL */
}
+void InitDisplay()
+{
+ char *gfx_dir = getPath2(options.ro_base_directory, GRAPHICS_DIRECTORY);
+ char *x11_icon_filename = getPath2(gfx_dir, X11_ICON_FILENAME);
+ char *x11_iconmask_filename = getPath2(gfx_dir, X11_ICONMASK_FILENAME);
+ char *msdos_pointer_filename = getPath2(gfx_dir, MSDOS_POINTER_FILENAME);
+
+ free(gfx_dir);
+
+ InitProgramInfo(program_name, PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
+ ICON_TITLE_STRING, x11_icon_filename, x11_iconmask_filename,
+ msdos_pointer_filename);
+
+ InitScrollbufferSize(FXSIZE, FYSIZE); /* (only needed for MS-DOS code) */
+
+ InitVideoDisplay();
+ InitVideoBuffer(&backbuffer, &window, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH,
+ setup.fullscreen);
+}
+
void InitGfx()
{
int i, j;
{
int x, y;
- drawto = backbuffer = pix[PIX_DB_BACK];
+ drawto = backbuffer;
fieldbuffer = pix[PIX_DB_FIELD];
SetDrawtoField(DRAW_BACKBUFFER);