summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorJacob1 <jfu614@gmail.com>2012-03-14 23:06:37 (GMT)
committer Jacob1 <jfu614@gmail.com>2012-03-14 23:06:37 (GMT)
commitafbe8cf38e298176e61d1125297393f7f9d5c73f (patch)
treed1e9bbff870fd77de18c076a91dda376a7a6f991 /src/interface.c
parent021209904110fd8668271c2e024de039c6500bc1 (diff)
downloadpowder-afbe8cf38e298176e61d1125297393f7f9d5c73f.zip
powder-afbe8cf38e298176e61d1125297393f7f9d5c73f.tar.gz
Added smudge tool
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index dfba6bd..364fc00 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -2537,7 +2537,7 @@ int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int b
float overflow = fwidth-(XRES-BARSIZE), location = ((float)XRES-BARSIZE)/((float)(mx-(XRES-BARSIZE)));
xoff = (int)(overflow / location);
}
- for (n = 0; n<3; n++)
+ for (n = 0; n<4; n++)
{
for (a=1; a<15; a++)
{
@@ -2547,6 +2547,8 @@ int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int b
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour)-10*a, PIXG(toollist[n].colour)-10*a, PIXB(toollist[n].colour)-10*a);
else if (n == DECO_DARKEN)
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour)+10*a, PIXG(toollist[n].colour)+10*a, PIXB(toollist[n].colour)+10*a);
+ else if (n == DECO_SMUDGE)
+ vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(PIXR(toollist[n].colour), PIXG(toollist[n].colour)-5*c, PIXB(toollist[n].colour)+5*c);
else if (n == DECO_DRAW)
vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(*cr,*cg,*cb);
else