[Gridflow-cvs] [svn] commit: r4051 - in /trunk: base/flow_objects.c format/aalib.c format/opengl.c format/quartz.m format/sdl.c format/x11.c gridflow.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Jul 18 12:47:56 EDT 2008


Author: matju
Date: Fri Jul 18 12:47:56 2008
New Revision: 4051

Log:
use dex instead of in->dex

Modified:
    trunk/base/flow_objects.c
    trunk/format/aalib.c
    trunk/format/opengl.c
    trunk/format/quartz.m
    trunk/format/sdl.c
    trunk/format/x11.c
    trunk/gridflow.h

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Jul 18 12:47:56 2008
@@ -518,7 +518,7 @@
 } GRID_FLOW {
 	//fprintf(stderr,"d=%d\n",d);
 	if (!put_at) { // reassign
-		COPY(((T *)*(r.next ? r.next.p : &*r.p))+in->dex, data, n);
+		COPY(((T *)*(r.next ? r.next.p : &*r.p))+dex, data, n);
 		return;
 	}
 	// put_at (...)
@@ -577,12 +577,12 @@
 	T tada[n];
 	COPY(tada,data,n);
 	if (loop>1) {
-		if (in->dex+n <= loop) {
-			op->zip(n/op->size,tada,rdata+in->dex);
+		if (dex+n <= loop) {
+			op->zip(n/op->size,tada,rdata+dex);
 		} else {
 			// !@#$ should prebuild and reuse this array when "loop" is small
 			T data2[n];
-			long ii = mod(in->dex,loop);
+			long ii = mod(dex,loop);
 			long m = min(loop-ii,n);
 			COPY(data2,rdata+ii,m);
 			long nn = m+((n-m)/loop)*loop;
@@ -1007,7 +1007,7 @@
 	if (a<b) temp=new Grid(new Dim(a),in->nt);
 	out=new GridOutlet(this,0,dim,in->nt);
 } GRID_FLOW {
-	long i = in->dex;
+	long i = dex;
 	if (!temp) {
 		long n2 = min(n,dim->prod()-i);
 		if (n2>0) out->send(n2,data);
@@ -1075,7 +1075,7 @@
 	if (w<0) w+=in->dim->n;
 	long a = in->factor();
 	long b = r->dim->prod(w);
-	T *data2 = (T *)*r + in->dex*b/a;
+	T *data2 = (T *)*r + dex*b/a;
 	if (a==3 && b==1) {
 		int m = n+n*b/a;
 		T data3[m];
@@ -1527,7 +1527,7 @@
 }
 
 // entry in a compiled convolution kernel
-struct PlanEntry { long y,x; bool neutral; };
+struct PlanEntry {long y,x; bool neutral;};
 
 \class GridConvolve : FObject {
 	\attr Numop *op;
@@ -1618,7 +1618,7 @@
 	if (!wrap) {v[0]-=db->v[0]-1; v[1]-=db->v[1]-1;}
 	out=new GridOutlet(this,0,new Dim(da->n,v),in->nt);
 } GRID_FLOW {
-	COPY((T *)*a+in->dex, data, n);
+	COPY((T *)*a+dex, data, n);
 } GRID_FINISH {
 	make_plan((T)0);
 	long dbx = b->dim->get(1);
@@ -1750,7 +1750,7 @@
 	int rowsize2 = temp->dim->prod(1);
 	T *buf = (T *)*temp; //!@#$ maybe should be something else than T ?
 	int xinc = in->dim->get(2)*scalex;
-	int y = in->dex / rowsize;
+	int y = dex / rowsize;
 	int chans=in->dim->get(2);
 	#define Z(z) buf[p+z]+=data[i+z]
 	if (smoothly) {
@@ -1818,7 +1818,7 @@
 	in->set_chunk(2);
 	out=new GridOutlet(this,0,r->dim);
 } GRID_FLOW {
-	T *rr = ((T *)*r) + in->dex*3/4;
+	T *rr = ((T *)*r) + dex*3/4;
 	T foo[n*3/4];
 #define COMPUTE_ALPHA(c,a) \
 	foo[j+c] = (data[i+c]*data[i+a] + rr[j+c]*(256-data[i+a])) >> 8
@@ -1932,7 +1932,7 @@
 	int nl = lines->dim->get(0);
 	Line *ld = (Line *)(int32 *)*lines;
 	int f = in->factor();
-	int y = in->dex/f;
+	int y = dex/f;
 	int cn = color->dim->prod();
 	T *cd = (T *)*color2;
 	while (n) {
@@ -2087,7 +2087,7 @@
 	in->set_chunk(1);
 } GRID_FLOW {
 	int f = in->factor();
-	int y = in->dex/f;
+	int y = dex/f;
 	if (position->nt != int32_e) RAISE("position has to be int32");
 	int py = ((int32*)*position)[0], rsy = image->dim->v[0];
 	int px = ((int32*)*position)[1], rsx = image->dim->v[1], sx=in->dim->get(1);

Modified: trunk/format/aalib.c
==============================================================================
--- trunk/format/aalib.c (original)
+++ trunk/format/aalib.c Fri Jul 18 12:47:56 2008
@@ -82,7 +82,7 @@
 	int f = in->factor();
 	if (raw_mode) {
 		int sx = min(f,aa_scrwidth(context));
-		int y = in->dex/f;
+		int y = dex/f;
 		while (n) {
 			if (y>=aa_scrheight(context)) return;
 			for (int x=0; x<sx; x++) {
@@ -95,7 +95,7 @@
 		}
 	} else {
 		int sx = min(f,context->imgwidth);
-		int y = in->dex/f;
+		int y = dex/f;
 		while (n) {
 			if (y>=context->imgheight) return;
 			for (int x=0; x<sx; x++) aa_putpixel(context,x,y,data[x]);

Modified: trunk/format/opengl.c
==============================================================================
--- trunk/format/opengl.c (original)
+++ trunk/format/opengl.c Fri Jul 18 12:47:56 2008
@@ -162,7 +162,7 @@
 	int sxc = in->dim->prod(1);
 	int sx = in->dim->get(1);
 	int bypl = 4*sx;
-	int y = in->dex / sxc;
+	int y = dex/sxc;
 	for (; n>0; y++, data+=sxc, n-=sxc) bit_packing->pack(sx, data, buf+y*bypl);
 	} GRID_FINISH {
 } GRID_END

Modified: trunk/format/quartz.m
==============================================================================
--- trunk/format/quartz.m (original)
+++ trunk/format/quartz.m Fri Jul 18 12:47:56 2008
@@ -185,7 +185,7 @@
 	GFView_imageHeight_width(widget,in->dim->get(0),in->dim->get(1));
 	in->set_chunk(1);
 } GRID_FLOW {
-	int off = in->dex/in->dim->prod(2);
+	int off = dex/in->dim->prod(2);
 	int c=in->dim->get(2);
 	NSView *w = widget;
 	uint8 *data2 = GFView_imageData(w)+off*4;

Modified: trunk/format/sdl.c
==============================================================================
--- trunk/format/sdl.c (original)
+++ trunk/format/sdl.c Fri Jul 18 12:47:56 2008
@@ -188,7 +188,7 @@
 	int bypl = screen->pitch;
 	int sxc = in->dim->prod(1);
 	int sx = in->dim->get(1);
-	int y = in->dex / sxc;
+	int y = dex/sxc;
 	if (SDL_MUSTLOCK(screen)) if (SDL_LockSurface(screen) < 0) return; //???
 	for (; n>0; y++, data+=sxc, n-=sxc) {
 		/* convert line */

Modified: trunk/format/x11.c
==============================================================================
--- trunk/format/x11.c (original)
+++ trunk/format/x11.c Fri Jul 18 12:47:56 2008
@@ -511,7 +511,7 @@
 	int bypl = ximage->bytes_per_line;
 	int sxc = in->dim->prod(1);
 	int sx = in->dim->get(1);
-	int y = in->dex/sxc;
+	int y = dex/sxc;
 	for (; n>0; y++, data+=sxc, n-=sxc) {
 		// convert line
 		if (use_stripes) {

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Fri Jul 18 12:47:56 2008
@@ -692,12 +692,12 @@
 /* macro for defining a gridinlet's behaviour as just storage (no backstore) */
 // V is a PtrGrid instance-var
 #define GRID_INPUT(I,V) \
-	GRID_INLET(I) {V=new Grid(in->dim,NumberTypeE_type_of(data));} GRID_FLOW {COPY((T *)*(V)+in->dex,data,n);} GRID_FINISH
+	GRID_INLET(I) {V=new Grid(in->dim,NumberTypeE_type_of(data));} GRID_FLOW {COPY((T *)*(V)+dex,data,n);} GRID_FINISH
 
 // macro for defining a gridinlet's behaviour as just storage (with backstore)
 // V is a PtrGrid instance-var
 #define GRID_INPUT2(I,V) GRID_INLET(I) {V.next = new Grid(in->dim,NumberTypeE_type_of(data));} \
-	GRID_FLOW {COPY(((T *)*(V.next?V.next.p:&*V.p))+in->dex, data, n);} GRID_FINISH
+	GRID_FLOW {COPY(((T *)*(V.next?V.next.p:&*V.p))+dex,data,n);} GRID_FINISH
 
 typedef struct GridInlet GridInlet;
 typedef struct GridHandler {



More information about the Gridflow-cvs mailing list