diff options
| author | Cracker64 <cracker642@gmail.com> | 2011-01-16 06:29:49 (GMT) |
|---|---|---|
| committer | Cracker64 <cracker642@gmail.com> | 2011-01-16 06:29:49 (GMT) |
| commit | b1e09d421681ea7e3f57d0e6ee71582c8060cf04 (patch) | |
| tree | 9e9a0ad3efc6dd7c5817d8b1489c013f688cbe13 /src/graphics.c | |
| parent | 2d79fa5cfe104e6067818f13e3486ca45fe23815 (diff) | |
| download | powder-b1e09d421681ea7e3f57d0e6ee71582c8060cf04.zip powder-b1e09d421681ea7e3f57d0e6ee71582c8060cf04.tar.gz | |
Made GoL code work with more advanced rules with different life states, giving more interesting rules.
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c index be84b61..824cee8 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1714,6 +1714,35 @@ void draw_parts(pixel *vid) blendpixel(vid, nx, ny, cr, cg, cb, 255); } + else if(t==PT_TEST) + { + if(parts[i].tmp==2) + blendpixel(vid, nx, ny, 255, 128, 0, 255); + else if(parts[i].tmp==1) + blendpixel(vid, nx, ny, 255, 255, 0, 255); + else + blendpixel(vid, nx, ny, 255, 0, 0, 255); + } + else if(t==PT_TEST2) + { + if(parts[i].tmp==2) + blendpixel(vid, nx, ny, 0, 100, 0, 255); + else + blendpixel(vid, nx, ny, 0, 255, 0, 255); + } + else if(t==PT_TEST3) + { + if(parts[i].tmp==4) + blendpixel(vid, nx, ny, 0, 0, 128, 255); + else if(parts[i].tmp==3) + blendpixel(vid, nx, ny, 0, 0, 150, 255); + else if(parts[i].tmp==2) + blendpixel(vid, nx, ny, 0, 0, 190, 255); + else if(parts[i].tmp==1) + blendpixel(vid, nx, ny, 0, 0, 230, 255); + else + blendpixel(vid, nx, ny, 0, 0, 70, 255); + } else if(t==PT_DEUT) { |
