463 |
|
newp.h[i] = p->h[i]; |
464 |
|
} |
465 |
|
/* spread reference and opposite */ |
466 |
< |
if (p->x[1] > p->x[0]) { |
466 |
> |
if (p->x[2] > p->x[0]) { |
467 |
|
newp.x[0] -= 2; |
468 |
< |
newp.x[1] += 2; |
468 |
> |
newp.x[1] -= 2; |
469 |
|
newp.x[2] += 2; |
470 |
< |
newp.x[3] -= 2; |
471 |
< |
} else if (p->x[0] > p->x[1]) { |
470 |
> |
newp.x[3] += 2; |
471 |
> |
} else if (p->x[0] > p->x[2]) { |
472 |
|
newp.x[0] += 2; |
473 |
< |
newp.x[1] -= 2; |
473 |
> |
newp.x[1] += 2; |
474 |
|
newp.x[2] -= 2; |
475 |
< |
newp.x[3] += 2; |
475 |
> |
newp.x[3] -= 2; |
476 |
|
} |
477 |
< |
if (p->y[1] > p->y[0]) { |
477 |
> |
if (p->y[2] > p->y[0]) { |
478 |
|
newp.y[0] -= 2; |
479 |
< |
newp.y[1] += 2; |
479 |
> |
newp.y[1] -= 2; |
480 |
|
newp.y[2] += 2; |
481 |
< |
newp.y[3] -= 2; |
482 |
< |
} else if (p->y[0] > p->y[1]) { |
481 |
> |
newp.y[3] += 2; |
482 |
> |
} else if (p->y[0] > p->y[2]) { |
483 |
|
newp.y[0] += 2; |
484 |
< |
newp.y[1] -= 2; |
484 |
> |
newp.y[1] += 2; |
485 |
|
newp.y[2] -= 2; |
486 |
< |
newp.y[3] += 2; |
486 |
> |
newp.y[3] -= 2; |
487 |
|
} |
488 |
|
/* put out faces */ |
489 |
|
sprintf(buf, "op%d", ++nopens); |