[Gridflow-cvs] [svn] commit: r5192 - in /trunk/src: quartz.m sdl.cxx x11.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Mar 27 19:10:26 EDT 2010


Author: matju
Date: Sat Mar 27 19:10:25 2010
New Revision: 5192

Log:
 * [#out x11] [#out quartz] [#out sdl] accept greyscale

Modified:
    trunk/src/quartz.m
    trunk/src/sdl.cxx
    trunk/src/x11.cxx

Modified: trunk/src/quartz.m
==============================================================================
--- trunk/src/quartz.m (original)
+++ trunk/src/quartz.m Sat Mar 27 19:10:25 2010
@@ -165,6 +165,7 @@
 	\decl 0 title (string title="");
 	\decl 0 move (int y, int x);
 	\decl 0 set_geometry (int y, int x, int sy, int sx);
+	\decl 0 loadbang () {outlet_anything(outlets[0],gensym("nogrey"),0,0);}
 	\grin 0
 };
 

Modified: trunk/src/sdl.cxx
==============================================================================
--- trunk/src/sdl.cxx (original)
+++ trunk/src/sdl.cxx Sat Mar 27 19:10:25 2010
@@ -160,6 +160,7 @@
 	\decl 0 position   (...) {outlet_anything(outlets[0],gensym("position"),  argc,argv);}
 	\decl 0 keypress   (...) {outlet_anything(outlets[0],gensym("keypress"),  argc,argv);}
 	\decl 0 keyrelease (...) {outlet_anything(outlets[0],gensym("keyrelease"),argc,argv);}
+	\decl 0 loadbang () {outlet_anything(outlets[0],gensym("nogrey"),0,0);}
 	\constructor (t_symbol *mode) {
 		pd_bind((t_pd *)bself,gensym("#sdl"));
 		if (!in_use) start();

Modified: trunk/src/x11.cxx
==============================================================================
--- trunk/src/x11.cxx (original)
+++ trunk/src/x11.cxx Sat Mar 27 19:10:25 2010
@@ -228,6 +228,7 @@
 	\decl 0 warp (int y, int x);
 	\decl 0 fullscreen (bool toggle=1); // not working
 	\decl 0 border     (bool toggle=1);
+	\decl 0 loadbang () {outlet_anything(outlets[0],gensym("nogrey"),0,0);}
 //	\decl 0 raise ();
 	\grin 0 int
 };
@@ -616,12 +617,8 @@
 		// convert line
 		if (use_stripes) {
 			int o=y*bypl;
-			for (int x=0, i=0, k=y%3; x<sx; x++, i+=3, k=(k+1)%3) {
-				image[o+x] = (k<<6) | data[i+k]>>2;
-			}
-		} else {
-			bit_packing->pack(sx, data, image+y*bypl);
-		}
+			for (int x=0, i=0, k=y%3; x<sx; x++, i+=3, k=(k+1)%3) {image[o+x] = (k<<6) | data[i+k]>>2;}
+		} else bit_packing->pack(sx, data, image+y*bypl);
 	}
 } GRID_FINISH {
 	show_section(0,0,in->dim->get(1),in->dim->get(0));



More information about the Gridflow-cvs mailing list