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

Function selection_clear

src/selvar.c:47–62  ·  view source on GitHub ↗

clear selection, setting all locations to value val */

Source from the content-addressed store, hash-verified

45
46/* clear selection, setting all locations to value val */
47void
48selection_clear(struct selectionvar *sel, int val)
49{
50 (void) memset(sel->map, 1 + val, (COLNO * ROWNO));
51 if (val) {
52 sel->bounds.lx = 0;
53 sel->bounds.ly = 0;
54 sel->bounds.hx = COLNO - 1;
55 sel->bounds.hy = ROWNO - 1;
56 } else {
57 sel->bounds.lx = COLNO;
58 sel->bounds.ly = ROWNO;
59 sel->bounds.hx = sel->bounds.hy = 0;
60 }
61 sel->bounds_dirty = FALSE;
62}
63
64struct selectionvar *
65selection_clone(struct selectionvar *sel)

Callers 3

l_selection_notFunction · 0.85
lspo_replace_terrainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected