X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmsdos.c;h=d9dd5e7921a0cda09b312e4f6b5c7de7856a4086;hb=a16126b0981ba82ddcd5f7b0f763bc4ce6aa9bdc;hp=5090c55c1603ed779928c6373ef0538714583206;hpb=afd9659572a8963b24b17340613b396ea49cbe55;p=rocksndiamonds.git diff --git a/src/msdos.c b/src/msdos.c index 5090c55c..d9dd5e79 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -294,7 +294,7 @@ Display *XOpenDisplay(char *display_name) BITMAP *mouse_bitmap = NULL; char *filename; - filename = getPath3(options.base_directory, GRAPHICS_DIRECTORY, + filename = getPath3(options.ro_base_directory, GRAPHICS_DIRECTORY, MOUSE_FILENAME); mouse_bitmap = Read_PCX_to_AllegroBitmap(filename); @@ -516,7 +516,10 @@ static BITMAP *Image_to_AllegroBitmap(Image *image) /* allocate new allegro bitmap structure */ if ((bitmap = create_bitmap_ex(depth, image->width, image->height)) == NULL) + { + errno_pcx = PCX_NoMemory; return NULL; + } clear(bitmap); @@ -582,17 +585,11 @@ static BITMAP *Read_PCX_to_AllegroBitmap(char *filename) /* read the graphic file in PCX format to internal image structure */ if ((image = Read_PCX_to_Image(filename)) == NULL) - { - Error(ERR_RETURN, "Read_PCX_to_Image failed"); return NULL; - } /* convert internal image structure to allegro bitmap structure */ if ((bitmap = Image_to_AllegroBitmap(image)) == NULL) - { - Error(ERR_RETURN, "Image_to_AllegroBitmap failed"); return NULL; - } set_palette(global_colormap); @@ -605,7 +602,7 @@ int Read_PCX_to_Pixmap(Display *display, Window window, GC gc, char *filename, BITMAP *bitmap; if ((bitmap = Read_PCX_to_AllegroBitmap(filename)) == NULL) - return PCX_FileInvalid; + return errno_pcx; *pixmap = (Pixmap)bitmap; *pixmap_mask = (Pixmap)bitmap;