summaryrefslogtreecommitdiffstats
path: root/Smoke/heightplots.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2007-12-19 20:59:56 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2007-12-19 20:59:56 (GMT)
commit5f1fc7b0711f51dd05077303f854c658ccd9dcba (patch)
tree7d519f704a04a8f25d3e5f14ce809a7d985c4581 /Smoke/heightplots.c
parenta60088999da4f44bf5885f431fe78eb87d643ae7 (diff)
download2iv35-5f1fc7b0711f51dd05077303f854c658ccd9dcba.zip
2iv35-5f1fc7b0711f51dd05077303f854c658ccd9dcba.tar.gz
2iv35-5f1fc7b0711f51dd05077303f854c658ccd9dcba.tar.bz2
Loads of splitting, gui templates added for other elements
Diffstat (limited to 'Smoke/heightplots.c')
-rw-r--r--Smoke/heightplots.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/Smoke/heightplots.c b/Smoke/heightplots.c
new file mode 100644
index 0000000..57d9054
--- /dev/null
+++ b/Smoke/heightplots.c
@@ -0,0 +1,58 @@
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+#endif
+
+
+#include "funcs.h"
+#include "palette.h"
+
+#include "heightplots.h"
+
+
+static int heightplots_render = FALSE;
+
+static int heightplots_num_colors = PALETTE_MAXCOLORS;
+
+static int heightplots_colormap = PALETTE_BLACKWHITE;
+
+
+void heightplots_set_render(int render_heightplots)
+{
+ heightplots_render = render_heightplots;
+}
+
+int heightplots_get_render(void)
+{
+ return heightplots_render;
+}
+
+void heightplots_set_num_colors(int num_colors)
+{
+ heightplots_num_colors = num_colors;
+}
+
+int heightplots_get_num_colors(void)
+{
+ return heightplots_num_colors;
+}
+
+void heightplots_set_colormap(int colormap)
+{
+ heightplots_colormap = colormap;
+}
+
+int heightplots_get_colormap(void)
+{
+ return heightplots_colormap;
+}
+
+
+struct color4f heightplots_get_color(float value)
+{
+ struct color4f return_value;
+
+ return_value = set_palette(heightplots_colormap, value, heightplots_num_colors);
+
+ return return_value;
+}