--- ray/src/common/readmesh.c 2003/06/20 00:25:49 2.6 +++ ray/src/common/readmesh.c 2003/10/22 02:06:34 2.10 @@ -1,12 +1,14 @@ #ifndef lint -static const char RCSid[] = "$Id: readmesh.c,v 2.6 2003/06/20 00:25:49 greg Exp $"; +static const char RCSid[] = "$Id: readmesh.c,v 2.10 2003/10/22 02:06:34 greg Exp $"; #endif /* * Routines for reading a compiled mesh from a file */ -#include "standard.h" +#include + #include "platform.h" +#include "standard.h" #include "octree.h" #include "object.h" #include "mesh.h" @@ -90,7 +92,7 @@ gettree() /* get a pre-ordered octree */ default: mesherror(USER, "damaged mesh octree"); } - return NULL; /* pro forma return */ + return (OCTREE)NULL; /* pro forma return */ } @@ -143,7 +145,7 @@ register MESHPATCH *pp; } else pp->norm = NULL; if (flags & MT_UV) { - pp->uv = (uint32 (*)[2])calloc(pp->nverts, 2*sizeof(uint32)); + pp->uv = (uint16 (*)[2])calloc(pp->nverts, 2*sizeof(uint16)); if (pp->uv == NULL) goto nomem; } else @@ -160,7 +162,7 @@ register MESHPATCH *pp; if (flags & MT_UV) for (i = 0; i < pp->nverts; i++) for (j = 0; j < 2; j++) - pp->uv[i][j] = mgetint(4); + pp->uv[i][j] = mgetint(2); /* local triangles */ pp->ntris = mgetint(2); if (pp->ntris < 0 || pp->ntris > 512)