| 778 | } |
| 779 | |
| 780 | struct selectionvar * |
| 781 | selection_from_mkroom(struct mkroom *croom) |
| 782 | { |
| 783 | struct selectionvar *sel = selection_new(); |
| 784 | coordxy x, y; |
| 785 | unsigned rmno; |
| 786 | |
| 787 | if (!croom && gc.coder && gc.coder->croom) |
| 788 | croom = gc.coder->croom; |
| 789 | if (!croom) |
| 790 | return sel; |
| 791 | |
| 792 | rmno = (unsigned)((croom - svr.rooms) + ROOMOFFSET); |
| 793 | for (y = croom->ly; y <= croom->hy; y++) |
| 794 | for (x = croom->lx; x <= croom->hx; x++) |
| 795 | if (isok(x, y) && !levl[x][y].edge |
| 796 | && levl[x][y].roomno == rmno) |
| 797 | selection_setpoint(x, y, sel, 1); |
| 798 | return sel; |
| 799 | } |
| 800 | |
| 801 | void |
| 802 | selection_force_newsyms(struct selectionvar *sel) |
no test coverage detected