changeset 409:2bf7e2965eec trunk

[svn] - actuatorbin.c was missing.
author nenolod
date Sat, 06 Jan 2007 01:59:37 -0800
parents 290588854a9d
children 4333f0bbcc55
files ChangeLog src/rovascope/actuatorbin.c
diffstat 2 files changed, 92 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 06 01:57:34 2007 -0800
+++ b/ChangeLog	Sat Jan 06 01:59:37 2007 -0800
@@ -1,3 +1,19 @@
+2007-01-06 09:57:34 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [894]
+  - rovascope -- a variant of the paranormal visualization engine that is 
+    uses random data instead of presets.
+  
+  trunk/configure.ac               |    2 
+  trunk/src/rovascope/Makefile     |    7 
+  trunk/src/rovascope/cfg.c        |  636 --------------------------
+  trunk/src/rovascope/paranormal.c |   27 -
+  trunk/src/rovascope/paranormal.h |    6 
+  trunk/src/rovascope/plugin.c     |  940 +++++++++++++++++++--------------------
+  trunk/src/rovascope/presets.c    |  261 ----------
+  trunk/src/rovascope/presets.h    |   11 
+  8 files changed, 494 insertions(+), 1396 deletions(-)
+
+
 2007-01-06 03:31:47 +0000  William Pitcock <nenolod@nenolod.net>
   revision [892]
   - update to Objective-Make II
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/rovascope/actuatorbin.c	Sat Jan 06 01:59:37 2007 -0800
@@ -0,0 +1,76 @@
+#include "paranormal.h"
+#include "actuators.h"
+
+struct pn_actuator *
+rovascope_get_random_colourmap(void)
+{
+   struct pn_actuator *out;
+
+   srand(time(NULL));
+
+   out = create_actuator("cmap_bwgradient");
+   out->options[2].val.cval.r = 255 - rand() % 255;
+   out->options[2].val.cval.g = 255 - rand() % 255;
+   out->options[2].val.cval.b = 255 - rand() % 255;
+
+   return out;
+}
+
+struct pn_actuator *
+rovascope_get_random_general(void)
+{
+   struct pn_actuator *out;
+
+   gchar *candidates[] = {
+      "general_fade", "general_blur", "general_mosaic", 
+      "general_flip",
+   };
+
+   out = create_actuator(candidates[rand() % G_N_ELEMENTS(candidates)]);
+
+   return out;
+}
+
+struct pn_actuator *
+rovascope_get_random_normal_scope(void)
+{
+   struct pn_actuator *out;
+   static gint ret = 0;
+
+   gchar *candidates[] = {
+      "wave_horizontal", "wave_vertical", "wave_radial",
+   };
+
+   if (ret >= G_N_ELEMENTS(candidates))
+       ret = 0;
+
+   out = create_actuator(candidates[ret]);
+
+   ret++;
+
+   return out;
+}
+
+struct pn_actuator *
+rovascope_get_random_actuator(void)
+{
+   struct pn_actuator *out;
+   struct pn_actuator *(*func)();
+   static gint ret = 0;
+
+   void *candidates[] = {
+	rovascope_get_random_colourmap,
+	rovascope_get_random_general,
+	rovascope_get_random_normal_scope,
+   };
+
+   if (ret >= G_N_ELEMENTS(candidates))
+       ret = 0;   
+
+   func = candidates[ret];
+   out = func();
+
+   ret++;
+
+   return out;
+}