MCPcopy Index your code
hub / github.com/NetHack/NetHack / selection_new

Function selection_new

src/selvar.c:14–30  ·  view source on GitHub ↗

selection */

Source from the content-addressed store, hash-verified

12
13/* selection */
14struct selectionvar *
15selection_new(void)
16{
17 struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof *tmps);
18
19 tmps->wid = COLNO;
20 tmps->hei = ROWNO;
21 tmps->bounds_dirty = FALSE;
22 tmps->bounds.lx = COLNO;
23 tmps->bounds.ly = ROWNO;
24 tmps->bounds.hx = tmps->bounds.hy = 0;
25 tmps->map = (char *) alloc((COLNO * ROWNO) + 1);
26 (void) memset(tmps->map, 1, (COLNO * ROWNO));
27 tmps->map[(COLNO * ROWNO)] = '\0';
28
29 return tmps;
30}
31
32void
33selection_free(struct selectionvar *sel, boolean freesel)

Callers 15

findtravelpathFunction · 0.85
l_selection_push_newFunction · 0.85
selection_filter_percentFunction · 0.85
selection_filter_mapcharFunction · 0.85
selection_do_growFunction · 0.85
selection_floodfillFunction · 0.85
selection_from_mkroomFunction · 0.85
lspo_replace_terrainFunction · 0.85
generate_way_out_methodFunction · 0.85
ensure_way_outFunction · 0.85
lspo_mapFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected