summaryrefslogtreecommitdiffstats
path: root/Smoke/flowvis.c
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/flowvis.c')
-rw-r--r--Smoke/flowvis.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/Smoke/flowvis.c b/Smoke/flowvis.c
index 151d80b..3c6d637 100644
--- a/Smoke/flowvis.c
+++ b/Smoke/flowvis.c
@@ -6,6 +6,7 @@
#include <rfftw.h>
+#include "fluids.h"
#include "funcs.h"
#include "palette.h"
@@ -21,7 +22,22 @@ static int flowvis_colormap = PALETTE_BLACKWHITE;
static float flowvis_alpha = 1.0f;
static fftw_real *flowvis_frame;
+static fftw_real **flowvis_history;
+static int hisdex = 0;
+
+
+void flowvis_set_hisdex(int arg)
+{
+ int idx = (fluids_get_hisdex() + 1) % HISTORY_SIZE;
+
+ hisdex = (arg + idx) % HISTORY_SIZE;
+}
+
+int flowvis_get_hisdex(void)
+{
+ return hisdex;
+}
void flowvis_set_render(int render_flowvis)
{
@@ -73,6 +89,15 @@ fftw_real *flowvis_get_frame(void)
return flowvis_frame;
}
+void flowvis_set_history(fftw_real **history)
+{
+ flowvis_history = history;
+}
+
+fftw_real *flowvis_get_history(int hisdex)
+{
+ return flowvis_history[hisdex];
+}
struct color4f flowvis_get_color(float value)
{