diff options
| author | Simon <simon@hardwired.org.uk> | 2010-12-12 12:24:38 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-12-12 12:24:38 (GMT) |
| commit | f1df4cae6ad83902a1166a14327643692490dd3b (patch) | |
| tree | a5984a47c4bc215359b21f12caa9f3f8088db6be /src/graphics.c | |
| parent | 2bdb662825d9b24ac81c57cc2723f69b455b8030 (diff) | |
| parent | af72702434b11a57576ffbafb9112201c092dbae (diff) | |
| download | powder-f1df4cae6ad83902a1166a14327643692490dd3b.zip powder-f1df4cae6ad83902a1166a14327643692490dd3b.tar.gz | |
Merge latest cracker changes
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 dd37fc5..82fc7ae 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) |
