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

Function show_mon_or_warn

src/display.c:481–496  ·  view source on GitHub ↗

display something on monster layer; may need to fixup object layer */

Source from the content-addressed store, hash-verified

479
480/* display something on monster layer; may need to fixup object layer */
481staticfn void
482show_mon_or_warn(coordxy x, coordxy y, int monglyph)
483{
484 struct obj *o;
485
486 /* "remembered, unseen monster" is tracked by object layer so if we're
487 putting something on monster layer at same spot, stop remembering
488 that; if an object is in view there, start remembering it instead */
489 if (glyph_is_invisible(levl[x][y].glyph)) {
490 unmap_object(x, y);
491 if (cansee(x, y) && (o = vobj_at(x, y)) != 0)
492 map_object(o, FALSE);
493 }
494
495 show_glyph(x, y, monglyph);
496}
497
498#define DETECTED 2
499#define PHYSICALLY_SEEN 1

Callers 2

display_monsterFunction · 0.85
display_warningFunction · 0.85

Calls 3

unmap_objectFunction · 0.85
map_objectFunction · 0.85
show_glyphFunction · 0.85

Tested by

no test coverage detected