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

Function add_rect

src/rect.c:160–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 */
159
160void
161add_rect(NhRect *r)
162{
163 if (rect_cnt >= n_rects) {
164 impossible("n_rects may be too small.");
165 return;
166 }
167 /* Check that this NhRect is not included in another one */
168 if (get_rect(r))
169 return;
170 rect[rect_cnt] = *r;
171 rect_cnt++;
172}
173
174/*
175 * Okay, here we have two rectangles (r1 & r2).

Callers 1

split_rectsFunction · 0.85

Calls 2

get_rectFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected