| 1657 | |
| 1658 | /* Find an unused room for a branch location. */ |
| 1659 | staticfn struct mkroom * |
| 1660 | find_branch_room(coord *mp) |
| 1661 | { |
| 1662 | struct mkroom *croom = 0; |
| 1663 | |
| 1664 | if (svn.nroom == 0) { |
| 1665 | mazexy(mp); /* already verifies location */ |
| 1666 | } else { |
| 1667 | croom = generate_stairs_find_room(); |
| 1668 | assert(croom != NULL); /* Null iff nroom==0 which won't get here */ |
| 1669 | if (!somexyspace(croom, mp)) |
| 1670 | impossible("Can't place branch!"); |
| 1671 | } |
| 1672 | return croom; |
| 1673 | } |
| 1674 | |
| 1675 | /* Find the room for (x,y). Return null if not in a room. */ |
| 1676 | staticfn struct mkroom * |
no test coverage detected