52 |
|
cvcmp(const char *vv1, const char *vv2) /* compare encoded vertices */ |
53 |
|
{ |
54 |
|
const MCVERT *v1 = (const MCVERT *)vv1, *v2 = (const MCVERT *)vv2; |
55 |
+ |
|
56 |
|
if (v1->fl != v2->fl) |
57 |
|
return(1); |
58 |
|
if (v1->xyz[0] != v2->xyz[0]) |
328 |
|
|
329 |
|
int32 |
330 |
|
addmeshvert( /* find/add a mesh vertex */ |
331 |
< |
MESH *mp, |
331 |
> |
MESH *mp, |
332 |
|
MESHVERT *vp |
333 |
|
) |
334 |
|
{ |
335 |
< |
LUENT *lvp; |
336 |
< |
MCVERT cv; |
335 |
> |
LUENT *lvp; |
336 |
> |
MCVERT cv; |
337 |
|
int i; |
338 |
|
|
339 |
|
if (!(vp->fl & MT_V)) |
440 |
|
OBJECT mo |
441 |
|
) |
442 |
|
{ |
443 |
< |
int32 vid[3], t; |
444 |
< |
int pn[3], i; |
443 |
> |
int32 vid[3], t; |
444 |
> |
int pn[3], i; |
445 |
|
MESHPATCH *pp; |
446 |
|
|
447 |
|
if (!(tv[0].fl & tv[1].fl & tv[2].fl & MT_V)) |
460 |
|
error(INTERNAL, "modifier range error in addmeshtri"); |
461 |
|
} |
462 |
|
/* assign triangle */ |
463 |
< |
if (pn[0] == pn[1] && pn[1] == pn[2]) { /* local case */ |
463 |
> |
if ((pn[0] == pn[1]) & (pn[1] == pn[2])) { /* local case */ |
464 |
|
pp = &mp->patch[pn[0]]; |
465 |
|
if (pp->tri == NULL) { |
466 |
|
pp->tri = (struct PTri *)malloc( |
486 |
|
pp->trimat[pp->ntris] = mo; |
487 |
|
return(pn[0] << 10 | pp->ntris++); |
488 |
|
} |
489 |
< |
} |
489 |
< |
if (pn[0] == pn[1]) { |
489 |
> |
} else if (pn[0] == pn[1]) { |
490 |
|
t = vid[2]; vid[2] = vid[1]; vid[1] = vid[0]; vid[0] = t; |
491 |
|
i = pn[2]; pn[2] = pn[1]; pn[1] = pn[0]; pn[0] = i; |
492 |
|
} else if (pn[0] == pn[2]) { |
535 |
|
{ |
536 |
|
static char embuf[128]; |
537 |
|
int nouvbounds = 1; |
538 |
< |
int i; |
538 |
> |
int i; |
539 |
|
/* basic checks */ |
540 |
|
if (mp == NULL) |
541 |
|
return("NULL mesh pointer"); |