summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2007-12-20 11:04:29 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2007-12-20 11:04:29 (GMT)
commit5eb10584ed674276ef8d566089bda6c049584eeb (patch)
treeb62f27122ca9cb136f4a4b0c052d48d9a7af92ad
parent7e382c3a0bf6deaf4700023cd1cf1ec09d630322 (diff)
download2iv35-5eb10584ed674276ef8d566089bda6c049584eeb.zip
2iv35-5eb10584ed674276ef8d566089bda6c049584eeb.tar.gz
2iv35-5eb10584ed674276ef8d566089bda6c049584eeb.tar.bz2
alpha
-rw-r--r--Smoke/template.c39
-rw-r--r--Smoke/template.h21
2 files changed, 33 insertions, 27 deletions
diff --git a/Smoke/template.c b/Smoke/template.c
index c873256..81f2ed3 100644
--- a/Smoke/template.c
+++ b/Smoke/template.c
@@ -7,52 +7,55 @@
#include "funcs.h"
#include "palette.h"
-#include ".h"
+#include "template.h"
-static int _render = FALSE;
+static int template_render = FALSE;
-static int _num_colors = PALETTE_MAXCOLORS;
+static int template_num_colors = PALETTE_MAXCOLORS;
-static int _colormap = PALETTE_BLACKWHITE;
+static int template_colormap = PALETTE_BLACKWHITE;
+static int template_alpha = 1.0f;
-void _set_render(int render_)
+
+void _set_render(int render_template)
{
- _render = render_;
+ template_render = render_template;
}
-int _get_render(void)
+int template_get_render(void)
{
- return _render;
+ return template_render;
}
-void _set_num_colors(int num_colors)
+void template_set_num_colors(int num_colors)
{
- _num_colors = num_colors;
+ template_num_colors = num_colors;
}
-int _get_num_colors(void)
+int template_get_num_colors(void)
{
- return _num_colors;
+ return template_num_colors;
}
-void _set_colormap(int colormap)
+void template_set_colormap(int colormap)
{
- _colormap = colormap;
+ template_colormap = colormap;
}
-int _get_colormap(void)
+int template_get_colormap(void)
{
- return _colormap;
+ return template_colormap;
}
-struct color4f _get_color(float value)
+struct color4f template_get_color(float value)
{
struct color4f return_value;
- return_value = set_palette(_colormap, value, _num_colors);
+ return_value = set_palette(template_colormap, value, template_num_colors);
+ return_value.a = template_alpha;
return return_value;
}
diff --git a/Smoke/template.h b/Smoke/template.h
index cb9907c..9f880b5 100644
--- a/Smoke/template.h
+++ b/Smoke/template.h
@@ -1,16 +1,19 @@
-#ifndef __H
-#define __H
+#ifndef _TEMPLATE_H
+#define _TEMPLATE_H
-void _set_render(int render_);
-int _get_render(void);
+void template_set_render(int render_template);
+int template_get_render(void);
-void _set_num_colors(int num_colors);
-int _get_num_colors(void);
+void template_set_num_colors(int num_colors);
+int template_get_num_colors(void);
-void _set_colormap(int colormap);
-int _get_colormap(void);
+void template_set_colormap(int colormap);
+inttemplate _get_colormap(void);
+void template_set_alpha(int alpha);
+int template_get_alpha(void);
-struct color4f _get_color(float value);
+
+struct color4f template_get_color(float value);
#endif