diff options
| author | Cate <cate@cate-6sh2.(none)> | 2011-07-08 15:51:44 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-08 17:09:16 (GMT) |
| commit | d2eb6f1cb31f2d746d5897e775424ed0d1448703 (patch) | |
| tree | 675a62a45a662f067d7e4649410c1b1bce71fc4b /src/graphics.c | |
| parent | 6a6c5d03f6d38882d520c3077de9b8b389b50e19 (diff) | |
| download | powder-d2eb6f1cb31f2d746d5897e775424ed0d1448703.zip powder-d2eb6f1cb31f2d746d5897e775424ed0d1448703.tar.gz | |
Deleted whole repository due to weirdness with recognizing folder. From current source, added Cracker64's changes that make 1px pipe several times faster than thicker pipe. Doesn't break saves. :D
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics.c b/src/graphics.c index 650d80e..193af98 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -2377,11 +2377,11 @@ void draw_parts(pixel *vid) cg = PIXG(ptypes[t].pcolors); cb = PIXB(ptypes[t].pcolors); } - if (parts[i].tmp>0 && parts[i].tmp<PT_NUM) + if ((parts[i].tmp&0xFF)>0 && (parts[i].tmp&0xFF)<PT_NUM) { - cr = PIXR(ptypes[parts[i].tmp].pcolors); - cg = PIXG(ptypes[parts[i].tmp].pcolors); - cb = PIXB(ptypes[parts[i].tmp].pcolors); + cr = PIXR(ptypes[parts[i].tmp&0xFF].pcolors); + cg = PIXG(ptypes[parts[i].tmp&0xFF].pcolors); + cb = PIXB(ptypes[parts[i].tmp&0xFF].pcolors); } blendpixel(vid, nx, ny, cr, cg, cb, 255); |
