some changes tried while working on issue #1289

display.h -- bring an unused macro up to date
detect.c  -- always call newsym() when searching or secret door
  detection finds a trap rather than just when not blind
glyphs.c  -- some formatting
pager.c   -- lookat() behaves very strangely when single-stepping
  in the debugger (gdb); this didn't help
This commit is contained in:
PatR
2024-09-28 23:50:27 -07:00
parent 0128fcdf6c
commit 525c6744ee
4 changed files with 31 additions and 22 deletions

View File

@@ -694,6 +694,8 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
int warnindx = glyph_to_warning(glyph);
Strcpy(buf, def_warnsyms[warnindx].explanation);
} else if (glyph_is_invisible(glyph)) {
Strcpy(buf, invisexplain); /* redundant; handled by caller */
} else if (glyph_is_nothing(glyph)) {
Strcpy(buf, "dark part of a room");
} else if (glyph_is_unexplored(glyph)) {
@@ -704,11 +706,7 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
} else {
Strcpy(buf, "unexplored area");
}
} else if (glyph_is_invisible(glyph)) {
/* already handled */
} else if (!glyph_is_cmap(glyph)) {
Strcpy(buf, "unexplored area");
} else {
} else if (glyph_is_cmap(glyph)) {
int amsk;
aligntyp algn;
short symidx = glyph_to_cmap(glyph);
@@ -767,6 +765,8 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
Strcpy(buf, defsyms[symidx].explanation);
break;
}
} else { /* not mon, obj, trap, or cmap */
Strcpy(buf, "unexplored area");
}
return (pm && !Hallucination) ? pm : (struct permonst *) 0;
}