summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-04-23 03:11:05 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-04-23 13:00:51 (GMT)
commitbd8de4c8420b7b6dc782d12a0eef1ea3fe6f5883 (patch)
tree8a8b181ab8fcaabfe862e0ae1464c1da9b2bc500 /src/graphics.c
parentaa3f475edc754ba84b65d83106b91104ac827854 (diff)
downloadpowder-bd8de4c8420b7b6dc782d12a0eef1ea3fe6f5883.zip
powder-bd8de4c8420b7b6dc782d12a0eef1ea3fe6f5883.tar.gz
Decorations! ,still messing with it. It does not save currently. TODO: fix typing in boxes to update the color. Line/box tools. Some basic color selections like an element menu.
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 703e972..0b9ffe7 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -3056,6 +3056,18 @@ void draw_parts(pixel *vid)
#endif
}
+void draw_decorations(pixel *vid_buf,pixel *decorations)
+{
+ int i,r,g,b;
+ for (i=0; i<(XRES+BARSIZE)*YRES; i++)
+ {
+ r = PIXR(decorations[i]);
+ g = PIXG(decorations[i]);
+ b = PIXB(decorations[i]);
+ if (r>0 || g>0 || b>0)
+ vid_buf[i] = PIXRGB(r,g,b);
+ }
+}
//draws the photon colors in the HUD
void draw_wavelengths(pixel *vid, int x, int y, int h, int wl)