summaryrefslogtreecommitdiffstats
path: root/Smoke/palette.c
diff options
context:
space:
mode:
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;