diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-09-25 21:16:08 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-26 15:53:37 (GMT) |
| commit | 820871e92b549c23ca645f1c959cc5aeb8b19fe5 (patch) | |
| tree | 2370e2d1ee53df1e9a795305e575eca58729c071 /src/interface.c | |
| parent | 1be8ce6c5d4f2da653f4331584f0edcd2ab3abde (diff) | |
| download | powder-820871e92b549c23ca645f1c959cc5aeb8b19fe5.zip powder-820871e92b549c23ca645f1c959cc5aeb8b19fe5.tar.gz | |
Fix lighten/darken tools so they work with different display pixel formats
Diffstat (limited to 'src/interface.c')
| -rw-r--r-- | src/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c index d15eb9b..8bfaa3b 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2229,9 +2229,9 @@ int color_menu_ui(pixel *vid_buf, int i, int *cr, int *cg, int *cb, int b, int b for (c=1; c<27; c++) { if (n == DECO_LIGHTEN) - vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = toollist[n].colour - a*0x0A0A0A; + 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)] = toollist[n].colour + a*0x0A0A0A; + 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_DRAW) vid_buf[(XRES+BARSIZE)*(y+a)+((x-xoff)+c)] = PIXRGB(*cr,*cg,*cb); else |
