changeset 410:4333f0bbcc55 trunk

[svn] - select waves randomly
author nenolod
date Sat, 06 Jan 2007 02:00:15 -0800
parents 2bf7e2965eec
children 78a5e9c37469
files ChangeLog src/rovascope/actuatorbin.c
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 06 01:59:37 2007 -0800
+++ b/ChangeLog	Sat Jan 06 02:00:15 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-06 09:59:37 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [896]
+  - actuatorbin.c was missing.
+  
+  trunk/src/rovascope/actuatorbin.c |   76 ++++++++++++++++++++++++++++++++++++++
+  1 file changed, 76 insertions(+)
+
+
 2007-01-06 09:57:34 +0000  William Pitcock <nenolod@nenolod.net>
   revision [894]
   - rovascope -- a variant of the paranormal visualization engine that is 
--- a/src/rovascope/actuatorbin.c	Sat Jan 06 01:59:37 2007 -0800
+++ b/src/rovascope/actuatorbin.c	Sat Jan 06 02:00:15 2007 -0800
@@ -35,18 +35,12 @@
 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++;
+   out = create_actuator(candidates[rand() % G_N_ELEMENTS(candidates)]);
 
    return out;
 }