summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-12-19 14:20:38 (GMT)
committer Simon <simon@hardwired.org.uk>2010-12-19 14:20:38 (GMT)
commit92d22ac59060800461d23714b2db1a75f7619d2b (patch)
tree1eb6579fe7dda5228308f7941a1c1fa4af55fddc /src/graphics.c
parent9c805f864315665a6d7fd5d6c5b319c669f25988 (diff)
downloadpowder-92d22ac59060800461d23714b2db1a75f7619d2b.zip
powder-92d22ac59060800461d23714b2db1a75f7619d2b.tar.gz
Nibble is a noob, also fix for persistent mode bug
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 82fc7ae..013d875 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -2749,6 +2749,24 @@ void dim_copy(pixel *dst, pixel *src)
}
}
+void dim_copy_pers(pixel *dst, pixel *src)
+{
+ int i,r,g,b;
+ for(i=0; i<(XRES+BARSIZE)*YRES; i++)
+ {
+ r = PIXR(src[i]);
+ g = PIXG(src[i]);
+ b = PIXB(src[i]);
+ if(r>0)
+ r--;
+ if(g>0)
+ g--;
+ if(b>0)
+ b--;
+ dst[i] = PIXRGB(r,g,b);
+ }
+}
+
void render_zoom(pixel *img)
{
int x, y, i, j;