--- ray/src/ot/writemesh.c 2003/09/18 16:53:53 2.3 +++ ray/src/ot/writemesh.c 2004/03/27 12:41:45 2.5 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: writemesh.c,v 2.3 2003/09/18 16:53:53 greg Exp $"; +static const char RCSid[] = "$Id: writemesh.c,v 2.5 2004/03/27 12:41:45 schorsch Exp $"; #endif /* * Routines for writing compiled mesh to a file stream @@ -11,10 +11,16 @@ static const char RCSid[] = "$Id: writemesh.c,v 2.3 20 #include "mesh.h" +static void putfullnode(OCTREE fn, FILE *fp); +static void puttree(OCTREE ot, FILE *fp); +static void putpatch(MESHPATCH *pp, FILE *fp); + + static void -putfullnode(fn, fp) /* write out a full node */ -OCTREE fn; -FILE *fp; +putfullnode( /* write out a full node */ + OCTREE fn, + FILE *fp +) { OBJECT oset[MAXSET+1]; register int i; @@ -26,9 +32,10 @@ FILE *fp; static void -puttree(ot, fp) /* write octree to fp in pre-order form */ -register OCTREE ot; -FILE *fp; +puttree( /* write octree to fp in pre-order form */ + register OCTREE ot, + FILE *fp +) { if (istree(ot)) { @@ -48,9 +55,10 @@ FILE *fp; static void -putpatch(pp, fp) /* write out a mesh patch */ -register MESHPATCH *pp; -FILE *fp; +putpatch( /* write out a mesh patch */ + register MESHPATCH *pp, + FILE *fp +) { int flags = MT_V; int i, j; @@ -74,7 +82,7 @@ FILE *fp; if (flags & MT_UV) for (i = 0; i < pp->nverts; i++) for (j = 0; j < 2; j++) - putint((long)pp->uv[i][j], 2, fp); + putint((long)pp->uv[i][j], 4, fp); /* local triangles */ putint((long)pp->ntris, 2, fp); for (i = 0; i < pp->ntris; i++) {