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

Function inside_room

src/mkroom.c:677–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677boolean
678inside_room(struct mkroom *croom, coordxy x, coordxy y)
679{
680 if (croom->irregular) {
681 int i = (int) ((croom - svr.rooms) + ROOMOFFSET);
682 return (!levl[x][y].edge && (int) levl[x][y].roomno == i);
683 }
684
685 return (boolean) (x >= croom->lx - 1 && x <= croom->hx + 1
686 && y >= croom->ly - 1 && y <= croom->hy + 1);
687}
688
689/* return a coord c inside mkroom croom, but not in a subroom.
690 returns TRUE if any such space found.

Callers 8

has_dnstairsFunction · 0.85
has_upstairsFunction · 0.85
somexyFunction · 0.85
furniture_presentFunction · 0.85
in_townFunction · 0.85
pos_to_roomFunction · 0.85
maybe_add_doorFunction · 0.85
create_monsterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected