From 1fd7b42fcc2bd2f89a4a1a2680291062adeab0cc Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sat, 12 Nov 2011 16:26:36 +0000 Subject: [PATCH] Fixed Brush grab and Lasso grab tools to work with tilemap (when right-clicking to clear) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1868 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/brush.c | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/brush.c b/src/brush.c index 92a1e0f2..654e58d1 100644 --- a/src/brush.c +++ b/src/brush.c @@ -35,6 +35,7 @@ #include "windows.h" #include "sdlscreen.h" #include "brush.h" +#include "tiles.h" // Data used during brush rotation operation static byte * Brush_rotate_buffer; @@ -879,14 +880,25 @@ void Capture_brush(short start_x,short start_y,short end_x,short end_y,short cle Copy_image_to_brush(start_x,start_y,Brush_width,Brush_height,Main_image_width); // On regarde s'il faut effacer quelque chose: - if (clear != 0) + if (clear) { - for (y_pos=start_y;y_pos