# HG changeset patch # User nenolod # Date 1165386596 28800 # Node ID 5d12ef0b97a5f3b9be8cc864c8acd43079f0b0cf # Parent 8554beb862c05e9725bad1c2e22a16761aa5c4a0 [svn] - note that the dynamic transform is slow diff -r 8554beb862c0 -r 5d12ef0b97a5 ChangeLog --- 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 + 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 revision [734] Goodbye, is_our_file! diff -r 8554beb862c0 -r 5d12ef0b97a5 src/paranormal/xform.c --- 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);