changeset 337:5d12ef0b97a5 trunk

[svn] - note that the dynamic transform is slow
author nenolod
date Tue, 05 Dec 2006 22:29:56 -0800
parents 8554beb862c0
children d517fc608e89
files ChangeLog src/paranormal/xform.c
diffstat 2 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Dec 05 14:10:31 2006 -0800
+++ b/ChangeLog	Tue Dec 05 22:29:56 2006 -0800
@@ -1,3 +1,12 @@
+2006-12-05 22:10:31 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [736]
+  - implement AVS-like Trans / Dynamic Movement
+  
+  trunk/src/paranormal/builtins.c |    2 
+  trunk/src/paranormal/xform.c    |  152 ++++++++++++++++++++++++++++++++++++++++
+  2 files changed, 154 insertions(+)
+
+
 2006-12-05 12:02:51 +0000  Kiyoshi Aman <kiyoshi.aman@gmail.com>
   revision [734]
   Goodbye, is_our_file!
--- a/src/paranormal/xform.c	Tue Dec 05 14:10:31 2006 -0800
+++ b/src/paranormal/xform.c	Tue Dec 05 22:29:56 2006 -0800
@@ -566,6 +566,7 @@
 };
 
 /* **************** xform_dynmovement **************** */
+/* FIXME: really slow */
 struct pn_actuator_option_desc xform_dynmovement_opts[] =
 {
   { "init_script", "The formula to evaluate on init.",
@@ -600,11 +601,11 @@
     if (d)
       {
          if (d->expr_init)
-             expression_free (d->expr_init);
+             expr_free (d->expr_init);
          if (d->expr_frame)
-             expression_free (d->expr_frame);
+             expr_free (d->expr_frame);
          if (d->expr_point)
-             expression_free (d->expr_point);
+             expr_free (d->expr_point);
          if (d->dict)
              dict_free (d->dict);
          if (d->vfield)
@@ -646,12 +647,9 @@
           d->dict = dict_new();
         }
 
-      rf = dict_variable(d->dict, "r");
-      df = dict_variable(d->dict, "d");
-
       if (d->expr_init)
         {
-          expression_free(d->expr_init);
+          expr_free(d->expr_init);
           d->expr_init = NULL;
         }
 
@@ -670,6 +668,9 @@
 			    * d->width * d->height);
    }
 
+   rf = dict_variable(d->dict, "r");
+   df = dict_variable(d->dict, "d");
+
    /* run the on-frame script. */
    if (d->expr_frame != NULL)
      expr_execute(d->expr_frame, d->dict);