Mercurial > audlegacy-plugins
changeset 302:b185ed2f8fa2 trunk
[svn] - improve beat detection
author | nenolod |
---|---|
date | Wed, 22 Nov 2006 22:59:26 -0800 |
parents | cf6bd092969d |
children | 5e19836a2db2 |
files | ChangeLog src/paranormal/containers.c src/paranormal/misc.c src/paranormal/paranormal.c src/paranormal/paranormal.h |
diffstat | 5 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Nov 22 22:46:16 2006 -0800 +++ b/ChangeLog Wed Nov 22 22:59:26 2006 -0800 @@ -1,3 +1,11 @@ +2006-11-23 06:46:16 +0000 William Pitcock <nenolod@nenolod.net> + revision [656] + - i've done a lot of this + + trunk/src/paranormal/TODO | 6 ------ + 1 file changed, 6 deletions(-) + + 2006-11-23 06:41:39 +0000 William Pitcock <nenolod@nenolod.net> revision [654] - another 3d preset
--- a/src/paranormal/containers.c Wed Nov 22 22:46:16 2006 -0800 +++ b/src/paranormal/containers.c Wed Nov 22 22:59:26 2006 -0800 @@ -175,12 +175,11 @@ { struct container_cycle_data *cdata = (struct container_cycle_data*)data; int now; - int new_beat = pn_is_new_beat(); /* * Change branch if all of the requirements are met for the branch to change. */ - if ((opts[1].val.bval == TRUE && new_beat != 0) || opts[1].val.bval == FALSE) + if ((opts[1].val.bval == TRUE && pn_new_beat != FAlSE) || opts[1].val.bval == FALSE) { now = SDL_GetTicks(); @@ -232,7 +231,7 @@ { GSList *child; - if (pn_is_new_beat() == TRUE) + if (pn_new_beat == TRUE) { for (child = *data; child; child = child->next) exec_actuator ((struct pn_actuator *) child->data);
--- a/src/paranormal/misc.c Wed Nov 22 22:46:16 2006 -0800 +++ b/src/paranormal/misc.c Wed Nov 22 22:59:26 2006 -0800 @@ -88,7 +88,7 @@ } /* check if we need to change direction yet, and if so, do so. */ - if (pn_is_new_beat() == TRUE) + if (pn_new_beat == TRUE) opaque_data->dir = (FloaterDirection) rand() % 15; /* sum of all dir values */ /* now adjust the direction so we stay in boundary */
--- a/src/paranormal/paranormal.c Wed Nov 22 22:46:16 2006 -0800 +++ b/src/paranormal/paranormal.c Wed Nov 22 22:59:26 2006 -0800 @@ -30,6 +30,8 @@ float sin_val[360]; float cos_val[360]; +gboolean pn_new_beat; + /* **************** drawing doodads **************** */ static void @@ -197,6 +199,8 @@ } } + pn_new_beat = pn_is_new_beat(); + if (pn_rc->actuator) { exec_actuator (pn_rc->actuator);
--- a/src/paranormal/paranormal.h Wed Nov 22 22:46:16 2006 -0800 +++ b/src/paranormal/paranormal.h Wed Nov 22 22:59:26 2006 -0800 @@ -46,6 +46,8 @@ extern struct pn_sound_data *pn_sound_data; extern struct pn_image_data *pn_image_data; +extern gboolean pn_new_beat; + /* global trig pre-computes */ extern float sin_val[360]; extern float cos_val[360];