summaryrefslogtreecommitdiffstats
path: root/Smoke/colormap.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2007-12-19 15:44:23 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2007-12-19 15:44:23 (GMT)
commita60088999da4f44bf5885f431fe78eb87d643ae7 (patch)
tree27940a3cd14a7cdee60ddb0263bf1173c51df56c /Smoke/colormap.c
parentc287b3f591fe3e10dceedfd90a5ce71b2c703988 (diff)
download2iv35-a60088999da4f44bf5885f431fe78eb87d643ae7.zip
2iv35-a60088999da4f44bf5885f431fe78eb87d643ae7.tar.gz
2iv35-a60088999da4f44bf5885f431fe78eb87d643ae7.tar.bz2
splitted up glyphs
Diffstat (limited to 'Smoke/colormap.c')
-rw-r--r--Smoke/colormap.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/Smoke/colormap.c b/Smoke/colormap.c
index ffb9afe..efe0114 100644
--- a/Smoke/colormap.c
+++ b/Smoke/colormap.c
@@ -5,13 +5,15 @@
#include <math.h>
+#include "funcs.h"
#include "palette.h"
+
#include "colormap.h"
-#include "funcs.h"
-static int colormap_num_colors = COLOR_MAXCOLORS;
-static int colormap = COLOR_BLACKWHITE;
+static int colormap_colormap = PALETTE_BLACKWHITE;
+
+static int colormap_num_colors = PALETTE_MAXCOLORS;
static int colormap_scaling = FALSE;
@@ -32,9 +34,18 @@ void colormap_set_num_colors(int num_colors)
colormap_num_colors = num_colors;
}
+int colormap_get_num_colors(void)
+{
+ return colormap_num_colors;
+}
+
void colormap_set_map(int color_map)
{
- colormap = color_map;
+ colormap_colormap = color_map;
+}
+
+int colormap_get_map(void){
+ return colormap_colormap;
}
void colormap_set_scaling(int scaling)
@@ -217,7 +228,7 @@ struct color4f colormap_get_color(float value)
value = colormap_clamping ? clamp(value) : value;
value = colormap_scaling ? remap(value) : value;
- return_value = set_palette(colormap, value, colormap_num_colors);
+ return_value = set_palette(colormap_colormap, value, colormap_num_colors);
return return_value;
}