diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:33:31 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2007-12-20 11:33:31 (GMT) |
commit | 6e60076c7bf4b928da25ab37d59b8b38a1588eab (patch) | |
tree | a8774cea1d9c2c5b90c0a81ec73a3ba75ace8933 /Smoke/glyphs.c | |
parent | 4b322240380d8351bb68462880d13e0b92769e26 (diff) | |
download | 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.zip 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.gz 2iv35-6e60076c7bf4b928da25ab37d59b8b38a1588eab.tar.bz2 |
added setteable alpha's and frame pointers
Diffstat (limited to 'Smoke/glyphs.c')
-rw-r--r-- | Smoke/glyphs.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Smoke/glyphs.c b/Smoke/glyphs.c index 0917dc0..2480a8a 100644 --- a/Smoke/glyphs.c +++ b/Smoke/glyphs.c @@ -4,6 +4,8 @@ #endif
+#include <rfftw.h>
+
#include "funcs.h"
#include "palette.h"
@@ -16,6 +18,10 @@ static int glyphs_num_colors = PALETTE_MAXCOLORS; static int glyphs_colormap = PALETTE_BLACKWHITE;
+static int glyphs_alpha = 1.0f;
+
+static fftw_real *glyphs_frame;
+
void glyphs_set_render(int render_glyphs)
{
@@ -47,13 +53,33 @@ int glyphs_get_colormap(void) return glyphs_colormap;
}
+void glyphs_set_alpha(int alpha)
+{
+ glyphs_alpha = alpha;
+}
+
+int glyphs_get_alpha(void)
+{
+ return glyphs_alpha;
+}
+
+void glyphs_set_frame(fftw_real *frame)
+{
+ glyphs_frame = frame;
+}
+
+fftw_real *glyphs_get_frame(void)
+{
+ return glyphs_frame;
+}
+
struct color4f glyphs_get_color(float value)
{
struct color4f return_value;
return_value = set_palette(glyphs_colormap, value, glyphs_num_colors);
- return_value.a = 0.5f;
+ return_value.a = glyphs_alpha;
return return_value;
}
|