| 7 |
|
|
| 8 |
|
#include <time.h> |
| 9 |
|
|
| 10 |
– |
#include "standard.h" |
| 10 |
|
#include "platform.h" |
| 11 |
+ |
#include "standard.h" |
| 12 |
|
#include "octree.h" |
| 13 |
|
#include "object.h" |
| 14 |
|
#include "mesh.h" |
| 15 |
|
#include "resolu.h" |
| 16 |
|
|
| 17 |
+ |
#ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ |
| 18 |
+ |
#define getc getc_unlocked |
| 19 |
+ |
#endif |
| 20 |
+ |
|
| 21 |
|
static char *meshfn; /* input file name */ |
| 22 |
|
static FILE *meshfp; /* mesh file pointer */ |
| 23 |
|
static int objsize; /* sizeof(OBJECT) from writer */ |
| 149 |
|
} else |
| 150 |
|
pp->norm = NULL; |
| 151 |
|
if (flags & MT_UV) { |
| 152 |
< |
pp->uv = (uint16 (*)[2])calloc(pp->nverts, 2*sizeof(uint16)); |
| 152 |
> |
pp->uv = (uint32 (*)[2])calloc(pp->nverts, 2*sizeof(uint32)); |
| 153 |
|
if (pp->uv == NULL) |
| 154 |
|
goto nomem; |
| 155 |
|
} else |
| 166 |
|
if (flags & MT_UV) |
| 167 |
|
for (i = 0; i < pp->nverts; i++) |
| 168 |
|
for (j = 0; j < 2; j++) |
| 169 |
< |
pp->uv[i][j] = mgetint(2); |
| 169 |
> |
pp->uv[i][j] = mgetint(4); |
| 170 |
|
/* local triangles */ |
| 171 |
|
pp->ntris = mgetint(2); |
| 172 |
|
if (pp->ntris < 0 || pp->ntris > 512) |