partial fix for S_unexplored
I've been sitting on this for a while but have decided that I'm not likely to make any further progress. SYMBOLS=S_stone:8,S_unexplored:9 on tty reveals that S_stone works as intended but S_unexplored does not. Unexplored was being drawn as spaces, and detected or sensed monsters moving around unexplored areas left a trail of S_unexplored characters behind them. ^R reverted those to spaces. This is only a partial fix that works when the map is initially drawn or fully redrawn. But after tty erases parts of lines (when deleting a menu that overlaid the map or when clearing a message line that wrapped onto the top line of the map), unexplored locations show up as space rather than as S_unexplored.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 display.c $NHDT-Date: 1583195581 2020/03/03 00:33:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.127 $ */
|
/* NetHack 3.6 display.c $NHDT-Date: 1585781359 2020/04/01 22:49:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $ */
|
||||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||||
/* and Dave Cohrs, 1990. */
|
/* and Dave Cohrs, 1990. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1501,7 +1501,7 @@ void
|
|||||||
newsym_force(x, y)
|
newsym_force(x, y)
|
||||||
register int x, y;
|
register int x, y;
|
||||||
{
|
{
|
||||||
newsym(x,y);
|
newsym(x, y);
|
||||||
g.gbuf[y][x].gnew = 1;
|
g.gbuf[y][x].gnew = 1;
|
||||||
if (g.gbuf_start[y] > x)
|
if (g.gbuf_start[y] > x)
|
||||||
g.gbuf_start[y] = x;
|
g.gbuf_start[y] = x;
|
||||||
@@ -1642,8 +1642,8 @@ int start, stop, y;
|
|||||||
void
|
void
|
||||||
cls()
|
cls()
|
||||||
{
|
{
|
||||||
int y;
|
|
||||||
static boolean in_cls = 0;
|
static boolean in_cls = 0;
|
||||||
|
int y, x, force_unexplored;
|
||||||
|
|
||||||
if (in_cls)
|
if (in_cls)
|
||||||
return;
|
return;
|
||||||
@@ -1653,9 +1653,14 @@ cls()
|
|||||||
clear_nhwindow(WIN_MAP); /* clear physical screen */
|
clear_nhwindow(WIN_MAP); /* clear physical screen */
|
||||||
|
|
||||||
clear_glyph_buffer(); /* this is sort of an extra effort, but OK */
|
clear_glyph_buffer(); /* this is sort of an extra effort, but OK */
|
||||||
|
force_unexplored = (g.showsyms[SYM_UNEXPLORED + SYM_OFF_X] != ' ');
|
||||||
for (y = 0; y < ROWNO; y++) {
|
for (y = 0; y < ROWNO; y++) {
|
||||||
g.gbuf_start[y] = 0;
|
g.gbuf_start[y] = 1;
|
||||||
g.gbuf_stop[y] = COLNO - 1;
|
g.gbuf_stop[y] = COLNO - 1;
|
||||||
|
if (force_unexplored) {
|
||||||
|
for (x = 1; x < COLNO; x++)
|
||||||
|
g.gbuf[y][x].gnew = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
in_cls = FALSE;
|
in_cls = FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user