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

Function foundone

src/detect.c:1609–1634  ·  view source on GitHub ↗

update the map for something which has just been found by wand of secret door detection or wizard mode ^E; will be called multiple times during a single operation if multiple things of interest are discovered */

Source from the content-addressed store, hash-verified

1607 door detection or wizard mode ^E; will be called multiple times during a
1608 single operation if multiple things of interest are discovered */
1609staticfn void
1610foundone(coordxy zx, coordxy zy, int glyph)
1611{
1612 if (glyph_is_cmap(glyph) || glyph_is_unexplored(glyph))
1613 levl[zx][zy].seenv = SVALL;
1614
1615 {
1616 seenV save_viz = gv.viz_array[zy][zx];
1617
1618 if (!Blind)
1619 gv.viz_array[zy][zx] = COULD_SEE | IN_SIGHT;
1620 newsym(zx, zy);
1621 gv.viz_array[zy][zx] = save_viz;
1622 }
1623
1624#if FOUND_FLASH_COUNT == 0
1625 /*
1626 * This works [for non-monsters at present] but flash_glyph_at()
1627 * seems preferrable because the tmp_at() variation requires that
1628 * the player respond to --More-- at the end, the flash_glyph
1629 * variation doesn't.
1630 */
1631 tmp_at(DISP_CHANGE, glyph);
1632 tmp_at(zx, zy);
1633#endif
1634}
1635
1636/* find something at one location; this should find all somethings there
1637 since it is used for magical detection rather than physical searching */

Callers 2

detect_obj_trapsFunction · 0.85
findoneFunction · 0.85

Calls 2

newsymFunction · 0.85
tmp_atFunction · 0.85

Tested by

no test coverage detected