projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a4e096
)
small fix to prevent graphic drawing overflow
author
Holger Schemel
<info@artsoft.org>
Thu, 20 Oct 2016 09:49:40 +0000
(11:49 +0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 20 Oct 2016 09:49:40 +0000
(11:49 +0200)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index ffad0a5cb9a32bbfe1b75bca50c21a8fc9b40360..98c25977c1e0b3ea09bdf7bf26297a76eb4b9f6b 100644
(file)
--- 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,
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();
/* 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,
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;
// redraw_mask |= REDRAW_ALL;