is x,y location such that NEWS direction from it is inside aroom, excluding subrooms */
| 678 | /* is x,y location such that NEWS direction from it is inside aroom, |
| 679 | excluding subrooms */ |
| 680 | staticfn boolean |
| 681 | cardinal_nextto_room(struct mkroom *aroom, coordxy x, coordxy y) |
| 682 | { |
| 683 | int rmno = (int) ((aroom - svr.rooms) + ROOMOFFSET); |
| 684 | |
| 685 | if (isok(x - 1, y) && !levl[x - 1][y].edge |
| 686 | && (int) levl[x - 1][y].roomno == rmno) |
| 687 | return TRUE; |
| 688 | if (isok(x + 1, y) && !levl[x + 1][y].edge |
| 689 | && (int) levl[x + 1][y].roomno == rmno) |
| 690 | return TRUE; |
| 691 | if (isok(x, y - 1) && !levl[x][y - 1].edge |
| 692 | && (int) levl[x][y - 1].roomno == rmno) |
| 693 | return TRUE; |
| 694 | if (isok(x, y + 1) && !levl[x][y + 1].edge |
| 695 | && (int) levl[x][y + 1].roomno == rmno) |
| 696 | return TRUE; |
| 697 | return FALSE; |
| 698 | } |
| 699 | |
| 700 | staticfn boolean |
| 701 | place_niche( |