X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=view.c;h=d2650113e0d00f98d703c67928f2aa072a6ea0b6;hp=cfa39753f1e89d29329ce115d1328c98c9914f57;hb=61445feaec7fcaea35b224a3400b14e36fc8c3b1;hpb=62f97dcbc53754ef8a81add86946e54825c4c096 diff --git a/view.c b/view.c index cfa3975..d265011 100644 --- a/view.c +++ b/view.c @@ -84,9 +84,12 @@ static void generate_display_list(void) { * orientable so it shouldn't matter). Picking the parallelogram * to our right avoids getting it wrong at the join. */ +//if ((vb & YMASK) > Y1) continue; +//if ((vb & XMASK) > 2) continue; for (e=0; e=0); if (ve[5]>=0) addtriangle(vb,ve[0],ve[5]); +//continue; if (ve[1]>=0) addtriangle(vb,ve[1],ve[0]); } @@ -97,7 +100,7 @@ static void generate_display_list(void) { if (vertex_in_triangles[v] != expd) { fprintf(stderr,"vertex %02x used for %d triangles, expected %d\n", v, vertex_in_triangles[v], expd); - abort(); +// abort(); } } vertex_in_triangles_checked= 1; @@ -107,7 +110,7 @@ static void generate_display_list(void) { static int dl_compare(const void *tav, const void *tbv) { int i; const Triangle *const *tap= tav, *ta= *tap; - const Triangle *const *tbp= tbp, *tb= *tbp; + const Triangle *const *tbp= tbv, *tb= *tbp; double za=0, zb=0; for (i=0; i<3; i++) { za += ta->vertex[i][2]; @@ -148,7 +151,7 @@ static void drawtriangle(const Triangle *t) { int i; for (i=0; i<3; i++) { - double *v= t->vertex[i]; + const double *v= t->vertex[i]; double x= v[0]; double y= v[1]; double z= v[2];