summaryrefslogtreecommitdiffstats
path: root/Smoke/palette.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-01-09 10:45:16 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-01-09 10:45:16 (GMT)
commite75a465b2b3c763bb00e1c77274e9510e92eff25 (patch)
tree560896c8ba9fee5ff60733a350edd27e22f5dfa7 /Smoke/palette.c
parent4e7b4062375ca04625583d6d57c047c049f28c2b (diff)
download2iv35-e75a465b2b3c763bb00e1c77274e9510e92eff25.zip
2iv35-e75a465b2b3c763bb00e1c77274e9510e92eff25.tar.gz
2iv35-e75a465b2b3c763bb00e1c77274e9510e92eff25.tar.bz2
cleanups
Diffstat (limited to 'Smoke/palette.c')
-rw-r--r--Smoke/palette.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/Smoke/palette.c b/Smoke/palette.c
index fbf4c25..5a8b9bf 100644
--- a/Smoke/palette.c
+++ b/Smoke/palette.c
@@ -156,14 +156,14 @@ struct color4f set_palette(int colormap_sort, float value, int num_colors)
{
case PALETTE_BLACKWHITE:
R = G = B = value;
- break;
+ break;
case PALETTE_RAINBOW:
rainbow(value,&R,&G,&B);
- break;
+ break;
case PALETTE_BANDS:
value *= NLEVELS; value = (float)(int)(value); value/= NLEVELS;
rainbow(value,&R,&G,&B);
- break;
+ break;
case PALETTE_BLUE_GREEN_RED:
if (value < -0.1)
{
@@ -186,14 +186,25 @@ struct color4f set_palette(int colormap_sort, float value, int num_colors)
R = value;
G = B = 0;
}
- break;
+ break;
case PALETTE_WILRIK:
colormap_fire(value, &R, &G, &B);
- break;
+ break;
case PALETTE_OLIVER:
rainbow(value, &R, &G, &B);
- break;
-
+ break;
+ case PALETTE_RED:
+ R = 1.0f;
+ G = B = 0.0f;
+ break;
+ case PALETTE_GREEN:
+ G = 1.0f;
+ R = B = 0.0f;
+ break;
+ case PALETTE_BLUE:
+ B = 1.0f;
+ R = G = 0.0f;
+ break;
}
return_value.r = R;