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

Function selection_is_irregular

src/selvar.c:746–760  ·  view source on GitHub ↗

selection is not rectangular, or has holes in it */

Source from the content-addressed store, hash-verified

744
745/* selection is not rectangular, or has holes in it */
746boolean
747selection_is_irregular(struct selectionvar *sel)
748{
749 coordxy x, y;
750 NhRect rect = cg.zeroNhRect;
751
752 selection_getbounds(sel, &rect);
753
754 for (x = rect.lx; x <= rect.hx; x++)
755 for (y = rect.ly; y <= rect.hy; y++)
756 if (isok(x,y) && !selection_getpoint(x, y, sel))
757 return TRUE;
758
759 return FALSE;
760}
761
762/* return a description of the selection size */
763char *

Callers 1

Calls 3

selection_getboundsFunction · 0.85
isokFunction · 0.85
selection_getpointFunction · 0.85

Tested by

no test coverage detected