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

Function selection_iterate

src/selvar.c:725–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725void
726selection_iterate(
727 struct selectionvar *ov,
728 select_iter_func func,
729 genericptr_t arg)
730{
731 coordxy x, y;
732 NhRect rect = cg.zeroNhRect;
733
734 if (!ov)
735 return;
736
737 selection_getbounds(ov, &rect);
738
739 for (x = rect.lx; x <= rect.hx; x++)
740 for (y = rect.ly; y <= rect.hy; y++)
741 if (isok(x,y) && selection_getpoint(x, y, ov))
742 (*func)(x, y, arg);
743}
744
745/* selection is not rectangular, or has holes in it */
746boolean

Callers 3

lspo_terrainFunction · 0.85
lspo_regionFunction · 0.85

Calls 3

selection_getboundsFunction · 0.85
isokFunction · 0.85
selection_getpointFunction · 0.85

Tested by

no test coverage detected