changeset 275:a1517b09cb3a trunk

[svn] - add an option to make it only render the downscaled image.
author nenolod
date Sun, 19 Nov 2006 14:11:07 -0800
parents ebc4497b8044
children 5e04a1e49f2d
files ChangeLog src/paranormal/xform.c
diffstat 2 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Nov 19 12:38:53 2006 -0800
+++ b/ChangeLog	Sun Nov 19 14:11:07 2006 -0800
@@ -1,3 +1,12 @@
+2006-11-19 20:38:53 +0000  Kiyoshi Aman <kiyoshi.aman@gmail.com>
+  revision [576]
+  Another demo of the halfrender transform.
+  
+  trunk/src/paranormal/presets/Makefile                |    3 +
+  trunk/src/paranormal/presets/aerdan_-_telestatic.pnv |   30 +++++++++++++++++++
+  2 files changed, 32 insertions(+), 1 deletion(-)
+
+
 2006-11-19 20:06:20 +0000  William Pitcock <nenolod@nenolod.net>
   revision [574]
   - add halfrender transform, and a new preset which demonstrates what it can do.
--- a/src/paranormal/xform.c	Sun Nov 19 12:38:53 2006 -0800
+++ b/src/paranormal/xform.c	Sun Nov 19 14:11:07 2006 -0800
@@ -388,6 +388,8 @@
 {
   { "direction", "Negative is horizontal, positive is vertical.", 
     OPT_TYPE_INT, { ival: 1 } },
+  { "render_twice", "Render the second image.",
+    OPT_TYPE_BOOLEAN, { bval: TRUE } },
   { NULL }
 };
 
@@ -405,8 +407,11 @@
               {
                  pn_image_data->surface[1][PN_IMG_INDEX(x, y / 2)] =
                    pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
-                 pn_image_data->surface[1][PN_IMG_INDEX(x, (y / 2) + (pn_image_data->height / 2))] =
-                   pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
+	         if (opts[1].val.bval)
+                   {
+                     pn_image_data->surface[1][PN_IMG_INDEX(x, (y / 2) + (pn_image_data->height / 2))] =
+                       pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
+                   }
               }
          }
     }
@@ -418,8 +423,11 @@
               {
                  pn_image_data->surface[1][PN_IMG_INDEX(x / 2, y)] =
                    pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
-                 pn_image_data->surface[1][PN_IMG_INDEX((x / 2) + (pn_image_data->width / 2), y)] =
-                   pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
+                 if (opts[1].val.bval)
+                   {
+                     pn_image_data->surface[1][PN_IMG_INDEX((x / 2) + (pn_image_data->width / 2), y)] =
+                       pn_image_data->surface[0][PN_IMG_INDEX(x, y)];
+                   }
               }
          }
     }