changeset 283:6b3773478f9e trunk

[svn] - some base code for Scope, not yet enabled.
author nenolod
date Mon, 20 Nov 2006 14:35:24 -0800
parents 3e160f6c04d2
children 72f0de06bb56
files ChangeLog src/paranormal/wave.c
diffstat 2 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Nov 20 13:26:09 2006 -0800
+++ b/ChangeLog	Mon Nov 20 14:35:24 2006 -0800
@@ -1,3 +1,24 @@
+2006-11-20 21:26:09 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [600]
+  - add libcalc from xvs and link to build
+  
+  trunk/src/paranormal/Makefile           |    4 
+  trunk/src/paranormal/libcalc/Makefile   |   19 
+  trunk/src/paranormal/libcalc/calc.h     |   30 
+  trunk/src/paranormal/libcalc/dict.c     |   99 ++
+  trunk/src/paranormal/libcalc/dict.h     |   46 +
+  trunk/src/paranormal/libcalc/execute.c  |  121 +++
+  trunk/src/paranormal/libcalc/execute.h  |   46 +
+  trunk/src/paranormal/libcalc/function.c |   81 ++
+  trunk/src/paranormal/libcalc/function.h |   32 
+  trunk/src/paranormal/libcalc/parser.c   | 1178 ++++++++++++++++++++++++++++++++
+  trunk/src/paranormal/libcalc/parser.h   |   40 +
+  trunk/src/paranormal/libcalc/parser.y   |  284 +++++++
+  trunk/src/paranormal/libcalc/storage.c  |   79 ++
+  trunk/src/paranormal/libcalc/storage.h  |   42 +
+  14 files changed, 2099 insertions(+), 2 deletions(-)
+
+
 2006-11-20 21:06:08 +0000  William Pitcock <nenolod@nenolod.net>
   revision [598]
   - pinch xvs's beat detection algorithm.
--- a/src/paranormal/wave.c	Mon Nov 20 13:26:09 2006 -0800
+++ b/src/paranormal/wave.c	Mon Nov 20 14:35:24 2006 -0800
@@ -10,6 +10,8 @@
 
 #include "drawing.h"
 
+#include "libcalc/calc.h"
+
 /* **************** wave_horizontal **************** */
 struct pn_actuator_option_desc wave_horizontal_opts[] =
 {
@@ -398,6 +400,29 @@
   0, wave_radial_opts,
   NULL, NULL, wave_radial_exec
 };
+#if 0
+/* **************** wave_scope **************** */
 
+static struct pn_actuator_option_desc wave_scope_opts[] =
+{
+  {"init_script", "Initialization script.", OPT_TYPE_STRING, {sval: "value=255; points=128;"} },
+  {"frame_script", "Script to run at the beginning of each frame.", OPT_TYPE_STRING, {sval: "x=0; y=0; step=width/points;"} },
+  {"sample_script", "Script to run for each sample.", OPT_TYPE_STRING, {sval: "y = value; x = x + step;"},
+  {"lines", "Use lines instead of dots.", OPT_TYPE_BOOLEAN, {bval: TRUE} },
+  { NULL }
+};
 
+struct pn_scope_data
+{
+  expression_t *expr_on_init, *expr_on_frame, *expr_on_sample;
+  symbol_dict_t *dict;
+};
 
+struct pn_actuator_desc builtin_wave_scope =
+{
+  "wave_scope", "Scope",
+  "A programmable scope.",
+  0, wave_scope_opts,
+  wave_scope_init, wave_scope_cleanup, wave_scope_exec
+};
+#endif