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

Function get_rect_ind

src/rect.c:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 */
58
59int
60get_rect_ind(NhRect *r)
61{
62 NhRect *rectp;
63 int lx, ly, hx, hy;
64 int i;
65
66 lx = r->lx;
67 ly = r->ly;
68 hx = r->hx;
69 hy = r->hy;
70 for (i = 0, rectp = &rect[0]; i < rect_cnt; i++, rectp++)
71 if (lx == rectp->lx && ly == rectp->ly && hx == rectp->hx
72 && hy == rectp->hy)
73 return i;
74 return -1;
75}
76
77/*
78 * Search a free rectangle that include the one given in arg

Callers 1

remove_rectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected