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

Function auto_describe

src/getpos.c:637–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637RESTORE_WARNING_FORMAT_NONLITERAL
638
639void
640auto_describe(coordxy cx, coordxy cy)
641{
642 coord cc;
643 int sym = 0;
644 char tmpbuf[BUFSZ];
645 const char *firstmatch = "unknown";
646
647 cc.x = cx;
648 cc.y = cy;
649 if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch,
650 (struct permonst **) 0)) {
651 (void) coord_desc(cx, cy, tmpbuf, iflags.getpos_coords);
652 custompline((SUPPRESS_HISTORY | OVERRIDE_MSGTYPE | NO_CURS_ON_U),
653 "%s%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf,
654 (iflags.autodescribe
655 && getpos_getvalid && !(*getpos_getvalid)(cx, cy))
656 ? " (invalid target)" : "",
657 (iflags.getloc_travelmode && !is_valid_travelpt(cx, cy))
658 ? " (no travel path)" : "");
659 curs(WIN_MAP, cx, cy);
660 flush_screen(0);
661 }
662}
663
664boolean
665getpos_menu(coord *ccp, int gloc)

Callers 2

doclicklookFunction · 0.85
getposFunction · 0.85

Calls 5

do_screen_descriptionFunction · 0.85
coord_descFunction · 0.85
customplineFunction · 0.85
is_valid_travelptFunction · 0.85
flush_screenFunction · 0.85

Tested by

no test coverage detected