summaryrefslogtreecommitdiff
path: root/src/graphics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.c')
-rw-r--r--src/graphics.c42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 0af768b..3ea4c9c 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1451,13 +1451,13 @@ void draw_parts(pixel *vid)
}
else
{
- cr = PIXR(ptypes[t].pcolors);
- cg = PIXG(ptypes[t].pcolors);
- cb = PIXB(ptypes[t].pcolors);
- blendpixel(vid, nx, ny, cr, cg, cb, 255);
+ cr = PIXR(ptypes[t].pcolors);
+ cg = PIXG(ptypes[t].pcolors);
+ cb = PIXB(ptypes[t].pcolors);
+ blendpixel(vid, nx, ny, cr, cg, cb, 255);
}
- }
- else if(cmode==CM_GRAD)
+ }
+ else if(cmode==CM_GRAD)//forgot to put else, broke nothing view
{
if((t==PT_METL||t==PT_BRMT||t==PT_BMTL)&&parts[i].temp>473&&parts[i].temp<1370)
{
@@ -2843,6 +2843,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;
@@ -2943,12 +2961,12 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
if(!(j%2) && !(i%2))
fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0);
break;
- case 4:
- for(j=0; j<CELL; j+=2)
- for(i=(j>>1)&1; i<CELL; i+=2)
- fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF);
- k++;
- break;
+ case 4:
+ for(j=0; j<CELL; j+=2)
+ for(i=(j>>1)&1; i<CELL; i+=2)
+ fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF);
+ k++;
+ break;
case 6:
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)