Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Closed REQ 5194]: 16-bit VECT counters
No, VECT counts are still 16-bit values, sorry. You could, if you feel like it, make the modification yourself and build a copy of geomview from source. Only three files should need to change, all in the directory src/lib/gprim/vect. You could fetch the Geomview source distribution (pub/software/geomview/geomview-src.tar.Z), extract it, cd to that directory, feed this e-mail message to the "patch" program, and build geomview as described in the file INSTALL. The only problem would be that, after being modified this way, Geomview wouldn't be able to read VECT BINARY files which were compatible with the normal version. Plain ASCII VECT files would still be interchangeable. I haven't tried this patch, but this should be all that needs to change. --- old/vectP.h Tue Feb 25 20:15:36 1992 +++ vectP.h Wed Jan 18 09:48:39 1995 @@ -57,8 +57,8 @@ GEOMFIELDS int flag, nvec, nvert, ncolor; int seq; /* for 4D -> 3D tforms */ - short *vnvert; /* vnvert[nvec] (# p[]'s per vec) */ - short *vncolor; /* vncolor[nvec] (# c[]'s per vec) */ + int *vnvert; /* vnvert[nvec] (# p[]'s per vec) */ + int *vncolor; /* vncolor[nvec] (# c[]'s per vec) */ /* NOTE: vnvert and vncolor lie in a *single* malloc'ed area */ /* To free, OOGLFree(vnvert). */ HPoint3 *p; /* p[nvert] */ --- old/vectcreate.c Sun Jul 18 22:06:18 1993 +++ vectcreate.c Wed Jan 18 09:48:54 1995 @@ -29,13 +29,13 @@ v->p = OOGLNewNE(HPoint3, ov->nvert, "Vect vertices"); v->c = ov->ncolor ? OOGLNewNE(ColorA, ov->ncolor, "Vect colors") : NULL; - v->vnvert = OOGLNewNE(short, ov->nvec, "Vect nverts"); - v->vncolor = OOGLNewNE(short, ov->nvec, "Vect nverts"); + v->vnvert = OOGLNewNE(int, ov->nvec, "Vect nverts"); + v->vncolor = OOGLNewNE(int, ov->nvec, "Vect nverts"); memcpy(v->p, ov->p, ov->nvert * sizeof(HPoint3)); memcpy(v->c, ov->c, ov->ncolor * sizeof(ColorA)); - memcpy(v->vnvert, ov->vnvert, ov->nvec * sizeof(short)); - memcpy(v->vncolor, ov->vncolor, ov->nvec * sizeof(short)); + memcpy(v->vnvert, ov->vnvert, ov->nvec * sizeof(int)); + memcpy(v->vncolor, ov->vncolor, ov->nvec * sizeof(int)); return(v); } @@ -56,8 +56,8 @@ int attr, copy = 1; int police = 1; /* by default, check the input to see it's good */ - short *vectcounts; /* vectcounts[0..nvec-1] */ - short *colorcounts; /* colorcounts[0..nvec-1] */ + int *vectcounts; /* vectcounts[0..nvec-1] */ + int *colorcounts; /* colorcounts[0..nvec-1] */ Point3 *v3; HPoint3 *v4; /* vertices[0..nvert-1] */ ColorA *colors; /* colors[0..ncolor-1] */ @@ -105,13 +105,13 @@ break; case CR_VECTC: - vectcounts = va_arg (a_list, short *); + vectcounts = va_arg (a_list, int *); if(vect->vnvert) OOGLFree(vect->vnvert); if (vectcounts == NULL) { vect->vnvert = NULL; vect->nvert = 0; } else if (copy) { - vect->vnvert = OOGLNewNE(short, vect->nvec, "vect vert counts"); + vect->vnvert = OOGLNewNE(int, vect->nvec, "vect vert counts"); memcpy(vect->vnvert, vectcounts, vect->nvec*sizeof(*vect->vnvert)); } else { vect->vnvert = vectcounts; @@ -119,13 +119,13 @@ break; case CR_COLRC: - colorcounts = va_arg (a_list, short *); + colorcounts = va_arg (a_list, int *); if(vect->vncolor) OOGLFree(vect->vncolor); if (colorcounts == NULL) { vect->vncolor = NULL; vect->nvert = 0; } else if (copy) { - vect->vncolor = OOGLNewNE(short, vect->nvec, "vect vert counts"); + vect->vncolor = OOGLNewNE(int, vect->nvec, "vect vert counts"); memcpy(vect->vncolor, colorcounts, vect->nvec*sizeof(*vect->vncolor)); } else { vect->vncolor = colorcounts; @@ -210,7 +210,7 @@ { register int i; register int vleft, cleft; - register short *p, *c; + register int *p, *c; if(!vSane(vect)) return(0); --- old/vectload.c Mon Dec 28 19:01:45 1992 +++ vectload.c Wed Jan 18 09:49:07 1995 @@ -74,19 +74,19 @@ goto bogus; } - v->vnvert = OOGLNewNE(short, 2*v->nvec, "VECT nvec counts"); + v->vnvert = OOGLNewNE(int, 2*v->nvec, "VECT nvec counts"); v->p = OOGLNewNE(HPoint3, v->nvert, "VECT vertices"); v->c = OOGLNewNE(ColorA, (v->ncolor>0) ? v->ncolor : 1, "VECT colors"); v->vncolor = v->vnvert + v->nvec; - if((i = fgetns(file, v->nvec, v->vnvert, binary)) < v->nvec) { + if((i = fgetni(file, v->nvec, v->vnvert, binary)) < v->nvec) { OOGLSyntax(file, "Reading VECT from \"%s\": bad vertex count in %d'th polyline (of %d)", fname, i, v->nvec); goto bogus; } - if((i = fgetns(file, v->nvec, v->vncolor, binary)) < v->nvec) { + if((i = fgetni(file, v->nvec, v->vncolor, binary)) < v->nvec) { OOGLSyntax(file, "Reading VECT from \"%s\": bad color count in %d'th polyline (of %d)", fname, i, v->nvec); - Stuart
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |