I tried several ways but I am not succeeding!.
Seeing that no success trying to paint the blend Map using another patern figure, i decided paint, used pixel by pixel of the blendMap from coordinate of my mouse.
For Brush Size and Circle form i I made the following function.

Code:
var format = bmap_lock(skin,0);
	var i,j;
	for(j=0; j<skin->height; j++)
	for(i=0; i<skin->width; i++)
	{
		// read the pixel from the texture
		var pixel = pixel_for_bmap(skin,i,j);
		COLOR* csrc = pixel_to_vec(NULL,NULL,format,pixel);
		vec_normalize(csrc,255);
	
			if(vec_dist(terrain_pixel_to_pos(terrain,i,j,skin),_vec(TARGET.x,TARGET.y,0)) < 100)
			{
		
			csrc->red = 0;
			csrc->green = 255;
			csrc->blue = 255;
			pixel = pixel_for_vec(csrc,100,format);
			pixel_to_bmap(skin,i,j,pixel);
		}
	}
	bmap_unlock(skin);
{



this way I can paint map from the coordenada of my mouse, utilizando a fixed size and circular shape for painting. COOOL, But this function does not work well. She is too Slow because need read the entire map pixel by pixel to determine who need to be painted

Someone has a formula that works quickly?

Last edited by NeoNeper; 07/09/13 21:50.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________