diff --git a/doc/fixes36.1 b/doc/fixes36.1 index a71fd3756..2e2bdd836 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -242,6 +242,7 @@ after using detection magic or #terrain while underwater, then leaving water and saving while on land, save would flag you as underwater again and then restore would limit the map display accordingly; next move would notice, retify things, and report "you are on solid land again" +can see or feel adjacent lava when underwater Fixes to Post-3.6.0 Problems that Were Exposed Via git Respository @@ -271,6 +272,8 @@ tty: rename struct variable 'filter' (role.c) and function 'winch()' (wintty.c) to avoid conflicts with tty: skip selector letter and selection indicator (-,+,#) during menu coloring tty: '>' no longer closes a menu window +tty: if color is disabled and use_inverse is enabled, display lava in inverse + video so that it is visually distinguishable from water unix/X11: in top level Makefile, some commented out definitions of VARDATND misspelled pilemark.xbm (as pilemark.xpm) unix: options file with CR+LF line ends and an invalid option line resulted in diff --git a/src/display.c b/src/display.c index e804aaf58..600f3fc9e 100644 --- a/src/display.c +++ b/src/display.c @@ -540,7 +540,7 @@ xchar x, y; return; /* The hero can't feel non pool locations while under water. */ - if (Underwater && !Is_waterlevel(&u.uz) && !is_pool(x, y)) + if (Underwater && !Is_waterlevel(&u.uz) && !is_pool_or_lava(x, y)) return; /* Set the seen vector as if the hero had seen it. @@ -701,18 +701,9 @@ register int x, y; return; } if (Underwater && !Is_waterlevel(&u.uz)) { - /* don't do anything unless (x,y) is an adjacent underwater position - */ - int dx, dy; - if (!is_pool(x, y)) - return; - dx = x - u.ux; - if (dx < 0) - dx = -dx; - dy = y - u.uy; - if (dy < 0) - dy = -dy; - if (dx > 1 || dy > 1) + /* when underwater, don't do anything unless is an + adjacent underwater or lava position */ + if (!is_pool_or_lava(x, y) || distu(x, y) > 2) return; } @@ -1103,9 +1094,13 @@ int mode; show_glyph(x, y, cmap_to_glyph(S_stone)); } + /* + * TODO? Should this honor Xray radius rather than force radius 1? + */ + for (x = u.ux - 1; x <= u.ux + 1; x++) for (y = u.uy - 1; y <= u.uy + 1; y++) - if (isok(x, y) && is_pool(x, y)) { + if (isok(x, y) && is_pool_or_lava(x, y)) { if (Blind && !(x == u.ux && y == u.uy)) show_glyph(x, y, cmap_to_glyph(S_stone)); else diff --git a/src/mapglyph.c b/src/mapglyph.c index a8f563867..c0c640164 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -124,11 +124,19 @@ unsigned *ospecial; color = NO_COLOR; #ifdef TEXTCOLOR /* provide a visible difference if normal and lit corridor - * use the same symbol */ + use the same symbol */ } else if (iflags.use_color && offset == S_litcorr && showsyms[idx] == showsyms[S_corr + SYM_OFF_P]) { color = CLR_WHITE; #endif + /* try to provide a visible difference between water and lava + if they use the same symbol and color is disabled */ + } else if (!iflags.use_color && offset == S_lava + && (showsyms[idx] == showsyms[S_pool + SYM_OFF_P] + || showsyms[idx] == showsyms[S_water + SYM_OFF_P])) { + /* temporary? hack; makes tty use inverse video if the + corresponding boolean option is enabled */ + special |= MG_DETECT; } else { cmap_color(offset); }