diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:00:08 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:00:08 (GMT) |
commit | 7e382c3a0bf6deaf4700023cd1cf1ec09d630322 (patch) | |
tree | 3141efb3569986992b3b1e93a19cf551d09fabd5 /Smoke/colormap.c | |
parent | 6abfdbf340b8a9704842b6d56f63754689ae209d (diff) | |
download | 2iv35-7e382c3a0bf6deaf4700023cd1cf1ec09d630322.zip 2iv35-7e382c3a0bf6deaf4700023cd1cf1ec09d630322.tar.gz 2iv35-7e382c3a0bf6deaf4700023cd1cf1ec09d630322.tar.bz2 |
cleanups more alpha
Diffstat (limited to 'Smoke/colormap.c')
-rw-r--r-- | Smoke/colormap.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Smoke/colormap.c b/Smoke/colormap.c index 946d9fc..b8097ee 100644 --- a/Smoke/colormap.c +++ b/Smoke/colormap.c @@ -18,6 +18,8 @@ static int colormap_colormap = PALETTE_BLACKWHITE; static int colormap_num_colors = PALETTE_MAXCOLORS; +static int colormap_alpha = 1.0f; + static int colormap_scaling = FALSE; static int colormap_clamping = FALSE; @@ -48,10 +50,21 @@ void colormap_set_colormap(int colormap) colormap_colormap = colormap; } -int colormap_get_colormap(void){ +int colormap_get_colormap(void) +{ return colormap_colormap; } +void colormap_set_alpha(int alpha) +{ + colormap_alpha = alpha; +} + +int colormap_get_alpha(void) +{ + return colormap_alpha; +} + void colormap_set_scaling(int scaling) { colormap_scaling = scaling; @@ -156,7 +169,7 @@ struct color4f colormap_get_color(float value) value = colormap_scaling ? remap(value) : value; return_value = set_palette(colormap_colormap, value, colormap_num_colors); - return_value.a = 1.0f; + return_value.a = colormap_alpha; return return_value; } |