| 574 | } |
| 575 | |
| 576 | staticfn coord * |
| 577 | shrine_pos(int roomno) |
| 578 | { |
| 579 | static coord buf; |
| 580 | int delta; |
| 581 | struct mkroom *troom = &svr.rooms[roomno - ROOMOFFSET]; |
| 582 | |
| 583 | /* if width and height are odd, placement will be the exact center; |
| 584 | if either or both are even, center point is a hypothetical spot |
| 585 | between map locations and placement will be adjacent to that */ |
| 586 | delta = troom->hx - troom->lx; |
| 587 | buf.x = troom->lx + delta / 2; |
| 588 | if ((delta % 2) && rn2(2)) |
| 589 | buf.x++; |
| 590 | delta = troom->hy - troom->ly; |
| 591 | buf.y = troom->ly + delta / 2; |
| 592 | if ((delta % 2) && rn2(2)) |
| 593 | buf.y++; |
| 594 | return &buf; |
| 595 | } |
| 596 | |
| 597 | staticfn void |
| 598 | mktemple(void) |