changeset 271:b166ce84af57 trunk

[svn] - add swap surface
author nenolod
date Sun, 19 Nov 2006 11:20:18 -0800
parents b1574873f2ed
children d8cefe8ce6e6
files ChangeLog src/paranormal/TODO src/paranormal/builtins.c src/paranormal/general.c
diffstat 4 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Nov 19 10:34:45 2006 -0800
+++ b/ChangeLog	Sun Nov 19 11:20:18 2006 -0800
@@ -1,3 +1,11 @@
+2006-11-19 18:34:45 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [568]
+  - by constant request, add a TODO.
+  
+  trunk/src/paranormal/TODO |   20 ++++++++++++++++++++
+  1 file changed, 20 insertions(+)
+
+
 2006-11-19 16:23:35 +0000  William Pitcock <nenolod@nenolod.net>
   revision [566]
   - properly calculate points
--- a/src/paranormal/TODO	Sun Nov 19 10:34:45 2006 -0800
+++ b/src/paranormal/TODO	Sun Nov 19 11:20:18 2006 -0800
@@ -1,6 +1,5 @@
 More immediate points:
 
-- swap surface
 - blend surface
 
 - xform_half
--- a/src/paranormal/builtins.c	Sun Nov 19 10:34:45 2006 -0800
+++ b/src/paranormal/builtins.c	Sun Nov 19 11:20:18 2006 -0800
@@ -30,6 +30,7 @@
 DECLARE_ACTUATOR (general_noop);
 DECLARE_ACTUATOR (general_invert);
 DECLARE_ACTUATOR (general_replace);
+DECLARE_ACTUATOR (general_swap);
 
 /* **************** misc **************** */
 DECLARE_ACTUATOR (misc_floater);
@@ -69,6 +70,7 @@
   &builtin_general_noop,
   &builtin_general_invert,
   &builtin_general_replace,
+  &builtin_general_swap,
   /* **************** misc **************** */
   &builtin_misc_floater,
   /* **************** wave **************** */
--- a/src/paranormal/general.c	Sun Nov 19 10:34:45 2006 -0800
+++ b/src/paranormal/general.c	Sun Nov 19 11:20:18 2006 -0800
@@ -236,3 +236,17 @@
   NULL, NULL, general_replace_exec
 };
 
+/* **************** general_swap **************** */
+static void
+general_swap_exec (const struct pn_actuator_option *opts,
+	   gpointer data)
+{
+  pn_swap_surfaces ();
+}
+
+struct pn_actuator_desc builtin_general_swap =
+{
+  "general_swap", "Swap Surface", "Swaps the surface.",
+  0, NULL,
+  NULL, NULL, general_swap_exec
+};