diff options
Diffstat (limited to 'Smoke/streamlines.c')
-rw-r--r-- | Smoke/streamlines.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Smoke/streamlines.c b/Smoke/streamlines.c index 3b54a36..6bae373 100644 --- a/Smoke/streamlines.c +++ b/Smoke/streamlines.c @@ -12,22 +12,29 @@ #include "streamlines.h" - - -static int streamlines_render = FALSE; - +static int streamlines_render = FALSE; static int streamlines_num_colors = PALETTE_MAXCOLORS; - -static int streamlines_colormap = PALETTE_BLACKWHITE; - -static int streamlines_dataset = DATASET_RHO; - -static float streamlines_alpha = 1.0f; +static int streamlines_colormap = PALETTE_BLACKWHITE; +static int streamlines_dataset = DATASET_RHO; +static float streamlines_alpha = 1.0f; static fftw_real *streamlines_frame; static fftw_real **streamlines_history; struct fftw_real_xy *streamlines_history_scalars; +static int hisdex = 0; + +void streamlines_set_hisdex(int arg) +{ + int idx = (fluids_get_hisdex() + 1) % HISTORY_SIZE; + + hisdex = (arg + idx) % HISTORY_SIZE; +} + +int streamlines_get_hisdex(void) +{ + return hisdex; +} void streamlines_set_render(int render_streamlines) { |