diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-28 22:48:57 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-28 22:48:57 (GMT) |
| commit | e46f26684bfbe82734ad4716e45ebb1a94075a69 (patch) | |
| tree | 29c0f6f38916ff94f026ac7c18dbd54d67fcbd24 /src/elements | |
| parent | 7413654b9f1d6c0cde622d1b3129378a8e6c30d2 (diff) | |
| download | powder-e46f26684bfbe82734ad4716e45ebb1a94075a69.zip powder-e46f26684bfbe82734ad4716e45ebb1a94075a69.tar.gz | |
Fix Life and heat display, implement alpha, blend and add, fix FILT, INVS and BRAY + others
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/newgraphics.c | 6 | ||||
| -rw-r--r-- | src/elements/pipe.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c index c3ff414..23c660f 100644 --- a/src/elements/newgraphics.c +++ b/src/elements/newgraphics.c @@ -218,6 +218,7 @@ int graphics_INVS(GRAPHICS_FUNC_ARGS) { if(pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f) { + *cola = 100; *colr = 15; *colg = 0; *colb = 150; @@ -253,9 +254,12 @@ int graphics_FILT(GRAPHICS_FUNC_ARGS) for (x=0; x<12; x++) *colg += (cpart->ctype >> (x+9)) & 1; x = 624/(*colr+*colg+*colb+1); + *cola = 127; *colr *= x; *colg *= x; *colb *= x; + *pixel_mode &= ~PMODE; + *pixel_mode |= PMODE_BLEND; return 0; } int graphics_BRAY(GRAPHICS_FUNC_ARGS) @@ -309,7 +313,7 @@ int graphics_BRAY(GRAPHICS_FUNC_ARGS) *colr = 150; *colr = 50; } - //*cola = trans; + *cola = trans; *pixel_mode &= ~PMODE; *pixel_mode |= PMODE_BLEND; return 0; diff --git a/src/elements/pipe.c b/src/elements/pipe.c index 7014536..3ee5262 100644 --- a/src/elements/pipe.c +++ b/src/elements/pipe.c @@ -304,11 +304,11 @@ int graphics_PIPE(GRAPHICS_FUNC_ARGS) { if (ptypes[t].graphics_func) { - (*(ptypes[t].graphics_func))(&tpart, nx, ny, pixel_mode, colr, colg, colb, firea, firer, fireg, fireb); + (*(ptypes[t].graphics_func))(&tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); } else { - graphics_DEFAULT(&tpart, nx, ny, pixel_mode, colr, colg, colb, firea, firer, fireg, fireb); + graphics_DEFAULT(&tpart, nx, ny, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, fireb); } } //*colr = PIXR(ptypes[cpart->tmp&0xFF].pcolors); |
