MCPcopy Create free account
hub / github.com/NetHack/NetHack / selection_from_mkroom

Function selection_from_mkroom

src/selvar.c:780–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780struct selectionvar *
781selection_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
801void
802selection_force_newsyms(struct selectionvar *sel)

Callers 1

l_selection_roomFunction · 0.85

Calls 3

selection_newFunction · 0.85
isokFunction · 0.85
selection_setpointFunction · 0.85

Tested by

no test coverage detected