X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=98c25977c1e0b3ea09bdf7bf26297a76eb4b9f6b;hp=ffad0a5cb9a32bbfe1b75bca50c21a8fc9b40360;hb=d4e2f71eb7c6a7488d1c13d351adca9ffbea87ed;hpb=6a4e096460bdde9baf30f95a4da109355ceb849f diff --git a/src/editor.c b/src/editor.c index ffad0a5c..98c25977 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7669,7 +7669,9 @@ void DrawLevelEd() BlitBitmap(graphic_info[IMG_BACKGROUND_PALETTE].bitmap, drawto, graphic_info[IMG_BACKGROUND_PALETTE].src_x, graphic_info[IMG_BACKGROUND_PALETTE].src_y, - DXSIZE, DYSIZE, DX, DY); + MIN(DXSIZE, graphic_info[IMG_BACKGROUND_PALETTE].width), + MIN(DYSIZE, graphic_info[IMG_BACKGROUND_PALETTE].height), + DX, DY); /* draw bigger door */ DrawSpecialEditorDoor(); @@ -7678,7 +7680,9 @@ void DrawLevelEd() BlitBitmap(graphic_info[IMG_BACKGROUND_TOOLBOX].bitmap, drawto, graphic_info[IMG_BACKGROUND_TOOLBOX].src_x, graphic_info[IMG_BACKGROUND_TOOLBOX].src_y, - EXSIZE, EYSIZE, EX, EY); + MIN(EXSIZE, graphic_info[IMG_BACKGROUND_TOOLBOX].width), + MIN(EYSIZE, graphic_info[IMG_BACKGROUND_TOOLBOX].height), + EX, EY); // redraw_mask |= REDRAW_ALL;