Hi guys, i'm trying to paint texture/bmap.

this is the code i use:

Code

#include <acknex.h>
#include <windows.h>
#include <default.c>



BMAP* paint_map="#512x512x24";

PANEL* paint_pan =
{
	bmap=paint_map;
	flags=SHOW;
}

var brush_size=32;

function main()
{
	fps_max=75;
	video_set(512,512,32,2);
	
	mouse_mode=3;
	mouse_pointer=2;
	bmap_fill(paint_map,vector(255,255,255),100);
	
	var pic_width=bmap_width(paint_map);
	var pic_height=bmap_height(paint_map);
	var pixel;
	var format;
	var px,py;


	while(1)
	{
		
		if(mouse_left)
		{	
			format = bmap_lock(paint_map, 888);
					
			int i=0;
			for(i=0;i<brush_size; i++)
			{
				int j=0;
				
				for(j=0;j<360;j++)//circle
				{
					
					
					pixel = pixel_for_vec(vector(0,255,0),100,format);
					px=clamp(mouse_pos.x+i*cos(j),1,pic_width-1);
					py=clamp(mouse_pos.y+i*sin(j),1,pic_height-1);
					
					pixel_to_bmap(paint_map, px,py, pixel);
					
				}
				
			}
		}
		bmap_unlock(paint_map);
		
		wait(1);
	}

}




i need soft brush and pressure option, as in image editing programs.. Any help would be great.

[Linked Image]