diff options
| author | Cracker64 <cracker642@gmail.com> | 2010-12-12 04:31:08 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2010-12-12 04:31:08 (GMT) |
| commit | dc318fa14aa15d6db3588981544b5f563977f9fb (patch) | |
| tree | 4cf987d7138815ad3faca333688a72894759cd8e /src/graphics.c | |
| parent | d4f0b2295d878ad7b26081a41d448b35bdf88f95 (diff) | |
| download | powder-dc318fa14aa15d6db3588981544b5f563977f9fb.zip powder-dc318fa14aa15d6db3588981544b5f563977f9fb.tar.gz | |
more small changes/fixes. Generation count for GoL in debug, resets with 'r'.
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c index 90a1438..8dfea36 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1605,6 +1605,26 @@ void draw_parts(pixel *vid) } } } + else if((t==PT_BIZR||t==PT_BIZRG)&&parts[i].ctype) + { + cg = 0; + cb = 0; + cr = 0; + for(x=0; x<12; x++) { + cr += (parts[i].ctype >> (x+18)) & 1; + cb += (parts[i].ctype >> x) & 1; + } + for(x=0; x<14; x++) + cg += (parts[i].ctype >> (x+9)) & 1; + x = 624/(cr+cg+cb+1); + cr *= x; + cg *= x; + cb *= x; + cr = cr>255?255:cr; + cg = cg>255?255:cg; + cb = cb>255?255:cb; + blendpixel(vid, nx, ny, cr, cg, cb, 255); + } else if(t==PT_PIPE) { if(parts[i].ctype==2) |
