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

Function visible_region_at

src/region.c:717–729  ·  view source on GitHub ↗

* Check if a spot is under a visible region (eg: gas cloud). * Returns NULL if not, otherwise returns region. */

Source from the content-addressed store, hash-verified

715 * Returns NULL if not, otherwise returns region.
716 */
717NhRegion *
718visible_region_at(coordxy x, coordxy y)
719{
720 int i;
721
722 for (i = 0; i < svn.n_regions; i++) {
723 if (!gr.regions[i]->visible || gr.regions[i]->ttl == -2L)
724 continue;
725 if (inside_region(gr.regions[i], x, y))
726 return gr.regions[i];
727 }
728 return (NhRegion *) 0;
729}
730
731void
732show_region(NhRegion *reg, coordxy x, coordxy y)

Callers 13

dosearch0Function · 0.85
reveal_terrain_getglyphFunction · 0.85
vision.cFile · 0.85
avoid_trap_andor_regionFunction · 0.85
look_hereFunction · 0.85
newsymFunction · 0.85
mfndposFunction · 0.85
m_everyturn_effectFunction · 0.85
self_lookatFunction · 0.85
mhidden_descriptionFunction · 0.85
look_at_monsterFunction · 0.85
mstatuslineFunction · 0.85

Calls 1

inside_regionFunction · 0.85

Tested by

no test coverage detected